Browse Source

feat:用户详情新增字段

zhangxinlei1996 1 year ago
parent
commit
e888632ceb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ent/entity/user.go

+ 1 - 1
ent/entity/user.go

@@ -72,7 +72,7 @@ func (u *User) GetByPhone(phone string) *[]*User {
 
 
 //根据id获取带有角色的员工信息
 //根据id获取带有角色的员工信息
 func (u *User) GetAllInfoById(entId, userId int) *User {
 func (u *User) GetAllInfoById(entId, userId int) *User {
-	r := Mysql.SelectBySql(`SELECT a.id,a.name,a.user_name,a.phone,a.mail,c.name as dept_name,c.id as dept_id,e.name as role from entniche_user a 
+	r := Mysql.SelectBySql(`SELECT a.id,a.name,a.user_name,a.phone,a.mail,c.name as dept_name,c.id as dept_id,e.name as role,,a.niche_dis as nicheDis from entniche_user a 
 		INNER JOIN entniche_department_user b on (a.id=? and a.ent_id=? and a.id=b.user_id) 
 		INNER JOIN entniche_department_user b on (a.id=? and a.ent_id=? and a.id=b.user_id) 
 		INNER JOIN entniche_department c on (b.dept_id=c.id)
 		INNER JOIN entniche_department c on (b.dept_id=c.id)
 		LEFT JOIN entniche_user_role d on (a.id=d.user_id) 
 		LEFT JOIN entniche_user_role d on (a.id=d.user_id)