Browse Source

搜索sql修改

WH01243 2 years ago
parent
commit
663c43c8a3
1 changed files with 3 additions and 3 deletions
  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))
 				}
 			}
 		}