From 1783ae33b2100cef5952778622b2a02dc7835f77 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 17 十二月 2025 13:13:14 +0800
Subject: [PATCH] #客户+部门
---
src/main/java/com/zy/system/entity/User.java | 44 ++++++++++++++++++++++++--------------------
1 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/zy/system/entity/User.java b/src/main/java/com/zy/system/entity/User.java
index 98d856f..1ebf235 100644
--- a/src/main/java/com/zy/system/entity/User.java
+++ b/src/main/java/com/zy/system/entity/User.java
@@ -6,6 +6,8 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import com.zy.asrs.entity.Department;
+import com.zy.asrs.service.DepartmentService;
import com.zy.system.service.HostService;
import com.zy.system.service.RoleService;
@@ -31,7 +33,6 @@
*/
@TableField("host_id")
private Long hostId;
-
/**
* 鎵�灞為儴闂�
@@ -76,7 +77,7 @@
private String email;
/**
- * 鎬у埆 0: 鐢� 1: 濂� 2: 鏈煡
+ * 鎬у埆 0: 鐢� 1: 濂� 2: 鏈煡
*/
private Integer sex;
@@ -87,7 +88,7 @@
private Date createTime;
/**
- * 鐘舵�� 1: 鍚敤 0: 绂佺敤
+ * 鐘舵�� 1: 鍚敤 0: 绂佺敤
*/
private Integer status;
@@ -110,7 +111,7 @@
public String getHostName() {
HostService service = SpringUtils.getBean(HostService.class);
Host host = service.selectById(this.hostId);
- if (!Cools.isEmpty(host)){
+ if (!Cools.isEmpty(host)) {
return host.getName();
}
return null;
@@ -125,11 +126,11 @@
}
public String getDeptName() {
-// DeptService service = SpringUtils.getBean(DeptService.class);
-// Dept dept = service.selectById(this.deptId);
-// if (!Cools.isEmpty(dept)){
-// return dept.getName();
-// }
+ DepartmentService service = SpringUtils.getBean(DepartmentService.class);
+ Department dept = service.selectById(this.deptId);
+ if (!Cools.isEmpty(dept)) {
+ return dept.getName();
+ }
return null;
}
@@ -185,9 +186,11 @@
return sex;
}
- public String getSex$(){
- if (null == this.sex){ return null; }
- switch (this.sex){
+ public String getSex$() {
+ if (null == this.sex) {
+ return null;
+ }
+ switch (this.sex) {
case 0:
return "鐢�";
case 1:
@@ -207,10 +210,10 @@
return roleId;
}
- public String getRoleName(){
+ public String getRoleName() {
RoleService service = SpringUtils.getBean(RoleService.class);
Role role = service.selectById(this.roleId);
- if (!Cools.isEmpty(role)){
+ if (!Cools.isEmpty(role)) {
return role.getName();
}
return null;
@@ -224,8 +227,8 @@
return createTime;
}
- public String getCreateTime$(){
- if (Cools.isEmpty(this.createTime)){
+ public String getCreateTime$() {
+ if (Cools.isEmpty(this.createTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
@@ -239,9 +242,11 @@
return status;
}
- public String getStatus$(){
- if (null == this.status){ return null; }
- switch (this.status){
+ public String getStatus$() {
+ if (null == this.status) {
+ return null;
+ }
+ switch (this.status) {
case 1:
return "鍚敤";
case 0:
@@ -254,6 +259,5 @@
public void setStatus(Integer status) {
this.status = status;
}
-
}
--
Gitblit v1.9.1