Selaa lähdekoodia

关键词高亮修改

WH01243 2 vuotta sitten
vanhempi
commit
704480121e
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 1 1
      jyBXBase/rpc/model/newestBidding.go
  2. 4 4
      jyBXSubscribe/rpc/model/push.go

+ 1 - 1
jyBXBase/rpc/model/newestBidding.go

@@ -55,7 +55,7 @@ func GetNewestInfo(userId, userType string, newUserId int64) *NewestInfo {
 	return nt
 }
 func (n *NewestInfo) GetPushHistory() (res []*bxbase.NewestList) {
-	findSQL := "select a.infoid,a.matchkeys,a.attachment_count,a.budget,a.bidamount from %s  a  where a.userid=%d and a.date>=%d  order by a.id desc limit 50"
+	findSQL := "select a.infoid,REPLACE(a.matchkeys,'+',' ') as matchkeys,a.attachment_count,a.budget,a.bidamount from %s  a  where a.userid=%d and a.date>=%d  order by a.id desc limit 50"
 	findSQL = fmt.Sprintf(findSQL, n.TableName, n.NewUserId, time.Now().AddDate(0, 0, -7).Unix())
 	logx.Info(n.TableName, "-------", n.NewUserId, ",findSQL:", findSQL)
 	list := n.MysqlDb.SelectBySql(findSQL)

+ 4 - 4
jyBXSubscribe/rpc/model/push.go

@@ -398,7 +398,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 	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, "','")))
 		logx.Info("countSql", countSql)
-		findSql = fmt.Sprintf("select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count from %s a  where %s order by a.date desc,a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
+		findSql = fmt.Sprintf("select a.id,a.date,a.infoid,a.isvisit,REPLACE(a.matchkeys,'+',' ') as matchkeys,a.type,a.attachment_count from %s a  where %s order by a.date desc,a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
 		//查询总数
 		count = spqp.BaseServiceMysql.CountBySql(countSql)
 	} else {
@@ -597,7 +597,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 				//查询数量(需要去重)
 				countSql = fmt.Sprintf("select count(1) from %s a  where %s  %s ", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
 				//列表查询
-				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count, IF(a.source is NULL,1,a.source) as  source  from %s a  where  %s %s order by a.date desc,a.id desc",
+				findSql = fmt.Sprintf("select a.id,a.infoid,REPLACE(a.matchkeys,'+',' ') as matchkeys,a.attachment_count, IF(a.source is NULL,1,a.source) as  source  from %s a  where  %s %s order by a.date desc,a.id desc",
 					aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
 			} else {
 				//查询分配人员或是否已读
@@ -609,7 +609,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 				}
 				countSql = fmt.Sprintf("select count(1) from %s a  where %s %s %s ", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "), staffQuery)
 				//列表查询
-				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count,IF(a.source is NULL,1,a.source) as  source from %s a  where %s %s  %s order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "), staffQuery)
+				findSql = fmt.Sprintf("select a.id,a.infoid,REPLACE(a.matchkeys,'+',' ') as matchkeys,a.attachment_count,IF(a.source is NULL,1,a.source) as  source from %s a  where %s %s  %s order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "), staffQuery)
 			}
 		} else {
 			// 是否已读
@@ -647,7 +647,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			//查询数量
 			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"
+			findSql = "select a.id,a.date,a.infoid,a.isvisit,REPLACE(a.matchkeys,'+',' ') as matchkeys,a.type,a.attachment_count"
 			if s.ModuleFlag == EntnicheFlag {
 				findSql += ", IF(a.source is NULL,1,a.source) as  source "
 			}