|
@@ -593,7 +593,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
} else {
|
|
|
//查询分配人员或是否已读
|
|
|
- staffQuery := "and 1=1 "
|
|
|
+ staffQuery := " and 1=1 "
|
|
|
if len(spqp.Staffs) > 0 {
|
|
|
staffQuery += fmt.Sprintf(" and a.userid in ('%s') ", strings.Join(staffs, "','"))
|
|
|
} else if len(staffs) > 0 {
|
|
@@ -637,7 +637,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
}
|
|
|
}
|
|
|
//查询数量
|
|
|
- countSql = fmt.Sprintf("select count(1) as count from %s a where %s and %s", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
+ countSql = fmt.Sprintf("select count(1) as count from %s a where %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
//列表查询语句
|
|
|
findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count"
|
|
|
if s.ModuleFlag == EntnicheFlag {
|
|
@@ -646,7 +646,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
|
|
|
findSql += ",a.isvip"
|
|
|
}
|
|
|
- findSql = fmt.Sprintf("%s from %s a where %s and %s "+
|
|
|
+ findSql = fmt.Sprintf("%s from %s a where %s %s "+
|
|
|
" order by a.date desc,a.id desc", findSql, aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
|
|
|
}
|
|
|
//查询总数
|