Browse Source

--处理流程接口和实体类增加swagger接口文档

develop
mengff 1 year ago
parent
commit
4b92d76a21
  1. 10
      zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java
  2. 20
      zc-business/src/main/java/com/zc/business/domain/DcEventProcess.java

10
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 java.util.List;
import javax.servlet.http.HttpServletResponse; 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.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2024-01-03 * @date 2024-01-03
*/ */
@Api(tags = "事件处置流程")
@RestController @RestController
@RequestMapping("/system/process") @RequestMapping("/system/process")
public class DcEventProcessController extends BaseController public class DcEventProcessController extends BaseController
@ -37,6 +41,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 查询事件处理流程列表 * 查询事件处理流程列表
*/ */
@ApiOperation("查询事件处理流程列表")
@PreAuthorize("@ss.hasPermi('system:process:list')") @PreAuthorize("@ss.hasPermi('system:process:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcEventProcess dcEventProcess) public TableDataInfo list(DcEventProcess dcEventProcess)
@ -51,6 +56,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 导出事件处理流程列表 * 导出事件处理流程列表
*/ */
@ApiOperation("导出事件处理流程列表")
@PreAuthorize("@ss.hasPermi('system:process:export')") @PreAuthorize("@ss.hasPermi('system:process:export')")
@Log(title = "事件处理流程", businessType = BusinessType.EXPORT) @Log(title = "事件处理流程", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ -64,6 +70,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 获取事件处理流程详细信息 * 获取事件处理流程详细信息
*/ */
@ApiOperation("获取事件处理流程详细信息")
@PreAuthorize("@ss.hasPermi('system:process:query')") @PreAuthorize("@ss.hasPermi('system:process:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
@ -74,6 +81,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 新增事件处理流程 * 新增事件处理流程
*/ */
@ApiOperation("新增事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:add')") @PreAuthorize("@ss.hasPermi('system:process:add')")
@Log(title = "事件处理流程", businessType = BusinessType.INSERT) @Log(title = "事件处理流程", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
@ -85,6 +93,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 修改事件处理流程 * 修改事件处理流程
*/ */
@ApiOperation("修改事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:edit')") @PreAuthorize("@ss.hasPermi('system:process:edit')")
@Log(title = "事件处理流程", businessType = BusinessType.UPDATE) @Log(title = "事件处理流程", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
@ -96,6 +105,7 @@ public class DcEventProcessController extends BaseController
/** /**
* 删除事件处理流程 * 删除事件处理流程
*/ */
@ApiOperation("删除事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:remove')") @PreAuthorize("@ss.hasPermi('system:process:remove')")
@Log(title = "事件处理流程", businessType = BusinessType.DELETE) @Log(title = "事件处理流程", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")

20
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 java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import javax.validation.constraints.NotBlank;
/** /**
* 事件处理流程对象 dc_event_process * 事件处理流程对象 dc_event_process
* *
* @author ruoyi * @author ruoyi
* @date 2024-01-03 * @date 2024-01-03
*/ */
public class DcEventProcess extends BaseEntity public class DcEventProcess
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty(value = "流水ID",required = true)
@NotBlank(message = "流水ID不能为空")
private Long id; private Long id;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty(value="事件ID",required = true)
@NotBlank(message = "事件ID不能为空")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String eventId; private String eventId;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty(value="操作时间",required = true)
@NotBlank(message = "操作时间不能为空")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date operationTime; private Date operationTime;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty(value="操作人",required = true)
@NotBlank(message = "操作人不能为空")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String operator; private String operator;
/** 1-pc端 /** 1-pc端
2-手机端 */ 2-手机端 */
@ApiModelProperty(value="来源",required = true)
@NotBlank(message = "来源不能为空")
@Excel(name = "1-pc端 2-手机端") @Excel(name = "1-pc端 2-手机端")
private Integer source; private Integer source;
/** 1-节点 /** 1-节点
2-信息发布 2-信息发布
*/ */
@ApiModelProperty(value="流程类型",required = true)
@NotBlank(message = "流程类型不能为空")
@Excel(name = "1-节点 2-信息发布 ") @Excel(name = "1-节点 2-信息发布 ")
private Integer processType; private Integer processType;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty("内容")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String context; private String context;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty("流程ID")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long processId; private Long processId;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty("流程名称")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String processName; private String processName;

Loading…
Cancel
Save