|
@@ -43,7 +43,7 @@ func (l *GetViewStatusLogic) GetViewStatus(in *bxsubscribe.GetViewStatusReq) (*b
|
|
in.InfoId = util.DecodeId(in.InfoId)
|
|
in.InfoId = util.DecodeId(in.InfoId)
|
|
log.Println("查看状态参数", in)
|
|
log.Println("查看状态参数", in)
|
|
res := new(bxsubscribe.ViewStatusResp)
|
|
res := new(bxsubscribe.ViewStatusResp)
|
|
- finsql = `SELECT userid,isvisit,visittime,date,source FROM push.pushentniche where infoid =? order By date asc`
|
|
|
|
|
|
+ finsql = fmt.Sprintf(`SELECT userid,isvisit,visittime,date,source FROM push.pushentniche where entid = %s and infoid =? order By date asc`, in.EntId)
|
|
if user.Role_admin_department {
|
|
if user.Role_admin_department {
|
|
users = model.GetDisUsers(common.IntAll(in.EntId), user.Dept.Id)
|
|
users = model.GetDisUsers(common.IntAll(in.EntId), user.Dept.Id)
|
|
if users != nil && len(*users) > 0 {
|
|
if users != nil && len(*users) > 0 {
|
|
@@ -60,7 +60,7 @@ func (l *GetViewStatusLogic) GetViewStatus(in *bxsubscribe.GetViewStatusReq) (*b
|
|
users = model.GetEntUsers(common.IntAll(in.EntId))
|
|
users = model.GetEntUsers(common.IntAll(in.EntId))
|
|
}
|
|
}
|
|
if len(ss) > 0 {
|
|
if len(ss) > 0 {
|
|
- finsql = fmt.Sprintf(`SELECT userid,isvisit,visittime,date,source FROM push.pushentniche where infoid =? %s order By date asc`, fmt.Sprintf(`and userid in (%s)`, strings.Join(ss, ",")))
|
|
|
|
|
|
+ finsql = fmt.Sprintf(`SELECT userid,isvisit,visittime,date,source FROM push.pushentniche where %s infoid =? order By date asc`, fmt.Sprintf(` userid in (%s) and `, strings.Join(ss, ",")))
|
|
}
|
|
}
|
|
data := IC.BaseServiceMysql.SelectBySql(finsql, in.InfoId)
|
|
data := IC.BaseServiceMysql.SelectBySql(finsql, in.InfoId)
|
|
userMap := make(map[int]*model.User)
|
|
userMap := make(map[int]*model.User)
|