package com.vincent.rsf.server.system.entity;
|
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import com.vincent.rsf.framework.common.Cools;
|
import com.vincent.rsf.framework.common.SpringUtils;
|
import com.vincent.rsf.server.system.service.UserService;
|
import com.vincent.rsf.server.system.entity.User;
|
import java.io.Serializable;
|
import java.util.Date;
|
|
@Data
|
@TableName("mission_flow_step_log")
|
public class FlowStepLog implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@ApiModelProperty(value= "")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 流程实例ID
|
*/
|
@ApiModelProperty(value= "流程实例ID")
|
private Long flowInstanceId;
|
|
/**
|
* 步骤实例ID
|
*/
|
@ApiModelProperty(value= "步骤实例ID")
|
private Long stepInstanceId;
|
|
/**
|
* 日志类型:REQUEST, RESPONSE, ERROR, DEBUG
|
*/
|
@ApiModelProperty(value= "日志类型:REQUEST, RESPONSE, ERROR, DEBUG")
|
private String logType;
|
|
/**
|
* 日志级别:INFO, WARN, ERROR
|
*/
|
@ApiModelProperty(value= "日志级别:INFO, WARN, ERROR")
|
private String logLevel;
|
|
/**
|
* 日志内容
|
*/
|
@ApiModelProperty(value= "日志内容")
|
private String logContent;
|
|
/**
|
* 请求数据
|
*/
|
@ApiModelProperty(value= "请求数据")
|
private String requestData;
|
|
/**
|
* 响应数据
|
*/
|
@ApiModelProperty(value= "响应数据")
|
private String responseData;
|
|
/**
|
* 精确到毫秒
|
*/
|
@ApiModelProperty(value= "精确到毫秒")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
public FlowStepLog() {}
|
|
public FlowStepLog(Long flowInstanceId,Long stepInstanceId,String logType,String logLevel,String logContent,String requestData,String responseData,Date createTime) {
|
this.flowInstanceId = flowInstanceId;
|
this.stepInstanceId = stepInstanceId;
|
this.logType = logType;
|
this.logLevel = logLevel;
|
this.logContent = logContent;
|
this.requestData = requestData;
|
this.responseData = responseData;
|
this.createTime = createTime;
|
}
|
|
// FlowStepLog flowStepLog = new FlowStepLog(
|
// null, // 流程实例ID[非空]
|
// null, // 步骤实例ID[非空]
|
// null, // 日志类型:REQUEST, RESPONSE, ERROR, DEBUG[非空]
|
// null, // 日志级别:INFO, WARN, ERROR[非空]
|
// null, // 日志内容
|
// null, // 请求数据
|
// null, // 响应数据
|
// null // 精确到毫秒
|
// );
|
|
public String getCreateTime$(){
|
if (Cools.isEmpty(this.createTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
|
}
|
|
|
|
public Boolean getStatusBool(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return true;
|
case 0:
|
return false;
|
default:
|
return null;
|
}
|
}
|
|
}
|