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/ServiceDonatefollowupController.java | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatefollowupController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatefollowupController.java index be25db9..0754568 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatefollowupController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonatefollowupController.java @@ -28,15 +28,14 @@ /** * 鎹愮尞闅忚Controller - * + * * @author ruoyi * @date 2021-12-10 */ @Api("鎹愮尞闅忚") @RestController @RequestMapping("/project/donatefollowup") -public class ServiceDonatefollowupController extends BaseController -{ +public class ServiceDonatefollowupController extends BaseController { @Autowired private IServiceDonatefollowupService serviceDonatefollowupService; @@ -46,8 +45,7 @@ @ApiOperation("鏌ヨ鎹愮尞闅忚鍒楄〃") //@PreAuthorize("@ss.hasPermi('project:donatefollowup:list')") @GetMapping("/list") - public TableDataInfo list(ServiceDonatefollowup serviceDonatefollowup) - { + public TableDataInfo list(ServiceDonatefollowup serviceDonatefollowup) { startPage(); //List<ServiceDonatefollowup> list = serviceDonatefollowupService.queryList(serviceDonatefollowup); List<ServiceDonatefollowup> list = serviceDonatefollowupService.selectAll(serviceDonatefollowup); @@ -55,7 +53,7 @@ } @GetMapping("/listnew") - public TableDataInfo listnew (DonateFollowupVO donateFollowupVO){ + public TableDataInfo listnew(DonateFollowupVO donateFollowupVO) { startPage(); List<DonateFollowupVO> list = serviceDonatefollowupService.selectVOList(donateFollowupVO); return getDataTable(list); @@ -70,8 +68,7 @@ //@PreAuthorize("@ss.hasPermi('project:donatefollowup:export')") @Log(title = "鎹愮尞闅忚", businessType = BusinessType.EXPORT) @GetMapping("/export") - public AjaxResult export(ServiceDonatefollowup serviceDonatefollowup) - { + public AjaxResult export(ServiceDonatefollowup serviceDonatefollowup) { List<ServiceDonatefollowup> list = serviceDonatefollowupService.queryList(serviceDonatefollowup); ExcelUtil<ServiceDonatefollowup> util = new ExcelUtil<ServiceDonatefollowup>(ServiceDonatefollowup.class); return util.exportExcel(list, "鎹愮尞闅忚鏁版嵁"); @@ -83,8 +80,7 @@ @ApiOperation("鑾峰彇鎹愮尞闅忚璇︾粏淇℃伅") //@PreAuthorize("@ss.hasPermi('project:donatefollowup:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { //return AjaxResult.success(serviceDonatefollowupService.getById(id)); return AjaxResult.success(serviceDonatefollowupService.selectFollowUpById(id)); } @@ -95,11 +91,11 @@ @ApiOperation("鏂板鎹愮尞闅忚") //@PreAuthorize("@ss.hasPermi('project:donatefollowup:add')") @Log(title = "鎹愮尞闅忚", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") @RepeatSubmit - public AjaxResult add(@RequestBody ServiceDonatefollowup serviceDonatefollowup) - { - return toAjax(serviceDonatefollowupService.save(serviceDonatefollowup)); + public AjaxResult add(@RequestBody ServiceDonatefollowup serviceDonatefollowup) { + boolean save = serviceDonatefollowupService.save(serviceDonatefollowup); + return AjaxResult.success(serviceDonatefollowup); } /** @@ -109,9 +105,8 @@ //@PreAuthorize("@ss.hasPermi('project:donatefollowup:edit')") @Log(title = "鎹愮尞闅忚", businessType = BusinessType.UPDATE) @PostMapping("/edit") - @RepeatSubmit - public AjaxResult edit(@RequestBody ServiceDonatefollowup serviceDonatefollowup) - { + @RepeatSubmit + public AjaxResult edit(@RequestBody ServiceDonatefollowup serviceDonatefollowup) { return toAjax(serviceDonatefollowupService.updateById(serviceDonatefollowup)); } @@ -123,8 +118,7 @@ //@PreAuthorize("@ss.hasPermi('project:donatefollowup:remove')") @Log(title = "鎹愮尞闅忚", businessType = BusinessType.DELETE) @GetMapping("/remove/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(serviceDonatefollowupService.removeByIds(Arrays.asList(ids))); } } -- Gitblit v1.9.3