From 22f2171b2f5a5cd594ea027860207bf3646f1f9d Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 05 二月 2024 14:08:14 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundSharedController.java | 30 ++++++++++++------------------ 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundSharedController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundSharedController.java index 4b17341..9c86e5e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundSharedController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundSharedController.java @@ -20,15 +20,14 @@ /** * 璐圭敤鐢宠涓籆ontroller - * + * * @author ruoyi * @date 2023-03-27 */ @Api("璐圭敤鐢宠涓�") @RestController @RequestMapping("/system/shared") -public class ServiceFundSharedController extends BaseController -{ +public class ServiceFundSharedController extends BaseController { @Autowired private IServiceFundSharedService serviceFundSharedService; @@ -38,8 +37,7 @@ @ApiOperation("鏌ヨ璐圭敤鐢宠涓诲垪琛�") @PreAuthorize("@ss.hasPermi('system:shared:list')") @GetMapping("/list") - public TableDataInfo list(ServiceFundShared serviceFundShared) - { + public TableDataInfo list(ServiceFundShared serviceFundShared) { startPage(); List<ServiceFundShared> list = serviceFundSharedService.queryList(serviceFundShared); return getDataTable(list); @@ -52,8 +50,7 @@ @PreAuthorize("@ss.hasPermi('system:shared:export')") @Log(title = "璐圭敤鐢宠涓�", businessType = BusinessType.EXPORT) @GetMapping("/export") - public AjaxResult export(ServiceFundShared serviceFundShared) - { + public AjaxResult export(ServiceFundShared serviceFundShared) { List<ServiceFundShared> list = serviceFundSharedService.queryList(serviceFundShared); ExcelUtil<ServiceFundShared> util = new ExcelUtil<ServiceFundShared>(ServiceFundShared.class); return util.exportExcel(list, "璐圭敤鐢宠涓绘暟鎹�"); @@ -65,8 +62,7 @@ @ApiOperation("鑾峰彇璐圭敤鐢宠涓昏缁嗕俊鎭�") @PreAuthorize("@ss.hasPermi('system:shared:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(serviceFundSharedService.getById(id)); } @@ -76,11 +72,11 @@ @ApiOperation("鏂板璐圭敤鐢宠涓�") @PreAuthorize("@ss.hasPermi('system:shared:add')") @Log(title = "璐圭敤鐢宠涓�", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") @RepeatSubmit - public AjaxResult add(@RequestBody ServiceFundShared serviceFundShared) - { - return toAjax(serviceFundSharedService.save(serviceFundShared)); + public AjaxResult add(@RequestBody ServiceFundShared serviceFundShared) { + boolean save = serviceFundSharedService.save(serviceFundShared); + return AjaxResult.success(serviceFundShared); } /** @@ -90,9 +86,8 @@ @PreAuthorize("@ss.hasPermi('system:shared:edit')") @Log(title = "璐圭敤鐢宠涓�", businessType = BusinessType.UPDATE) @PutMapping - @RepeatSubmit - public AjaxResult edit(@RequestBody ServiceFundShared serviceFundShared) - { + @RepeatSubmit + public AjaxResult edit(@RequestBody ServiceFundShared serviceFundShared) { return toAjax(serviceFundSharedService.updateById(serviceFundShared)); } @@ -103,8 +98,7 @@ @PreAuthorize("@ss.hasPermi('system:shared:remove')") @Log(title = "璐圭敤鐢宠涓�", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(serviceFundSharedService.removeByIds(Arrays.asList(ids))); } } -- Gitblit v1.9.3