|
@@ -394,7 +394,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
var (
|
|
var (
|
|
countSql, findSql string
|
|
countSql, findSql string
|
|
)
|
|
)
|
|
- querys = append(querys, " and 1=1 ")
|
|
|
|
|
|
+ querys = append(querys, " ")
|
|
if spqp.SelectInfoIds != nil && len(spqp.SelectInfoIds) > 0 {
|
|
if spqp.SelectInfoIds != nil && len(spqp.SelectInfoIds) > 0 {
|
|
countSql = fmt.Sprintf("select count(1) as count from %s a where %s", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
|
|
countSql = fmt.Sprintf("select count(1) as count from %s a where %s", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
|
|
logx.Info("countSql", countSql)
|
|
logx.Info("countSql", countSql)
|
|
@@ -554,7 +554,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
}
|
|
}
|
|
if spqp.IsEnt {
|
|
if spqp.IsEnt {
|
|
var staffs []string
|
|
var staffs []string
|
|
- querys = append(querys, fmt.Sprintf(" a.entid='%s' ", spqp.EntId))
|
|
|
|
|
|
+ userStr += fmt.Sprintf(" and a.entid='%s' ", spqp.EntId)
|
|
//判断是企业管理员还是部门管理员 部门管理员获取所有子部门
|
|
//判断是企业管理员还是部门管理员 部门管理员获取所有子部门
|
|
userEnt := EntInfo(common.IntAll(spqp.EntId), common.IntAll(spqp.EntUserId))
|
|
userEnt := EntInfo(common.IntAll(spqp.EntId), common.IntAll(spqp.EntUserId))
|
|
if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|
|
if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
|