From c635d78b479510ebe2556a420948effcd30a0731 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 21 十二月 2024 18:40:43 +0800 Subject: [PATCH] 新建德森项目分支 --- zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/User.java | 282 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 141 insertions(+), 141 deletions(-) diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/User.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/User.java index 27489cc..f5fe2cc 100644 --- a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/User.java +++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/User.java @@ -1,141 +1,141 @@ -package com.zy.asrs.common.sys.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.zy.asrs.common.sys.service.HostService; -import com.zy.asrs.common.sys.service.RoleService; -import com.zy.asrs.framework.common.Cools; -import com.zy.asrs.framework.common.SpringUtils; -import lombok.Data; - -import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("sys_user") -public class User implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 缂栧彿 - */ - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 鎺堟潈鍟嗘埛 - */ - private Long hostId; - - - /** - * 鎵�灞為儴闂� - */ - private Long deptId; - - /** - * 瑙掕壊 - */ - private Long roleId; - - /** - * 璐﹀彿 - */ - private String username; - - /** - * 鍚嶇О - */ - private String nickname; - - /** - * 鎵嬫満鍙� - */ - private String mobile; - - /** - * 瀵嗙爜 - */ - private String password; - - /** - * 澶村儚 - */ - private String avatar; - - /** - * 閭 - */ - private String email; - - /** - * 鎬у埆 0: 鐢� 1: 濂� 2: 鏈煡 - */ - private Integer sex; - - /** - * 娉ㄥ唽鏃堕棿 - */ - private Date createTime; - - /** - * 鐘舵�� 1: 鍚敤 0: 绂佺敤 - */ - private Integer status; - - public String getHostName() { - HostService service = SpringUtils.getBean(HostService.class); - Host host = service.getById(this.hostId); - if (!Cools.isEmpty(host)){ - return host.getName(); - } - return null; - } - - - public String getSex$(){ - if (null == this.sex){ return null; } - switch (this.sex){ - case 0: - return "鐢�"; - case 1: - return "濂�"; - case 2: - return "鏈煡"; - default: - return String.valueOf(this.sex); - } - } - - public String getRoleName(){ - RoleService service = SpringUtils.getBean(RoleService.class); - Role role = service.getById(this.roleId); - if (!Cools.isEmpty(role)){ - return role.getName(); - } - return null; - } - - public String getCreateTime$(){ - if (Cools.isEmpty(this.createTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); - } - - public String getStatus$(){ - if (null == this.status){ return null; } - switch (this.status){ - case 1: - return "鍚敤"; - case 0: - return "绂佺敤"; - default: - return String.valueOf(this.status); - } - } - -} +package com.zy.asrs.common.sys.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.zy.asrs.common.sys.service.HostService; +import com.zy.asrs.common.sys.service.RoleService; +import com.zy.asrs.framework.common.Cools; +import com.zy.asrs.framework.common.SpringUtils; +import lombok.Data; + +import java.io.Serializable; +import java.text.SimpleDateFormat; +import java.util.Date; + +@Data +@TableName("sys_user") +public class User implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 缂栧彿 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 鎺堟潈鍟嗘埛 + */ + private Long hostId; + + + /** + * 鎵�灞為儴闂� + */ + private Long deptId; + + /** + * 瑙掕壊 + */ + private Long roleId; + + /** + * 璐﹀彿 + */ + private String username; + + /** + * 鍚嶇О + */ + private String nickname; + + /** + * 鎵嬫満鍙� + */ + private String mobile; + + /** + * 瀵嗙爜 + */ + private String password; + + /** + * 澶村儚 + */ + private String avatar; + + /** + * 閭 + */ + private String email; + + /** + * 鎬у埆 0: 鐢� 1: 濂� 2: 鏈煡 + */ + private Integer sex; + + /** + * 娉ㄥ唽鏃堕棿 + */ + private Date createTime; + + /** + * 鐘舵�� 1: 鍚敤 0: 绂佺敤 + */ + private Integer status; + + public String getHostName() { + HostService service = SpringUtils.getBean(HostService.class); + Host host = service.getById(this.hostId); + if (!Cools.isEmpty(host)){ + return host.getName(); + } + return null; + } + + + public String getSex$(){ + if (null == this.sex){ return null; } + switch (this.sex){ + case 0: + return "鐢�"; + case 1: + return "濂�"; + case 2: + return "鏈煡"; + default: + return String.valueOf(this.sex); + } + } + + public String getRoleName(){ + RoleService service = SpringUtils.getBean(RoleService.class); + Role role = service.getById(this.roleId); + if (!Cools.isEmpty(role)){ + return role.getName(); + } + return null; + } + + public String getCreateTime$(){ + if (Cools.isEmpty(this.createTime)){ + return ""; + } + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); + } + + public String getStatus$(){ + if (null == this.status){ return null; } + switch (this.status){ + case 1: + return "鍚敤"; + case 0: + return "绂佺敤"; + default: + return String.valueOf(this.status); + } + } + +} -- Gitblit v1.9.1