From 9e99e7e192c62c2274f8f5362b354cbf55c3d80f Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 22 七月 2024 16:21:32 +0800 Subject: [PATCH] 变更 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java index 266a055..8e266b5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundflowController.java @@ -2,8 +2,10 @@ import java.util.Arrays; import java.util.List; + import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.aspectj.weaver.loadtime.Aj; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -26,15 +28,14 @@ /** * 璧勯噾瀹℃壒娴佺▼Controller - * + * * @author ruoyi * @date 2022-04-27 */ @Api("璧勯噾瀹℃壒娴佺▼") @RestController @RequestMapping("/project/fundflow") -public class ServiceFundflowController extends BaseController -{ +public class ServiceFundflowController extends BaseController { @Autowired private IServiceFundflowService serviceFundflowService; @@ -43,8 +44,7 @@ */ @ApiOperation("鏌ヨ璧勯噾瀹℃壒娴佺▼鍒楄〃") @GetMapping("/list") - public TableDataInfo list(ServiceFundflow serviceFundflow) - { + public TableDataInfo list(ServiceFundflow serviceFundflow) { startPage(); List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow); return getDataTable(list); @@ -56,8 +56,7 @@ @ApiOperation("瀵煎嚭璧勯噾瀹℃壒娴佺▼鍒楄〃") @Log(title = "璧勯噾瀹℃壒娴佺▼", businessType = BusinessType.EXPORT) @GetMapping("/export") - public AjaxResult export(ServiceFundflow serviceFundflow) - { + public AjaxResult export(ServiceFundflow serviceFundflow) { List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow); ExcelUtil<ServiceFundflow> util = new ExcelUtil<ServiceFundflow>(ServiceFundflow.class); return util.exportExcel(list, "璧勯噾瀹℃壒娴佺▼鏁版嵁"); @@ -68,8 +67,7 @@ */ @ApiOperation("鑾峰彇璧勯噾瀹℃壒娴佺▼璇︾粏淇℃伅") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(serviceFundflowService.getById(id)); } @@ -78,11 +76,11 @@ */ @ApiOperation("鏂板璧勯噾瀹℃壒娴佺▼") @Log(title = "璧勯噾瀹℃壒娴佺▼", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") @RepeatSubmit - public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow) - { - return toAjax(serviceFundflowService.save(serviceFundflow)); + public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow) { + boolean save = serviceFundflowService.save(serviceFundflow); + return AjaxResult.success(serviceFundflow); } /** @@ -90,10 +88,9 @@ */ @ApiOperation("淇敼璧勯噾瀹℃壒娴佺▼") @Log(title = "璧勯噾瀹℃壒娴佺▼", businessType = BusinessType.UPDATE) - @PutMapping - @RepeatSubmit - public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow) - { + @PostMapping("/edit") + @RepeatSubmit + public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow) { return toAjax(serviceFundflowService.updateById(serviceFundflow)); } @@ -102,9 +99,8 @@ */ @ApiOperation("鍒犻櫎璧勯噾瀹℃壒娴佺▼") @Log(title = "璧勯噾瀹℃壒娴佺▼", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @GetMapping("/remove/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(serviceFundflowService.removeByIds(Arrays.asList(ids))); } } -- Gitblit v1.9.3