Browse Source

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

develop
mengff 11 months 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 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}")

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 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;

Loading…
Cancel
Save