|
@@ -3,13 +3,13 @@ package logic
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
"context"
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
"jyBXSubscribe/api/internal/svc"
|
|
|
"jyBXSubscribe/api/internal/types"
|
|
|
"jyBXSubscribe/rpc/type/bxsubscribe"
|
|
|
"net/http"
|
|
|
"strings"
|
|
|
-
|
|
|
- "github.com/zeromicro/go-zero/core/logx"
|
|
|
)
|
|
|
|
|
|
type SubscribeListLogic struct {
|
|
@@ -38,17 +38,22 @@ func (l *SubscribeListLogic) SubscribeList(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 {
|
|
|
- matchkeys = strings.Join(matchkeysArr, ",")
|
|
|
- } else {
|
|
|
+ if len(matchitemsArr) != 0 {
|
|
|
matchitems = strings.Join(matchitemsArr, ",")
|
|
|
}
|
|
|
+ if len(matchkeysArr) != 0 {
|
|
|
+ matchkeys = strings.Join(matchkeysArr, ",")
|
|
|
+ }
|
|
|
} else {
|
|
|
matchkeys = req.KeyWords
|
|
|
}
|