Explorar o código

分类搜索处理

WH01243 %!s(int64=2) %!d(string=hai) anos
pai
achega
a7d2765b9a
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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 {