|
@@ -89,13 +89,13 @@ func (c *CurrentUser) EntInfo(entId, entUserId int) *CurrentUser {
|
|
|
} else {
|
|
|
//角色、权限
|
|
|
r := Mysql.SelectBySql(`SELECT a.name as user_name,a.power as user_power,b.role_id,d.id as dept_id,d.name as dept_name,d.subdis as dept_subdis,d.nodiff as dept_nodiff,e.id as dept_pid,g.product_type,g.start_time,g.end_time,a.niche_dis from entniche_user a
|
|
|
- LEFT JOIN entniche_user_role b on (a.id=? and a.id=b.user_id)
|
|
|
INNER JOIN entniche_department_user c on (a.id=? and a.id=c.user_id)
|
|
|
INNER JOIN entniche_department d on (c.dept_id=d.id)
|
|
|
INNER JOIN entniche_department e on (e.ent_id=? and e.pid=0)
|
|
|
+ LEFT JOIN entniche_user_role b on (a.id=? and a.id=b.user_id)
|
|
|
left join entniche_power f on (f.ent_user_id=? and f.ent_id=? and f.status=1 and a.id=f.ent_user_id)
|
|
|
left join entniche_wait_empower g on (g.ent_id=? and g.end_time>? and f.wait_empower_id=g.id)
|
|
|
- order by a.id desc limit 1`, entUserId, entUserId, entId, entUserId, entId, entId, NowFormat(Date_Full_Layout))
|
|
|
+ order by a.id desc limit 1`, entUserId, entId, entUserId, entUserId, entId, entId, NowFormat(Date_Full_Layout))
|
|
|
if r != nil && len(*r) == 1 {
|
|
|
currentUser.User_name, _ = (*r)[0]["user_name"].(string)
|
|
|
currentUser.User_power = qutil.IntAll((*r)[0]["user_power"])
|