From 4b92d76a216771ac2e1e7c4aa172854c452d0030 Mon Sep 17 00:00:00 2001 From: mengff <1198151809@qq.com> Date: Wed, 3 Jan 2024 17:56:21 +0800 Subject: [PATCH] =?UTF-8?q?--=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=92=8C=E5=AE=9E=E4=BD=93=E7=B1=BB=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?swagger=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcEventProcessController.java | 10 ++++++++++ .../zc/business/domain/DcEventProcess.java | 20 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java index 234646b7..f332ebfc 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.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-01-03 */ +@Api(tags = "事件处置流程") @RestController @RequestMapping("/system/process") public class DcEventProcessController extends BaseController @@ -37,6 +41,7 @@ public class DcEventProcessController extends BaseController /** * 查询事件处理流程列表 */ + @ApiOperation("查询事件处理流程列表") @PreAuthorize("@ss.hasPermi('system:process:list')") @GetMapping("/list") public TableDataInfo list(DcEventProcess dcEventProcess) @@ -51,6 +56,7 @@ public class DcEventProcessController extends BaseController /** * 导出事件处理流程列表 */ + @ApiOperation("导出事件处理流程列表") @PreAuthorize("@ss.hasPermi('system:process:export')") @Log(title = "事件处理流程", businessType = BusinessType.EXPORT) @PostMapping("/export") @@ -64,6 +70,7 @@ public class DcEventProcessController extends BaseController /** * 获取事件处理流程详细信息 */ + @ApiOperation("获取事件处理流程详细信息") @PreAuthorize("@ss.hasPermi('system:process:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) @@ -74,6 +81,7 @@ public class DcEventProcessController extends BaseController /** * 新增事件处理流程 */ + @ApiOperation("新增事件处理流程") @PreAuthorize("@ss.hasPermi('system:process:add')") @Log(title = "事件处理流程", businessType = BusinessType.INSERT) @PostMapping @@ -85,6 +93,7 @@ public class DcEventProcessController extends BaseController /** * 修改事件处理流程 */ + @ApiOperation("修改事件处理流程") @PreAuthorize("@ss.hasPermi('system:process:edit')") @Log(title = "事件处理流程", businessType = BusinessType.UPDATE) @PutMapping @@ -96,6 +105,7 @@ public class DcEventProcessController extends BaseController /** * 删除事件处理流程 */ + @ApiOperation("删除事件处理流程") @PreAuthorize("@ss.hasPermi('system:process:remove')") @Log(title = "事件处理流程", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventProcess.java b/zc-business/src/main/java/com/zc/business/domain/DcEventProcess.java index ff7a4585..751b51d9 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventProcess.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventProcess.java @@ -2,56 +2,74 @@ package com.zc.business.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import javax.validation.constraints.NotBlank; + /** * 事件处理流程对象 dc_event_process * * @author ruoyi * @date 2024-01-03 */ -public class DcEventProcess extends BaseEntity +public class DcEventProcess { private static final long serialVersionUID = 1L; /** $column.columnComment */ + @ApiModelProperty(value = "流水ID",required = true) + @NotBlank(message = "流水ID不能为空") private Long id; /** $column.columnComment */ + @ApiModelProperty(value="事件ID",required = true) + @NotBlank(message = "事件ID不能为空") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String eventId; /** $column.columnComment */ + @ApiModelProperty(value="操作时间",required = true) + @NotBlank(message = "操作时间不能为空") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date operationTime; /** $column.columnComment */ + @ApiModelProperty(value="操作人",required = true) + @NotBlank(message = "操作人不能为空") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String operator; /** 1-pc端 2-手机端 */ + @ApiModelProperty(value="来源",required = true) + @NotBlank(message = "来源不能为空") @Excel(name = "1-pc端 2-手机端") private Integer source; /** 1-节点 2-信息发布 */ + @ApiModelProperty(value="流程类型",required = true) + @NotBlank(message = "流程类型不能为空") @Excel(name = "1-节点 2-信息发布 ") private Integer processType; /** $column.columnComment */ + @ApiModelProperty("内容") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String context; /** $column.columnComment */ + @ApiModelProperty("流程ID") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long processId; /** $column.columnComment */ + @ApiModelProperty("流程名称") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String processName;