|
@@ -317,10 +317,9 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
|
|
findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
|
|
} else {
|
|
} else {
|
|
if spqp.IsEnt {
|
|
if spqp.IsEnt {
|
|
- userStr = fmt.Sprintf(" and a.entid='%s'", spqp.EntId)
|
|
|
|
|
|
+ userStr = fmt.Sprintf(" a.entid='%s'", spqp.EntId)
|
|
} else {
|
|
} else {
|
|
- userStr = fmt.Sprintf(" and a.userid='%s'", common.If(s.ModuleFlag == "eType", spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
|
-
|
|
|
|
|
|
+ userStr = fmt.Sprintf(" a.userid='%s'", common.If(s.ModuleFlag == "eType", spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
}
|
|
}
|
|
codeMap, err := IC.CodeLib.CodeTransformation(context.Background(), &codeservice.Request{})
|
|
codeMap, err := IC.CodeLib.CodeTransformation(context.Background(), &codeservice.Request{})
|
|
if codeMap.Data == nil || err != nil {
|
|
if codeMap.Data == nil || err != nil {
|
|
@@ -460,7 +459,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
querys = append(querys, fmt.Sprintf("b.isvalidfile =0 "))
|
|
querys = append(querys, fmt.Sprintf("b.isvalidfile =0 "))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- searchSql = fmt.Sprintf(" from %s a LEFT JOIN %s b ON a.infoid = b.infoid %s LEFT JOIN %s t on t.infoid = b.infoid and t.labelcode=2 where %s"+
|
|
|
|
|
|
+ searchSql = fmt.Sprintf(" from %s a LEFT JOIN %s b ON %s and a.infoid = b.infoid LEFT JOIN %s t on t.infoid = b.infoid and t.labelcode=2 where %s"+
|
|
" order by a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, userStr, BidTags, strings.Join(querys, " and "))
|
|
" order by a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, userStr, BidTags, strings.Join(querys, " and "))
|
|
logx.Info("searchSql", searchSql)
|
|
logx.Info("searchSql", searchSql)
|
|
//查询总数
|
|
//查询总数
|