#
Junjie
8 小时以前 40101e1766a04cc82076556783ada6e1a7711b93
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
package com.zy.asrs.entity;
 
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableField;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
 
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
 
@Data
@TableName("rcs_device_config")
public class DeviceConfig implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    @ApiModelProperty(value= "")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
 
    /**
     * 设备ip
     */
    @ApiModelProperty(value= "设备ip")
    private String ip;
 
    /**
     * 设备端口
     */
    @ApiModelProperty(value= "设备端口")
    private Integer port;
 
    /**
     * 实现类
     */
    @ApiModelProperty(value= "实现类")
    @TableField("thread_impl")
    private String threadImpl;
 
    /**
     * 创建时间
     */
    @ApiModelProperty(value= "创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
 
    /**
     * 设备类型
     */
    @ApiModelProperty(value= "设备类型")
    @TableField("device_type")
    private String deviceType;
 
    /**
     * 设备编号
     */
    @ApiModelProperty(value= "设备编号")
    @TableField("device_no")
    private Integer deviceNo;
 
    public DeviceConfig() {}
 
    public DeviceConfig(String ip,Integer port,String threadImpl,Date createTime,String deviceType,Integer deviceNo) {
        this.ip = ip;
        this.port = port;
        this.threadImpl = threadImpl;
        this.createTime = createTime;
        this.deviceType = deviceType;
        this.deviceNo = deviceNo;
    }
 
//    DeviceConfig deviceConfig = new DeviceConfig(
//            null,    // 设备ip
//            null,    // 设备端口
//            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);
    }
 
 
}