From c20c99f256e2f47bd45f0b48fb6b1bcc83960f1e Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期四, 21 三月 2024 14:22:13 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganstaticsController.java | 36 +++++++++++++++--------------------- 1 files changed, 15 insertions(+), 21 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganstaticsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganstaticsController.java index 2113020..88e0f72 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganstaticsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonateorganstaticsController.java @@ -20,15 +20,14 @@ /** * 鎹愮尞妗堜緥鍣ㄥ畼鍒桟ontroller - * + * * @author ruoyi * @date 2023-12-27 */ @Api("鎹愮尞妗堜緥鍣ㄥ畼鍒�") @RestController @RequestMapping("/project/donateorganstatics") -public class ServiceDonateorganstaticsController extends BaseController -{ +public class ServiceDonateorganstaticsController extends BaseController { @Autowired private IServiceDonateorganstaticsService serviceDonateorganstaticsService; @@ -38,8 +37,7 @@ @ApiOperation("鏌ヨ鎹愮尞妗堜緥鍣ㄥ畼鍒楀垪琛�") @PreAuthorize("@ss.hasPermi('project:donateorganstatics:list')") @GetMapping("/list") - public TableDataInfo list(ServiceDonateorganstatics serviceDonateorganstatics) - { + public TableDataInfo list(ServiceDonateorganstatics serviceDonateorganstatics) { startPage(); List<ServiceDonateorganstatics> list = serviceDonateorganstaticsService.queryList(serviceDonateorganstatics); return getDataTable(list); @@ -52,8 +50,7 @@ @PreAuthorize("@ss.hasPermi('project:donateorganstatics:export')") @Log(title = "鎹愮尞妗堜緥鍣ㄥ畼鍒�", businessType = BusinessType.EXPORT) @GetMapping("/export") - public AjaxResult export(ServiceDonateorganstatics serviceDonateorganstatics) - { + public AjaxResult export(ServiceDonateorganstatics serviceDonateorganstatics) { List<ServiceDonateorganstatics> list = serviceDonateorganstaticsService.queryList(serviceDonateorganstatics); ExcelUtil<ServiceDonateorganstatics> util = new ExcelUtil<ServiceDonateorganstatics>(ServiceDonateorganstatics.class); return util.exportExcel(list, "鎹愮尞妗堜緥鍣ㄥ畼鍒楁暟鎹�"); @@ -64,9 +61,8 @@ */ @ApiOperation("鑾峰彇鎹愮尞妗堜緥鍣ㄥ畼鍒楄缁嗕俊鎭�") @PreAuthorize("@ss.hasPermi('project:donateorganstatics:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + @GetMapping(value = "/getInfo/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(serviceDonateorganstaticsService.getById(id)); } @@ -76,11 +72,11 @@ @ApiOperation("鏂板鎹愮尞妗堜緥鍣ㄥ畼鍒�") @PreAuthorize("@ss.hasPermi('project:donateorganstatics:add')") @Log(title = "鎹愮尞妗堜緥鍣ㄥ畼鍒�", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") @RepeatSubmit - public AjaxResult add(@RequestBody ServiceDonateorganstatics serviceDonateorganstatics) - { - return toAjax(serviceDonateorganstaticsService.save(serviceDonateorganstatics)); + public AjaxResult add(@RequestBody ServiceDonateorganstatics serviceDonateorganstatics) { + boolean save = serviceDonateorganstaticsService.save(serviceDonateorganstatics); + return AjaxResult.success(serviceDonateorganstatics); } /** @@ -89,10 +85,9 @@ @ApiOperation("淇敼鎹愮尞妗堜緥鍣ㄥ畼鍒�") @PreAuthorize("@ss.hasPermi('project:donateorganstatics:edit')") @Log(title = "鎹愮尞妗堜緥鍣ㄥ畼鍒�", businessType = BusinessType.UPDATE) - @PutMapping - @RepeatSubmit - public AjaxResult edit(@RequestBody ServiceDonateorganstatics serviceDonateorganstatics) - { + @PostMapping("/edit") + @RepeatSubmit + public AjaxResult edit(@RequestBody ServiceDonateorganstatics serviceDonateorganstatics) { return toAjax(serviceDonateorganstaticsService.updateById(serviceDonateorganstatics)); } @@ -102,9 +97,8 @@ @ApiOperation("鍒犻櫎鎹愮尞妗堜緥鍣ㄥ畼鍒�") @PreAuthorize("@ss.hasPermi('project:donateorganstatics:remove')") @Log(title = "鎹愮尞妗堜緥鍣ㄥ畼鍒�", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @GetMapping("/remove/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(serviceDonateorganstaticsService.removeByIds(Arrays.asList(ids))); } } -- Gitblit v1.9.3