1
20 小时以前 54de9faad9bf00e13b23f024e94bf486a9b3c959
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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;
        }
    }
 
}