|
@@ -518,17 +518,28 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
result = []*bxsubscribe.SubscribeInfo{}
|
|
|
return
|
|
|
}
|
|
|
- if len(spqp.Staffs) == 0 && userEnt.Role_admin_department { //部门管理员 获取所有部门和子部门员工
|
|
|
+ if userEnt.Role_admin_department { //部门管理员 获取所有部门和子部门员工
|
|
|
users := GetDisUsers(common.IntAll(spqp.EntId), userEnt.Dept.Id)
|
|
|
if users != nil && len(*users) > 0 {
|
|
|
for _, v := range *users {
|
|
|
- staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
+ if len(spqp.Staffs) > 0 {
|
|
|
+ for _, vv := range spqp.Staffs {
|
|
|
+ if fmt.Sprintf("%d", v.Id) == vv {
|
|
|
+ staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ staffs = append(staffs, common.InterfaceToStr(v.Id))
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if len(staffs) == 0 {
|
|
|
log.Printf("部门管理员为获取到部门员工:%s", spqp.EntUserId)
|
|
|
result = []*bxsubscribe.SubscribeInfo{}
|
|
|
return
|
|
|
}
|
|
|
+ } else if len(spqp.Staffs) > 0 {
|
|
|
+ staffs = spqp.Staffs
|
|
|
}
|
|
|
|
|
|
// 无查询分配人员、是否已读
|