浏览代码

搜索sql修改

WH01243 2 年之前
父节点
当前提交
663c43c8a3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      jyBXSubscribe/rpc/model/push.go

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

@@ -499,18 +499,18 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.IsEnt {
 			if spqp.Key != "" {
 				for _, v := range strings.Split(spqp.Key, ",") {
-					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(replace(a.matchkeys,'+',','),' ',','))", v))
+					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(a.matchkeys,' ',','))", v))
 				}
 			}
 			if spqp.Item != "" {
 				for _, v := range strings.Split(spqp.Item, ",") {
-					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(replace(a.matchitems,'+',','),' ',','))", v))
+					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(a.matchitems,' ',','))", v))
 				}
 			}
 		} else {
 			if spqp.Key != "" {
 				for _, v := range strings.Split(spqp.Key, ",") {
-					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(replace(a.matchkeys,'+',','),' ',','))", v))
+					find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%s',replace(a.matchkeys,' ',','))", v))
 				}
 			}
 		}