|
@@ -79,7 +79,7 @@ func (d *Department) GetUsers(entId, deptId int) *[]*User {
|
|
|
|
|
|
//获取部门下所有的员工,包含子部门
|
|
|
func (d *Department) GetAllUsers(entId, deptId int, name string) *[]*User {
|
|
|
- r := Mysql.SelectBySql(`select DISTINCT c.id,c.name,c.phone,e.name as role from entniche_department_parent a
|
|
|
+ r := Mysql.SelectBySql(`select DISTINCT c.id,c.name,c.phone,e.name as role,c.niche_dis AS nicheDis,d.role_id from entniche_department_parent a
|
|
|
INNER JOIN entniche_department_user b on (b.dept_id=? or (a.pid=? and a.id=b.dept_id))
|
|
|
INNER JOIN entniche_user c on (c.ent_id=? and b.user_id=c.id)
|
|
|
LEFT JOIN entniche_user_role d on (c.id=d.user_id)
|