自动化立体仓库 - WCS系统
zhangc
2025-03-11 d5449236ef0b3adafb3e4cc872f50479efa0ce7b
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
package com.zy.system.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.system.service.UserService;
 
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
 
@TableName("sys_user_login")
public class UserLogin implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * 员工
     */
    @TableField("user_id")
    private Long userId;
 
    /**
     * 凭证值
     */
    private String token;
 
    /**
     * 添加时间
     */
    @TableField("create_time")
    private Date createTime;
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public Long getUserId() {
        return userId;
    }
 
    public void setUserId(Long userId) {
        this.userId = userId;
    }
 
    public String getUserUsername() {
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.userId);
        if (!Cools.isEmpty(user)) {
            return user.getUsername();
        }
        return null;
    }
 
    public String getToken() {
        return token;
    }
 
    public void setToken(String token) {
        this.token = token;
    }
 
    public Date getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
 
    public String getCreateTime$() {
        if (Cools.isEmpty(this.createTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
 
 
}