From 3cc21970e7d8460c3a0b6290d62a26557210b73a Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Tue, 16 Apr 2024 15:48:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BE=A7=E9=87=8D=E8=A6=81?= =?UTF-8?q?=E7=B4=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcEventImportantController.java | 18 ++++++++++++++---- .../mapper/DcEventImportantMapper.java | 4 ++-- .../service/IDcEventImportantService.java | 4 ++-- .../impl/DcEventImportantServiceImpl.java | 6 +++--- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java index f1fb84bc..e010ebc7 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java @@ -2,6 +2,9 @@ package com.zc.business.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2024-04-11 */ +@Api(tags = "事件侧重要素") @RestController @RequestMapping("/business/eventImportant") public class DcEventImportantController extends BaseController @@ -37,6 +41,7 @@ public class DcEventImportantController extends BaseController /** * 查询事件侧重要素列表 */ + @ApiOperation("查询事件侧重要素列表") @GetMapping("/list") public TableDataInfo list(DcEventImportant dcEventImportant) { @@ -48,6 +53,7 @@ public class DcEventImportantController extends BaseController /** * 导出事件侧重要素列表 */ + @ApiOperation("导出事件侧重要素列表") @Log(title = "事件侧重要素", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, DcEventImportant dcEventImportant) @@ -58,17 +64,19 @@ public class DcEventImportantController extends BaseController } /** - * 获取事件侧重要素详细信息 + * 根据事件id查询侧重要素信息 */ - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") String id) + @ApiOperation("根据事件id查询侧重要素信息") + @GetMapping(value = "/{eventId}") + public AjaxResult getInfo(@PathVariable("eventId") String eventId) { - return AjaxResult.success(dcEventImportantService.selectDcEventImportantByEventId(id)); + return AjaxResult.success(dcEventImportantService.selectDcEventImportantByEventId(eventId)); } /** * 新增事件侧重要素 */ + @ApiOperation("新增事件侧重要素") @Log(title = "事件侧重要素", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcEventImportant dcEventImportant) @@ -81,6 +89,7 @@ public class DcEventImportantController extends BaseController */ @Log(title = "事件侧重要素", businessType = BusinessType.UPDATE) @PutMapping + @ApiOperation("修改事件侧重要素") public AjaxResult edit(@RequestBody DcEventImportant dcEventImportant) { return toAjax(dcEventImportantService.updateDcEventImportant(dcEventImportant)); @@ -89,6 +98,7 @@ public class DcEventImportantController extends BaseController /** * 删除事件侧重要素 */ + @ApiOperation("删除事件侧重要素") @Log(title = "事件侧重要素", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java index 1aa5d2bf..ce2a2a8c 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcEventImportantMapper.java @@ -14,10 +14,10 @@ public interface DcEventImportantMapper /** * 查询事件侧重要素 * - * @param id 事件侧重要素主键 + * @param eventId 事件id * @return 事件侧重要素 */ - public DcEventImportant selectDcEventImportantByEventId(String id); + public DcEventImportant selectDcEventImportantByEventId(String eventId); /** * 查询事件侧重要素列表 diff --git a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java index b212e772..04a27946 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java @@ -14,10 +14,10 @@ public interface IDcEventImportantService /** * 查询事件侧重要素 * - * @param id 事件侧重要素主键 + * @param eventId 事件id * @return 事件侧重要素 */ - public DcEventImportant selectDcEventImportantByEventId(String id); + public DcEventImportant selectDcEventImportantByEventId(String eventId); /** * 查询事件侧重要素列表 diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java index f828a8c2..b4611cd3 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java @@ -22,13 +22,13 @@ public class DcEventImportantServiceImpl implements IDcEventImportantService /** * 查询事件侧重要素 * - * @param id 事件侧重要素主键 + * @param eventId 事件id * @return 事件侧重要素 */ @Override - public DcEventImportant selectDcEventImportantByEventId(String id) + public DcEventImportant selectDcEventImportantByEventId(String eventId) { - return dcEventImportantMapper.selectDcEventImportantByEventId(id); + return dcEventImportantMapper.selectDcEventImportantByEventId(eventId); } /**