Răsfoiți Sursa

fix:筛选条件与字段修改

duxin 3 ani în urmă
părinte
comite
ebca0a3ca2

+ 1 - 1
jyBXBase/api/bxbase.api

@@ -77,7 +77,7 @@ type (
 		FileExists   string `json:"fileExists,optional"`  //附件
 		Notkey       string `json:"notkey,optional"`      //排除词
 		Tabularflag  string `json:"tabularflag,optional"`
-		InKey        string `json:"inKey,optional"`
+		InKey        string `json:"inkey,optional"`
 	}
 
 	//公共接口返回

+ 1 - 1
jyBXBase/api/internal/types/types.go

@@ -68,7 +68,7 @@ type AddSearchScreen struct {
 	FileExists   string `json:"fileExists,optional"`  //附件
 	Notkey       string `json:"notkey,optional"`      //排除词
 	Tabularflag  string `json:"tabularflag,optional"`
-	InKey        string `json:"inKey,optional"`
+	InKey        string `json:"inkey,optional"`
 }
 
 type CommonRes struct {

+ 14 - 4
jyBXBase/rpc/internal/logic/showsearchlogic.go

@@ -3,12 +3,12 @@ package logic
 import (
 	"app.yhyue.com/moapp/jybase/common"
 	"context"
+	"github.com/zeromicro/go-zero/core/logx"
 	"jyBXBase/rpc/bxbase"
 	IC "jyBXBase/rpc/init"
 	"jyBXBase/rpc/internal/svc"
 	"log"
-
-	"github.com/zeromicro/go-zero/core/logx"
+	"strings"
 )
 
 type ShowSearchLogic struct {
@@ -68,9 +68,9 @@ func (l *ShowSearchLogic) ShowSearch(in *bxbase.ShowSearchReq) (res *bxbase.Show
 			listSearch.Notkey = common.InterfaceToStr(vlu["not_key"])
 			listSearch.Tabularflag = common.InterfaceToStr(vlu["tabular_flag"])
 			//ppa,buyer,winner,agency
-			if (listSearch.SelectType != "title,content" && listSearch.SelectType != "title" && listSearch.SelectType != "content" && listSearch.SelectType != "content,title") ||
+			if SelectCheck(listSearch.SelectType) || listSearch.City != "" || listSearch.Notkey != "" ||
 				(listSearch.Publishtime != "lately-7" && listSearch.Publishtime != "lately-30" && listSearch.Publishtime != "thisyear") ||
-				listSearch.City != "" || listSearch.Notkey != "" || listSearch.Winnertel != "" || listSearch.Buyertel != "" || listSearch.Buyerclass != "" {
+				listSearch.Winnertel != "" || listSearch.Buyertel != "" || listSearch.Buyerclass != "" {
 				listSearch.IsPay = true
 			}
 			data = append(data, &listSearch)
@@ -79,3 +79,13 @@ func (l *ShowSearchLogic) ShowSearch(in *bxbase.ShowSearchReq) (res *bxbase.Show
 	res.Data = data
 	return res, nil
 }
+
+func SelectCheck(v string) bool {
+	vs := strings.Split(v, ",")
+	for _, v1 := range vs {
+		if v1 != "content" && v1 != "file" && v1 != "title" {
+			return true
+		}
+	}
+	return false
+}