中扬CRM客户关系管理系统
#
Junjie
2023-09-06 4881547c722ed501de6d64022b28c84b04885fc8
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package com.zy.crm.manager.entity;
 
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.crm.system.entity.User;
import com.zy.crm.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
import java.io.Serializable;
 
@Data
@TableName("sys_rule")
public class Rule implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * 规则方式(默认1:当前日期时间戳)
     */
    @ApiModelProperty(value= "规则方式(默认1:当前日期时间戳)")
    @TableField("rule_type")
    private Integer ruleType;
 
    /**
     * 规则头
     */
    @ApiModelProperty(value= "规则头")
    @TableField("rule_header")
    private String ruleHeader;
 
    /**
     * 规则体
     */
    @ApiModelProperty(value= "规则体")
    @TableField("rule_body")
    private String ruleBody;
 
    /**
     * 连接符(默认“-”)
     */
    @ApiModelProperty(value= "连接符(默认“-”)")
    @TableField("rule_connector")
    private String ruleConnector;
 
    /**
     * 连接符是否启用(0:启用;1:不启用。默认1)
     */
    @ApiModelProperty(value= "连接符是否启用(0:启用;1:不启用。默认1)")
    @TableField("rule_connector_type")
    private Integer ruleConnectorType;
 
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    @TableField("rule_memo")
    private String ruleMemo;
 
    /**
     * 预览
     */
    @ApiModelProperty(value= "预览")
    @TableField("rule_preview")
    private String rulePreview;
 
    /**
     * 备用字段1
     */
    @ApiModelProperty(value= "备用字段1")
    @TableField("rule_standby1")
    private String ruleStandby1;
 
    /**
     * 备用字段2
     */
    @ApiModelProperty(value= "备用字段2")
    @TableField("rule_standby2")
    private String ruleStandby2;
 
    public Rule() {}
 
    public Rule(Integer ruleType, String ruleHeader, String ruleBody, String ruleConnector, Integer ruleConnectorType, String ruleMemo, String rulePreview, String ruleStandby1, String ruleStandby2) {
        this.ruleType = ruleType;
        this.ruleHeader = ruleHeader;
        this.ruleBody = ruleBody;
        this.ruleConnector = ruleConnector;
        this.ruleConnectorType = ruleConnectorType;
        this.ruleMemo = ruleMemo;
        this.rulePreview = rulePreview;
        this.ruleStandby1 = ruleStandby1;
        this.ruleStandby2 = ruleStandby2;
    }
 
    public String getRuleType$(){
        if (null == this.ruleType){ return null; }
        switch (this.ruleType){
            case 1:
                return "生成当前日期时间戳";
            case 2:
                return "生成长度为10的随机字符串";
            case 3:
                return "生成日期时间字符串";
            default:
                return String.valueOf(this.ruleType);
        }
    }
 
    public String getRuleConnectorType$(){
        if (null == this.ruleConnectorType){ return null; }
        switch (this.ruleConnectorType){
            case 1:
                return "不启用";
            case 0:
                return "启用";
            default:
                return String.valueOf(this.ruleConnectorType);
        }
    }
 
    public String getRuleConnector$(){
        if (null == this.ruleConnector){ return null; }
        switch (this.ruleConnector){
            case "-":
                return "默认:-";
            default:
                return String.valueOf(this.ruleConnector);
        }
    }
 
//    Rule rule = new Rule(
//            null,    // 规则方式(默认1:当前日期时间戳)[非空]
//            null,    // 规则头[非空]
//            null,    // 规则体[非空]
//            null,    // 连接符(默认“-”)[非空]
//            null,    // 连接符是否启用(0:启用;1:不启用。默认1)[非空]
//            null,    // 备注
//            null,    // 预览
//            null,    // 备用字段1
//            null    // 备用字段2
//    );
 
 
}