From edfa49f201d3fc8fc6b51b700e91f80246660855 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 13 二月 2024 20:29:14 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/entity/UserLogin.java | 52 ++++++++++++++++++++++++++++++++++------------------ 1 files changed, 34 insertions(+), 18 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/entity/UserLogin.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/entity/UserLogin.java index 4ad6a5c..4bc204b 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/entity/UserLogin.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/entity/UserLogin.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.SpringUtils; +import com.zy.asrs.wcs.sys.service.HostService; import com.zy.asrs.wcs.sys.service.UserService; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -17,6 +18,11 @@ @Data @TableName("sys_user_login") public class UserLogin implements Serializable { + + public static final int TYPE_LOGIN = 0; // 鐧诲綍鎴愬姛 + public static final int TYPE_ERROR = 1; // 鐧诲綍澶辫触 + public static final int TYPE_LOGOUT = 2; // 閫�鍑虹櫥褰� + public static final int TYPE_REFRESH = 3; // 缁token private static final long serialVersionUID = 1L; @@ -34,10 +40,29 @@ private Long userId; /** + * 鎵�灞炴満鏋� + */ + @ApiModelProperty(value= "鎵�灞炴満鏋�") + private Long hostId; + + /** * 瀵嗛挜 */ @ApiModelProperty(value= "瀵嗛挜") private String token; + + /** + * 鐧诲綍ip + */ + @ApiModelProperty(value= "鐧诲綍ip") + private String ip; + + /** + * 绫诲瀷 + */ + @ApiModelProperty(value= "绫诲瀷") + private Integer type; + /** * 娣诲姞鏃堕棿 @@ -58,24 +83,6 @@ @ApiModelProperty(value= "澶囨敞") private String memo; - public UserLogin() {} - - public UserLogin(Long userId,String token,Date createTime,String system,String memo) { - this.userId = userId; - this.token = token; - this.createTime = createTime; - this.system = system; - this.memo = memo; - } - -// UserLogin userLogin = new UserLogin( -// null, // 鐢ㄦ埛[闈炵┖] -// null, // 瀵嗛挜 -// null, // 娣诲姞鏃堕棿 -// null, // 鐧诲綍绯荤粺 -// null // 澶囨敞 -// ); - public String getUserId$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.getById(this.userId); @@ -85,6 +92,15 @@ return null; } + public String getHostId$(){ + HostService service = SpringUtils.getBean(HostService.class); + Host host = service.getById(this.hostId); + if (!Cools.isEmpty(host)){ + return String.valueOf(host.getId()); + } + return null; + } + public String getCreateTime$(){ if (Cools.isEmpty(this.createTime)){ return ""; -- Gitblit v1.9.1