中扬CRM客户关系管理系统
#
Junjie
2023-09-08 3041a7d6dba13e237c4f21d3e46b88c35d376bf3
src/main/java/com/zy/crm/system/entity/User.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.crm.system.service.DeptService;
import com.zy.crm.system.service.HostService;
import com.zy.crm.system.service.RoleService;
@@ -91,6 +92,11 @@
     */
    private Integer status;
    /**
     * 个人全年目标
     */
    private String target;
    public Long getId() {
        return id;
    }
@@ -125,11 +131,11 @@
    }
    public String getDeptName() {
//        DeptService service = SpringUtils.getBean(DeptService.class);
//        Dept dept = service.selectById(this.deptId);
//        if (!Cools.isEmpty(dept)){
//            return dept.getName();
//        }
        DeptService service = SpringUtils.getBean(DeptService.class);
        Dept dept = service.selectById(this.deptId);
        if (!Cools.isEmpty(dept)){
            return dept.getName();
        }
        return null;
    }
@@ -216,6 +222,15 @@
        return null;
    }
    public String getRoleCode(){
        RoleService service = SpringUtils.getBean(RoleService.class);
        Role role = service.selectById(this.roleId);
        if (!Cools.isEmpty(role)){
            return role.getCode();
        }
        return null;
    }
    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }
@@ -255,5 +270,11 @@
        this.status = status;
    }
    public String getTarget() {
        return target;
    }
    public void setTarget(String target) {
        this.target = target;
    }
}