|
@@ -92,7 +92,7 @@ func (c *CurrentUser) EntInfo(entId, entUserId int) *CurrentUser {
|
|
|
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_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.ent_id=g.ent_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))
|
|
|
if r != nil && len(*r) == 1 {
|
|
|
currentUser.User_name, _ = (*r)[0]["user_name"].(string)
|