瀏覽代碼

分类搜索处理

WH01243 2 年之前
父節點
當前提交
a7d2765b9a
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      jyBXSubscribe/api/internal/logic/byPushHistoryLogic.go

+ 6 - 2
jyBXSubscribe/api/internal/logic/byPushHistoryLogic.go

@@ -3,6 +3,7 @@ package logic
 import (
 	"app.yhyue.com/moapp/jybase/common"
 	"context"
+	"github.com/gogf/gf/v2/util/gconv"
 	"jyBXSubscribe/rpc/type/bxsubscribe"
 	"strings"
 
@@ -36,10 +37,13 @@ func (l *ByPushHistoryLogic) ByPushHistory(req *types.SubscribeReq) (resp *types
 	matchkeys := ""
 	if req.IsEnt {
 		for k, v := range req.Item {
-			if common.InterfaceToStr(v) == "" {
+			keyArr := gconv.Strings(v)
+			if len(keyArr) == 0 {
 				matchitemsArr = append(matchitemsArr, common.InterfaceToStr(k))
 			} else {
-				matchkeysArr = append(matchkeysArr, common.InterfaceToStr(v))
+				for _, s := range keyArr {
+					matchkeysArr = append(matchkeysArr, s)
+				}
 			}
 		}
 		if len(matchitemsArr) == 0 {