Procházet zdrojové kódy

feat:未登录搜索在原有接口上调整

fuwencai před 1 rokem
rodič
revize
a4583c28cd

+ 0 - 9
jyBXCore/api/bxcore.api

@@ -42,13 +42,6 @@ type (
 		PositionId      string `header:"positionId,optional"`   //职位id
 		MgoUserId       string `header:"mgoUserId,optional"`    //原userId
 	}
-	noLoginSearchReq {
-		AppId      string `header:"appId"`
-		PageNum    int64  `json:"pageNum,optional"`
-		PageSize   int64  `json:"pageSize,optional"`
-		SelectType string `json:"selectType,optional"`
-		KeyWords   string `json:"keyWords,optional"`
-	}
 	//
 	commonResp {
 		Err_code int64       `json:"error_code"`
@@ -188,8 +181,6 @@ type (
 service bxcore-api {
 	@handler searchList
 	post /jybx/core/:userType/searchList(searchReq) returns (commonResp)
-	@handler nologinSearch
-	post /jybx/core/nologin/search(noLoginSearchReq) returns (commonResp)
 	@handler limitSearchContent
 	post /jybx/core/:searchType/searchLimit(searchLimitReq) returns (commonResp)
 	@handler participateShow  // 列表数据参标信息接口

+ 0 - 28
jyBXCore/api/internal/handler/nologinSearchHandler.go

@@ -1,28 +0,0 @@
-package handler
-
-import (
-	"net/http"
-
-	"github.com/zeromicro/go-zero/rest/httpx"
-	"jyBXCore/api/internal/logic"
-	"jyBXCore/api/internal/svc"
-	"jyBXCore/api/internal/types"
-)
-
-func nologinSearchHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-		var req types.NoLoginSearchReq
-		if err := httpx.Parse(r, &req); err != nil {
-			httpx.Error(w, err)
-			return
-		}
-
-		l := logic.NewNologinSearchLogic(r.Context(), svcCtx, r, w)
-		resp, err := l.NologinSearch(&req)
-		if err != nil {
-			httpx.Error(w, err)
-		} else {
-			httpx.OkJson(w, resp)
-		}
-	}
-}

+ 0 - 5
jyBXCore/api/internal/handler/routes.go

@@ -17,11 +17,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/core/:userType/searchList",
 				Handler: searchListHandler(serverCtx),
 			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/jybx/core/nologin/search",
-				Handler: nologinSearchHandler(serverCtx),
-			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/jybx/core/:searchType/searchLimit",

+ 0 - 81
jyBXCore/api/internal/logic/nologinSearchLogic.go

@@ -1,81 +0,0 @@
-package logic
-
-import (
-	"app.yhyue.com/moapp/jybase/common"
-	"context"
-	IC "jyBXCore/api/init"
-	"jyBXCore/api/internal/util"
-	"jyBXCore/rpc/bxcore"
-	"log"
-	"net/http"
-	"time"
-
-	"jyBXCore/api/internal/svc"
-	"jyBXCore/api/internal/types"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type NologinSearchLogic struct {
-	logx.Logger
-	ctx    context.Context
-	r      *http.Request
-	svcCtx *svc.ServiceContext
-	w      http.ResponseWriter
-}
-
-func NewNologinSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request, w http.ResponseWriter) *NologinSearchLogic {
-	return &NologinSearchLogic{
-		Logger: logx.WithContext(ctx),
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		r:      r,
-		w:      w,
-	}
-}
-
-func (l *NologinSearchLogic) NologinSearch(req *types.NoLoginSearchReq) (resp *types.CommonResp, err error) {
-	defer common.Catch()
-	t := time.Now()
-	res, err := l.svcCtx.BxCore.GetSearchListNoLogin(l.ctx, &bxcore.SearchReq{
-		AppId:      req.AppId,
-		PageNum:    req.PageNum,
-		PageSize:   req.PageSize,
-		SelectType: req.SelectType,
-		KeyWords:   req.KeyWords,
-		Platform:   util.CheckPlatform(l.r),
-	})
-	log.Println("请求接口耗时:", time.Since(t).Seconds())
-	if err != nil {
-		return &types.CommonResp{
-			Err_code: res.ErrCode,
-			Err_msg:  res.ErrMsg,
-			Data:     nil,
-		}, err
-	}
-	var data []map[string]interface{}
-	detailMosaicTxt := IC.C.DetailMosaicTxt
-	sm := common.StructToMapMore(IC.C.SearchMosaic)
-	for _, v := range res.Data.List {
-		d := common.StructToMapMore(v)
-		for name, t1 := range sm {
-			ts, _ := t1.(bool)
-			if !ts {
-				continue
-			}
-			d[name] = detailMosaicTxt
-			//if v1, ok := d[name]; ok && v1 != "" && v1 != 0 && ts {
-			//	d[name] = detailMosaicTxt
-			//}
-		}
-		data = append(data, d)
-	}
-	dataAll := common.StructToMapMore(res.Data)
-	dataAll["list"] = data
-	return &types.CommonResp{
-		Err_code: res.ErrCode,
-		Err_msg:  res.ErrMsg,
-		Data:     dataAll,
-	}, nil
-
-}

+ 0 - 8
jyBXCore/api/internal/types/types.go

@@ -36,14 +36,6 @@ type SearchReq struct {
 	MgoUserId       string `header:"mgoUserId,optional"`    //原userId
 }
 
-type NoLoginSearchReq struct {
-	AppId      string `header:"appId"`
-	PageNum    int64  `json:"pageNum,optional"`
-	PageSize   int64  `json:"pageSize,optional"`
-	SelectType string `json:"selectType,optional"`
-	KeyWords   string `json:"keyWords,optional"`
-}
-
 type CommonResp struct {
 	Err_code int64       `json:"error_code"`
 	Err_msg  string      `json:"error_msg"`

+ 0 - 2
jyBXCore/rpc/bxcore.proto

@@ -543,8 +543,6 @@ message TipInfo {
 service BxCore {
   //标讯搜索结果列表数据
   rpc GetSearchList(SearchReq) returns(SearchResp);
-  // 未登录用户搜索结果列表
-  rpc GetSearchListNoLogin(SearchReq) returns(SearchResp);
   //标讯搜索限制内容
   rpc SearchLimit(SearchLimitReq) returns(SearchLimitResp);
   // 列表数据参标信息接口

+ 0 - 8
jyBXCore/rpc/bxcore/bxcore.go

@@ -66,8 +66,6 @@ type (
 	BxCore interface {
 		// 标讯搜索结果列表数据
 		GetSearchList(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
-		//  未登录用户搜索结果列表
-		GetSearchListNoLogin(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
 		// 标讯搜索限制内容
 		SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error)
 		//  列表数据参标信息接口
@@ -113,12 +111,6 @@ func (m *defaultBxCore) GetSearchList(ctx context.Context, in *SearchReq, opts .
 	return client.GetSearchList(ctx, in, opts...)
 }
 
-//  未登录用户搜索结果列表
-func (m *defaultBxCore) GetSearchListNoLogin(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) {
-	client := bxcore.NewBxCoreClient(m.cli.Conn())
-	return client.GetSearchListNoLogin(ctx, in, opts...)
-}
-
 // 标讯搜索限制内容
 func (m *defaultBxCore) SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error) {
 	client := bxcore.NewBxCoreClient(m.cli.Conn())

+ 8 - 65
jyBXCore/rpc/entity/search.go

@@ -46,9 +46,16 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 	l, c := func(in *bxcore.SearchReq) (list []*bxcore.SearchList, count int64) {
 		//缓存数据总量 - 当前平台
 		redisCountKey := fmt.Sprintf(SearchCacheCount, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
-		count = int64(redis.GetInt(util.RedisNameNew, redisCountKey))
 		//缓存数据: SearchGroup-全部;招标信息;超前项目信息;kws.PageNum-当前页 免费用户 or 付费用户
 		redisDataKey := fmt.Sprintf(SearchCacheKey, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
+		if in.UserId == "" {
+			// 未登录用户查的不是一个库 缓存也分开
+			//缓存数据总量 - 当前平台
+			redisCountKey = fmt.Sprintf(SearchCacheCountNoLogin, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
+			//缓存数据: SearchGroup-全部;招标信息;超前项目信息;kws.PageNum-当前页 免费用户 or 付费用户
+			redisDataKey = fmt.Sprintf(SearchCacheNoLoginKey, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
+		}
+		count = int64(redis.GetInt(util.RedisNameNew, redisCountKey))
 		sCache, err := redis.GetNewBytes(util.RedisNameNew, redisDataKey)
 		log.Println("-------------------------redisDataKey--------------------------------:", redisDataKey)
 		if err == nil {
@@ -94,58 +101,6 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 	return
 }
 
-// 未登录用户缓存使用这个
-func (kws *KeyWordsSearch) GetBidSearchListByCacheNoLogin(in *bxcore.SearchReq, poolSwitch bool) (list []*bxcore.SearchList, count, total int64) {
-	//缓存数据 最大量是5000条  100页数据
-	l, c := func(in *bxcore.SearchReq) (list []*bxcore.SearchList, count int64) {
-		//缓存数据总量 - 当前平台
-		redisCountKey := fmt.Sprintf(SearchCacheCountNoLogin, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
-		count = int64(redis.GetInt(util.RedisNameNew, redisCountKey))
-		//缓存数据: SearchGroup-全部;招标信息;超前项目信息;kws.PageNum-当前页 免费用户 or 付费用户
-		redisDataKey := fmt.Sprintf(SearchCacheNoLoginKey, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
-		sCache, err := redis.GetNewBytes(util.RedisNameNew, redisDataKey)
-		log.Println("-------------------------redisDataKey--------------------------------:", redisDataKey)
-		if err == nil {
-			if sCache != nil && len(*sCache) > 0 {
-				err = json.Unmarshal(*sCache, &list)
-				if err == nil {
-					return
-				} else {
-					log.Println("缓存序列化异常")
-				}
-			}
-		}
-		//无缓存数据 或 缓存数据查询异常
-		//查库>存redis缓存
-		//查询缓存数据 参数初始化
-		kws.DefaultSearchParamsAuto(in)
-		//缓存数据
-		count, list = service.GetBidSearchDataNoLogin(in, true, poolSwitch)
-		if len(list) > 0 {
-			redis.Put(util.RedisNameNew, redisCountKey, count, MC.If(IC.C.DefaultSearchCacheTime > 0, IC.C.DefaultSearchCacheTime*60*60, 24*60*60).(int))
-			b, err := json.Marshal(list)
-			if err == nil {
-				redis.PutBytes(util.RedisNameNew, redisDataKey, &b, MC.If(IC.C.DefaultSearchCacheTime > 0, IC.C.DefaultSearchCacheTime*60*60, 24*60*60).(int))
-			} else {
-				log.Println("默认搜索查询结果保存redis缓存异常")
-			}
-		} else {
-			log.Println("默认搜索 暂无数据")
-		}
-		return
-	}(in)
-	if len(l) > 0 {
-		total = c
-		limitCount := int64(util.SearchMaxPageNum)
-		count = c
-		if count > limitCount {
-			count = limitCount
-		}
-		list = l[(in.PageNum-1)*in.PageSize : in.PageNum*in.PageSize]
-	}
-	return
-}
-
 // DefaultSearchParamsAuto 缓存查询条件初始化
 func (kws *KeyWordsSearch) DefaultSearchParamsAuto(in *bxcore.SearchReq) {
 	in.TopType = ""
@@ -330,18 +285,6 @@ func (kws *KeyWordsSearch) GetBidSearchList(in *bxcore.SearchReq) (count, total
 	return
 }
 
-// GetBidSearchListNoLogin 未登录非空搜索用这个
-func (kws *KeyWordsSearch) GetBidSearchListNoLogin(in *bxcore.SearchReq, poolSwitch bool) (count, total int64, list []*bxcore.SearchList) {
-	//排除异常in.PageNum参数
-	count, list = service.GetBidSearchDataNoLogin(in, false, poolSwitch)
-	total = count //返回数据总量提示信息
-	limitCount := int64(util.SearchPageSize * util.SearchMaxPageNum)
-	if count > limitCount {
-		count = limitCount //付费用户count 最多5000条,100页数据,每页50条;免费用户count 最多500条,10页数据,每页50条。
-	}
-	return
-}
-
 // 聚合搜索
 func (kws *KeyWordsSearch) PolymerizeSearch(in *bxcore.PolymerizeSearchReq) *bxcore.SearchReturn {
 	data := &bxcore.SearchReturn{}

+ 1 - 2
jyBXCore/rpc/etc/db.yaml

@@ -41,5 +41,4 @@ esNoLogin:
     size: 50
     version: v7
     userName: ""
-    password: ""
-    index: "bidding_year"
+    password: ""

+ 2 - 3
jyBXCore/rpc/internal/config/config.go

@@ -14,9 +14,8 @@ type Config struct {
 		SType    string
 		Industry string
 	}
-	DefaultSearchCacheTime        int //清除搜索列表内存缓存 间隔时间
-	DefaultSearchCacheNoLoginTime int //清除搜索列表内存缓存 未登录用户 间隔时间
-	LimitSearchText               struct {
+	DefaultSearchCacheTime int //清除搜索列表内存缓存 间隔时间
+	LimitSearchText        struct {
 		Flag       bool
 		Count      int
 		NoLogin    int

+ 26 - 1
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -41,6 +41,32 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 	}
 	//初始化搜索对象
 	ks := entity.NewKeyWordsSearch()
+	// 未登录用户只允许翻页和筛选搜索范围 其他参数无效
+	if in.UserId == "" {
+		in = &bxcore.SearchReq{
+			AppId:      in.AppId,
+			PageNum:    in.PageNum,
+			PageSize:   in.PageSize,
+			SelectType: in.SelectType,
+			KeyWords:   in.KeyWords,
+			Platform:   in.Platform,
+			UserType:   in.UserType,
+		}
+		// 搜索范围只允许筛选 标题和正文 其他的过滤掉
+		var selectType []string
+		selectTypeSplit := strings.Split(in.SelectType, ",")
+		// 未登录用户只能搜标题和正文
+		for i := 0; i < len(selectTypeSplit); i++ {
+			if selectTypeSplit[i] == "title" || selectTypeSplit[i] == "content" {
+				selectType = append(selectType, selectTypeSplit[i])
+			}
+		}
+		if len(selectType) == 0 {
+			selectType = []string{"title", "content"}
+		}
+		//
+		in.SelectType = strings.Join(selectType, ",")
+	}
 	//处理搜索条件
 	heightWords := ks.SearchParamsHandle(in)
 	if in.PageNum < 0 && in.PageSize < 0 {
@@ -83,7 +109,6 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 			in.Subtype = "招标预告,招标公告,招标结果,招标信用信息" //"拟建,招标预告,招标公告,招标结果,招标信用信息"
 		}
 	}
-
 	t := time.Now()
 	//招标信息有效查询
 	res.IsLimit = 1

+ 0 - 105
jyBXCore/rpc/internal/logic/getsearchlistnologinlogic.go

@@ -1,105 +0,0 @@
-package logic
-
-import (
-	MC "app.yhyue.com/moapp/jybase/common"
-	"context"
-	"fmt"
-	"jyBXCore/rpc/entity"
-	IC "jyBXCore/rpc/init"
-	"jyBXCore/rpc/util"
-	"log"
-	"strings"
-	"time"
-
-	"jyBXCore/rpc/internal/svc"
-	"jyBXCore/rpc/type/bxcore"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type GetSearchListNoLoginLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewGetSearchListNoLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetSearchListNoLoginLogic {
-	return &GetSearchListNoLoginLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 未登录用户搜索结果列表
-func (l *GetSearchListNoLoginLogic) GetSearchListNoLogin(in *bxcore.SearchReq) (*bxcore.SearchResp, error) {
-	defer MC.Catch()
-	res := &bxcore.SearchData{
-		Count:          0,
-		List:           []*bxcore.SearchList{},
-		InterceptLimit: int64(MC.IntAllDef(IC.C.KeywordsLimit, 35)),
-	}
-	//初始化搜索对象
-	ks := entity.NewKeyWordsSearch()
-	var selectType []string
-	selectTypeSplit := strings.Split(in.SelectType, ",")
-	// 未登录用户只能搜标题和正文
-	for i := 0; i < len(selectTypeSplit); i++ {
-		if selectTypeSplit[i] == "title" || selectTypeSplit[i] == "content" {
-			selectType = append(selectType, selectTypeSplit[i])
-		}
-	}
-	if len(selectType) == 0 {
-		selectType = []string{"title", "content"}
-	}
-	//
-	in.SelectType = strings.Join(selectType, ",")
-	//处理搜索条件
-	heightWords := ks.SearchParamsHandle(in)
-	if in.PageNum < 0 && in.PageSize < 0 {
-		return &bxcore.SearchResp{
-			Data:    res,
-			ErrMsg:  "",
-			ErrCode: 0,
-		}, nil
-	}
-	//判断是否是空搜索,如果是空搜索,查缓存数据
-	if ks.IsEmptySearch(in) {
-		res.List, res.Count, res.Total = ks.GetBidSearchListByCacheNoLogin(in, l.svcCtx.Config.NoLoginSearch.Switch)
-		return &bxcore.SearchResp{
-			Data:    res,
-			ErrMsg:  "",
-			ErrCode: 0,
-		}, nil
-	}
-
-	in.Subtype = "招标预告,招标公告,招标结果,招标信用信息" //"招标预告,招标公告,招标结果,招标信用信息"
-	in.PublishTime = fmt.Sprintf("%d-%d", time.Now().AddDate(-1, 0, 0).Unix(), time.Now().Unix())
-	t := time.Now()
-	//招标信息有效查询
-	res.IsLimit = 1
-	//查询数据
-	searchLimit := util.IsSearchLimit(strings.Split(in.SelectType, ","))
-	//全文检索限制
-	if searchLimit {
-		res.IsLimit = util.IsLimited(in.LimitFlag, in.UserId, in.UserType != "fType", in.IsNew)
-		if res.IsLimit == 1 { //没有被限制
-			defer util.Limit()
-		}
-	}
-	//无限制
-	if res.IsLimit == 1 {
-		t2 := time.Now()
-		res.Count, res.Total, res.List = ks.GetBidSearchListNoLogin(in, l.svcCtx.Config.NoLoginSearch.Switch) //util.GetBidSearchData(in)
-		log.Println("未登录查询耗时:", time.Since(t2))
-		res.KeyWords = strings.Join(heightWords, " ")
-		res.InterceptOtherWords = in.InterceptOtherWords
-		res.InterceptKeyWords = in.InterceptKeyWords
-	}
-	log.Println("关键词 -全部- 查询耗时:", time.Since(t).Seconds())
-	return &bxcore.SearchResp{
-		Data:    res,
-		ErrMsg:  "",
-		ErrCode: 0,
-	}, nil
-}

+ 0 - 6
jyBXCore/rpc/internal/server/bxcoreserver.go

@@ -28,12 +28,6 @@ func (s *BxCoreServer) GetSearchList(ctx context.Context, in *bxcore.SearchReq)
 	return l.GetSearchList(in)
 }
 
-//  未登录用户搜索结果列表
-func (s *BxCoreServer) GetSearchListNoLogin(ctx context.Context, in *bxcore.SearchReq) (*bxcore.SearchResp, error) {
-	l := logic.NewGetSearchListNoLoginLogic(ctx, s.svcCtx)
-	return l.GetSearchListNoLogin(in)
-}
-
 // 标讯搜索限制内容
 func (s *BxCoreServer) SearchLimit(ctx context.Context, in *bxcore.SearchLimitReq) (*bxcore.SearchLimitResp, error) {
 	l := logic.NewSearchLimitLogic(ctx, s.svcCtx)

+ 7 - 28
jyBXCore/rpc/model/es/es.go

@@ -25,6 +25,8 @@ const (
 	HL                      = `"highlight": {"pre_tags": [""],"post_tags": [""],"fields": {%s}}`
 	INDEX                   = "bidding"
 	TYPE                    = "bidding"
+	INDEXNoLogin            = "bidding_year"
+	TYPENoLogin             = "bidding_year"
 	BidSearchSort           = `{"dataweight":-1,"publishtime":-1}`
 	BidSearchFieldBase      = `"_id","title","publishtime","dataweight","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","spidercode","site","buyer","winner","bidopentime"` //搜索列表基础字段
 	BidSearchFieldOfVip     = BidSearchFieldBase + `,"buyertel","buyerperson","agency","agencytel","agencyperson","s_winner","winnertel","winnerperson","signendtime","bidendtime","projectinfo","entidlist"`            //付费列表字段
@@ -62,7 +64,7 @@ type SearchByES struct {
 }
 
 // GetAllByNgramWithCount  获取es查询结果及总数量
-func (e *SearchByES) GetAllByNgramWithCount() (int64, *[]map[string]interface{}) {
+func (e *SearchByES) GetAllByNgramWithCount(isLogin bool) (int64, *[]map[string]interface{}) {
 	if e.Query != "" {
 		queryStr := e.Query
 		if e.HighLight {
@@ -82,34 +84,11 @@ func (e *SearchByES) GetAllByNgramWithCount() (int64, *[]map[string]interface{})
 			queryStr = queryStr[:len(queryStr)-1] + `,"from":` + strconv.Itoa(e.Start) + `,"size":` + strconv.Itoa(e.Limit) + "}"
 		}
 		log.Println("queryStr:", queryStr)
-		return elastic.GetWithCount(e.Index, e.IType, e.Query, queryStr)
-	} else {
-		return 0, nil
-	}
-}
-
-// GetAllByNgramWithCountNoLogin 获取es查询结果及总数量 未登录用户用这个
-func (e *SearchByES) GetAllByNgramWithCountNoLogin() (int64, *[]map[string]interface{}) {
-	if e.Query != "" {
-		queryStr := e.Query
-		if e.HighLight {
-			var ws []string
-			for _, w := range strings.Split(e.FindFields, ",") {
-				ws = append(ws, fmt.Sprintf(HighlightStr, w, e.Count))
-			}
-			queryStr = queryStr[:len(queryStr)-1] + `,` + fmt.Sprintf(HL, strings.Join(ws, ",")) + `}`
-		}
-		if len(e.Fields) > 0 {
-			queryStr = queryStr[:len(queryStr)-1] + `,"_source":[` + e.Fields + "]}"
+		if isLogin {
+			return elastic.GetWithCount(e.Index, e.IType, e.Query, queryStr)
+		} else {
+			return IC.NoLoginEs.GetWithCount(e.Index, e.IType, e.Query, queryStr)
 		}
-		if len(e.Order) > 0 {
-			queryStr = queryStr[:len(queryStr)-1] + `,"sort":[` + SR(SR(SR(SR(e.Order, ",", "},{", -1), " ", "", -1), ":-1", `:"desc"`, -1), ":1", `:"asc"`, -1) + `]}`
-		}
-		if e.Start > -1 {
-			queryStr = queryStr[:len(queryStr)-1] + `,"from":` + strconv.Itoa(e.Start) + `,"size":` + strconv.Itoa(e.Limit) + "}"
-		}
-		log.Println("queryStr:", queryStr)
-		return IC.NoLoginEs.GetWithCount(e.Index, e.IType, e.Query, queryStr)
 	} else {
 		return 0, nil
 	}

+ 15 - 47
jyBXCore/rpc/service/search.go

@@ -43,8 +43,8 @@ func GetBidSearchData(in *bxcore.SearchReq, isCache bool) (count int64, list []*
 			fields = fields + es.BidSearchFieldFile
 		}
 		biddingSearch := es.SearchByES{
-			Index:      es.INDEX,
-			IType:      es.TYPE,
+			Index:      MC.If(in.UserId == "", es.INDEXNoLogin, es.INDEX).(string),
+			IType:      MC.If(in.UserId == "", es.TYPENoLogin, es.TYPE).(string),
 			Query:      es.GetSearchQuery(in, es.GetBidSearchQuery(in)),
 			FindFields: MC.If(isCache, "title", "detail").(string),
 			Order:      es.BidSearchSort,
@@ -55,54 +55,23 @@ func GetBidSearchData(in *bxcore.SearchReq, isCache bool) (count int64, list []*
 			HighLight:  MC.If(strings.Contains(in.SelectType, "detail"), true, false).(bool), //是否高亮正文
 		}
 		var repl *[]map[string]interface{}
-		count, repl = biddingSearch.GetAllByNgramWithCount()
-		if repl != nil && *repl != nil && len(*repl) > 0 {
-			//格式化查询结果
-			list = util.SearchListFormat(in.UserId, in.Industry, repl, strings.Contains(in.SelectType, "detail"))
+		if in.UserId != "" {
+			count, repl = biddingSearch.GetAllByNgramWithCount(true)
 		} else {
-			log.Println("查询数据异常")
-		}
-		log.Println(in.KeyWords, "关键词 -1- 查询耗时:", time.Since(t).Seconds())
-	}
-	return
-}
-
-// GetBidSearchDataNoLogin 未登录用户用这个搜索
-func GetBidSearchDataNoLogin(in *bxcore.SearchReq, isCache bool, poolSwitch bool) (count int64, list []*bxcore.SearchList) {
-	var start = int((in.PageNum - 1) * in.PageSize)
-	if start >= 0 {
-		t := time.Now()
-		fields := es.BidSearchFieldBase
-		//IC.C.FileSignBool列表是否显示附件开关
-		if IC.C.FileSignBool {
-			fields = fields + es.BidSearchFieldFile
-		}
-		biddingSearch := es.SearchByES{
-			Index:      es.INDEX,
-			IType:      es.TYPE,
-			Query:      es.GetSearchQuery(in, es.GetBidSearchQuery(in)),
-			FindFields: MC.If(isCache, "title", "detail").(string),
-			Order:      es.BidSearchSort,
-			Fields:     fields,
-			Start:      MC.If(isCache, 0, start).(int),
-			Limit:      MC.If(isCache, MC.If(in.IsPay, IC.C.DefaultBidInfo.PayCount, IC.C.DefaultBidInfo.Count).(int), int(in.PageSize)).(int),
-			Count:      MC.If(strings.Contains(in.SelectType, "detail"), 115, 0).(int),       //高亮正文数量
-			HighLight:  MC.If(strings.Contains(in.SelectType, "detail"), true, false).(bool), //是否高亮正文
-		}
-		var repl *[]map[string]interface{}
-		if poolSwitch {
-			if flag := IC.ReqLimitInit.Limit(context.Background()); flag == 1 {
-				defer IC.ReqLimitInit.Release()
-			} else {
-				if flag == -2 {
-					log.Println("等待队列已满")
-				} else if flag == -1 {
-					log.Println("等待超时")
+			if IC.C.NoLoginSearch.Switch {
+				if flag := IC.ReqLimitInit.Limit(context.Background()); flag == 1 {
+					defer IC.ReqLimitInit.Release()
+				} else {
+					if flag == -2 {
+						log.Println("等待队列已满")
+					} else if flag == -1 {
+						log.Println("等待超时")
+					}
+					return 0, nil
 				}
-				return 0, nil
 			}
+			count, repl = biddingSearch.GetAllByNgramWithCount(false)
 		}
-		count, repl = biddingSearch.GetAllByNgramWithCountNoLogin()
 		if repl != nil && *repl != nil && len(*repl) > 0 {
 			//格式化查询结果
 			list = util.SearchListFormat(in.UserId, in.Industry, repl, strings.Contains(in.SelectType, "detail"))
@@ -113,7 +82,6 @@ func GetBidSearchDataNoLogin(in *bxcore.SearchReq, isCache bool, poolSwitch bool
 	}
 	return
 }
-
 func EntSearch(searchCode string) ([]*bxcore.Search, int64) {
 	data := make([]*bxcore.Search, 0, 0)
 	count := int64(0)

+ 88 - 94
jyBXCore/rpc/type/bxcore/bxcore.pb.go

@@ -5927,81 +5927,77 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79,
 	0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70,
 	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x32, 0xff, 0x08,
+	0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x32, 0xc0, 0x08,
 	0x0a, 0x06, 0x42, 0x78, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53,
 	0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x62, 0x78, 0x63, 0x6f,
 	0x72, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62,
 	0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x3d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x73,
-	0x74, 0x4e, 0x6f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72,
-	0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62, 0x78,
-	0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x3e, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16,
-	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69,
-	0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e,
-	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x49, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x68,
-	0x6f, 0x77, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74,
-	0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x1a,
+	0x12, 0x3e, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12,
+	0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c,
+	0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65,
+	0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x49, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53,
+	0x68, 0x6f, 0x77, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72,
+	0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a,
+	0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
+	0x70, 0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x50,
+	0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a,
 	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
-	0x61, 0x74, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x50, 0x61,
-	0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e,
-	0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
-	0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x49, 0x6e,
-	0x66, 0x6f, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,
-	0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72,
-	0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70,
-	0x64, 0x61, 0x74, 0x65, 0x42, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
-	0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x43,
-	0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+	0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63,
+	0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+	0x42, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f,
+	0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55,
+	0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+	0x73, 0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65,
+	0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65,
+	0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74,
+	0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e,
 	0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65,
-	0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50,
-	0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
-	0x74, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
-	0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x78, 0x63,
+	0x6e, 0x74, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
+	0x70, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x78,
+	0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65,
+	0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x62, 0x78, 0x63,
 	0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x52,
-	0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x52, 0x65,
-	0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74,
-	0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x1d,
+	0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x12, 0x50, 0x61, 0x72,
+	0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12,
+	0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
+	0x70, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1d,
 	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
-	0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e,
-	0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
-	0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14,
-	0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61,
-	0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70, 0x49, 0x6e,
-	0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+	0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x12, 0x58, 0x0a,
+	0x14, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55,
+	0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50,
 	0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70, 0x49,
-	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63,
-	0x69, 0x70, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x62, 0x78,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+	0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70,
+	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69,
+	0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74,
+	0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x63,
+	0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x41,
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74,
+	0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x78,
 	0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65,
-	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x41, 0x63,
-	0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x69,
-	0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x63,
-	0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e,
-	0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65,
+	0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74,
+	0x52, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69,
+	0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53,
+	0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
+	0x1a, 0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74,
+	0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x12,
+	0x50, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
 	0x74, 0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74,
 	0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a,
-	0x1d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61,
-	0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x12, 0x50,
-	0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
-	0x69, 0x63, 0x73, 0x12, 0x19, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x61,
-	0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20,
-	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53,
-	0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
-	0x12, 0x4d, 0x0a, 0x10, 0x50, 0x6f, 0x6c, 0x79, 0x6d, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65,
-	0x61, 0x72, 0x63, 0x68, 0x12, 0x1b, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f,
-	0x6c, 0x79, 0x6d, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
-	0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x6d,
-	0x65, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x42,
-	0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0x20, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+	0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65,
+	0x73, 0x12, 0x4d, 0x0a, 0x10, 0x50, 0x6f, 0x6c, 0x79, 0x6d, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x53,
+	0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1b, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+	0x6f, 0x6c, 0x79, 0x6d, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52,
+	0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x6c, 0x79,
+	0x6d, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
+	0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -6097,37 +6093,35 @@ var file_bxcore_proto_depIdxs = []int32{
 	46, // 25: bxcore.SearchMap.data:type_name -> bxcore.Search
 	48, // 26: bxcore.MenuList.tipInfo:type_name -> bxcore.TipInfo
 	0,  // 27: bxcore.BxCore.GetSearchList:input_type -> bxcore.SearchReq
-	0,  // 28: bxcore.BxCore.GetSearchListNoLogin:input_type -> bxcore.SearchReq
-	6,  // 29: bxcore.BxCore.SearchLimit:input_type -> bxcore.SearchLimitReq
-	8,  // 30: bxcore.BxCore.ParticipateShow:input_type -> bxcore.ParticipateShowReq
-	11, // 31: bxcore.BxCore.ParticipateInfo:input_type -> bxcore.ParticipateInfoReq
-	14, // 32: bxcore.BxCore.UpdateBidStatus:input_type -> bxcore.UpdateBidStatusReq
-	16, // 33: bxcore.BxCore.ParticipateContent:input_type -> bxcore.ParticipateContentReq
-	19, // 34: bxcore.BxCore.ParticipateRecords:input_type -> bxcore.ParticipateRecordsReq
-	23, // 35: bxcore.BxCore.ParticipatePersons:input_type -> bxcore.ParticipatePersonsReq
-	26, // 36: bxcore.BxCore.ParticipateSetUpInfo:input_type -> bxcore.ParticipateSetUpInfoReq
-	31, // 37: bxcore.BxCore.ParticipateAction:input_type -> bxcore.ParticipateActionReq
-	33, // 38: bxcore.BxCore.ParticipateList:input_type -> bxcore.ParticipateListReq
-	37, // 39: bxcore.BxCore.PushStatistics:input_type -> bxcore.StatisticsListReq
-	37, // 40: bxcore.BxCore.ProjectStatistics:input_type -> bxcore.StatisticsListReq
-	42, // 41: bxcore.BxCore.PolymerizeSearch:input_type -> bxcore.PolymerizeSearchReq
-	1,  // 42: bxcore.BxCore.GetSearchList:output_type -> bxcore.SearchResp
-	1,  // 43: bxcore.BxCore.GetSearchListNoLogin:output_type -> bxcore.SearchResp
-	7,  // 44: bxcore.BxCore.SearchLimit:output_type -> bxcore.SearchLimitResp
-	10, // 45: bxcore.BxCore.ParticipateShow:output_type -> bxcore.ParticipateShowRes
-	13, // 46: bxcore.BxCore.ParticipateInfo:output_type -> bxcore.ParticipateInfoRes
-	15, // 47: bxcore.BxCore.UpdateBidStatus:output_type -> bxcore.UpdateBidStatusRes
-	18, // 48: bxcore.BxCore.ParticipateContent:output_type -> bxcore.ParticipateContentRes
-	22, // 49: bxcore.BxCore.ParticipateRecords:output_type -> bxcore.ParticipateRecordsRes
-	25, // 50: bxcore.BxCore.ParticipatePersons:output_type -> bxcore.ParticipatePersonsRes
-	30, // 51: bxcore.BxCore.ParticipateSetUpInfo:output_type -> bxcore.ParticipateSetUpInfoRes
-	32, // 52: bxcore.BxCore.ParticipateAction:output_type -> bxcore.ParticipateActionRes
-	36, // 53: bxcore.BxCore.ParticipateList:output_type -> bxcore.ParticipateListRes
-	38, // 54: bxcore.BxCore.PushStatistics:output_type -> bxcore.PushStatisticsDataRes
-	40, // 55: bxcore.BxCore.ProjectStatistics:output_type -> bxcore.ProjectStatisticsDataRes
-	43, // 56: bxcore.BxCore.PolymerizeSearch:output_type -> bxcore.PolymerizeSearchResp
-	42, // [42:57] is the sub-list for method output_type
-	27, // [27:42] is the sub-list for method input_type
+	6,  // 28: bxcore.BxCore.SearchLimit:input_type -> bxcore.SearchLimitReq
+	8,  // 29: bxcore.BxCore.ParticipateShow:input_type -> bxcore.ParticipateShowReq
+	11, // 30: bxcore.BxCore.ParticipateInfo:input_type -> bxcore.ParticipateInfoReq
+	14, // 31: bxcore.BxCore.UpdateBidStatus:input_type -> bxcore.UpdateBidStatusReq
+	16, // 32: bxcore.BxCore.ParticipateContent:input_type -> bxcore.ParticipateContentReq
+	19, // 33: bxcore.BxCore.ParticipateRecords:input_type -> bxcore.ParticipateRecordsReq
+	23, // 34: bxcore.BxCore.ParticipatePersons:input_type -> bxcore.ParticipatePersonsReq
+	26, // 35: bxcore.BxCore.ParticipateSetUpInfo:input_type -> bxcore.ParticipateSetUpInfoReq
+	31, // 36: bxcore.BxCore.ParticipateAction:input_type -> bxcore.ParticipateActionReq
+	33, // 37: bxcore.BxCore.ParticipateList:input_type -> bxcore.ParticipateListReq
+	37, // 38: bxcore.BxCore.PushStatistics:input_type -> bxcore.StatisticsListReq
+	37, // 39: bxcore.BxCore.ProjectStatistics:input_type -> bxcore.StatisticsListReq
+	42, // 40: bxcore.BxCore.PolymerizeSearch:input_type -> bxcore.PolymerizeSearchReq
+	1,  // 41: bxcore.BxCore.GetSearchList:output_type -> bxcore.SearchResp
+	7,  // 42: bxcore.BxCore.SearchLimit:output_type -> bxcore.SearchLimitResp
+	10, // 43: bxcore.BxCore.ParticipateShow:output_type -> bxcore.ParticipateShowRes
+	13, // 44: bxcore.BxCore.ParticipateInfo:output_type -> bxcore.ParticipateInfoRes
+	15, // 45: bxcore.BxCore.UpdateBidStatus:output_type -> bxcore.UpdateBidStatusRes
+	18, // 46: bxcore.BxCore.ParticipateContent:output_type -> bxcore.ParticipateContentRes
+	22, // 47: bxcore.BxCore.ParticipateRecords:output_type -> bxcore.ParticipateRecordsRes
+	25, // 48: bxcore.BxCore.ParticipatePersons:output_type -> bxcore.ParticipatePersonsRes
+	30, // 49: bxcore.BxCore.ParticipateSetUpInfo:output_type -> bxcore.ParticipateSetUpInfoRes
+	32, // 50: bxcore.BxCore.ParticipateAction:output_type -> bxcore.ParticipateActionRes
+	36, // 51: bxcore.BxCore.ParticipateList:output_type -> bxcore.ParticipateListRes
+	38, // 52: bxcore.BxCore.PushStatistics:output_type -> bxcore.PushStatisticsDataRes
+	40, // 53: bxcore.BxCore.ProjectStatistics:output_type -> bxcore.ProjectStatisticsDataRes
+	43, // 54: bxcore.BxCore.PolymerizeSearch:output_type -> bxcore.PolymerizeSearchResp
+	41, // [41:55] is the sub-list for method output_type
+	27, // [27:41] is the sub-list for method input_type
 	27, // [27:27] is the sub-list for extension type_name
 	27, // [27:27] is the sub-list for extension extendee
 	0,  // [0:27] is the sub-list for field type_name

+ 0 - 38
jyBXCore/rpc/type/bxcore/bxcore_grpc.pb.go

@@ -24,8 +24,6 @@ const _ = grpc.SupportPackageIsVersion7
 type BxCoreClient interface {
 	//标讯搜索结果列表数据
 	GetSearchList(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
-	// 未登录用户搜索结果列表
-	GetSearchListNoLogin(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
 	//标讯搜索限制内容
 	SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error)
 	// 列表数据参标信息接口
@@ -71,15 +69,6 @@ func (c *bxCoreClient) GetSearchList(ctx context.Context, in *SearchReq, opts ..
 	return out, nil
 }
 
-func (c *bxCoreClient) GetSearchListNoLogin(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error) {
-	out := new(SearchResp)
-	err := c.cc.Invoke(ctx, "/bxcore.BxCore/GetSearchListNoLogin", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *bxCoreClient) SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error) {
 	out := new(SearchLimitResp)
 	err := c.cc.Invoke(ctx, "/bxcore.BxCore/SearchLimit", in, out, opts...)
@@ -203,8 +192,6 @@ func (c *bxCoreClient) PolymerizeSearch(ctx context.Context, in *PolymerizeSearc
 type BxCoreServer interface {
 	//标讯搜索结果列表数据
 	GetSearchList(context.Context, *SearchReq) (*SearchResp, error)
-	// 未登录用户搜索结果列表
-	GetSearchListNoLogin(context.Context, *SearchReq) (*SearchResp, error)
 	//标讯搜索限制内容
 	SearchLimit(context.Context, *SearchLimitReq) (*SearchLimitResp, error)
 	// 列表数据参标信息接口
@@ -241,9 +228,6 @@ type UnimplementedBxCoreServer struct {
 func (UnimplementedBxCoreServer) GetSearchList(context.Context, *SearchReq) (*SearchResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetSearchList not implemented")
 }
-func (UnimplementedBxCoreServer) GetSearchListNoLogin(context.Context, *SearchReq) (*SearchResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetSearchListNoLogin not implemented")
-}
 func (UnimplementedBxCoreServer) SearchLimit(context.Context, *SearchLimitReq) (*SearchLimitResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SearchLimit not implemented")
 }
@@ -314,24 +298,6 @@ func _BxCore_GetSearchList_Handler(srv interface{}, ctx context.Context, dec fun
 	return interceptor(ctx, in, info, handler)
 }
 
-func _BxCore_GetSearchListNoLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(SearchReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(BxCoreServer).GetSearchListNoLogin(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/bxcore.BxCore/GetSearchListNoLogin",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(BxCoreServer).GetSearchListNoLogin(ctx, req.(*SearchReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _BxCore_SearchLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(SearchLimitReq)
 	if err := dec(in); err != nil {
@@ -577,10 +543,6 @@ var BxCore_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetSearchList",
 			Handler:    _BxCore_GetSearchList_Handler,
 		},
-		{
-			MethodName: "GetSearchListNoLogin",
-			Handler:    _BxCore_GetSearchListNoLogin_Handler,
-		},
 		{
 			MethodName: "SearchLimit",
 			Handler:    _BxCore_SearchLimit_Handler,

+ 79 - 0
jyBXCore/rpc/util/search.go

@@ -264,6 +264,85 @@ func SearchListFormat(userid, industry string, repl *[]map[string]interface{}, b
 	}
 	return
 }
+func SearchListFormatNoLogin(userid, industry string, repl *[]map[string]interface{}, b bool) (list []*bxcore.SearchList) {
+	for _, v := range *repl {
+		var searchList = &bxcore.SearchList{}
+		//正文
+		if b {
+			//正文匹配检索关键词
+			highlight, _ := v["highlight"].(map[string][]string)
+			detail := ""
+			for _, val := range highlight["detail"] {
+				detail += ClearHtml.ReplaceAllString(val, "")
+			}
+			searchList.Detail = detail
+		}
+		searchList.Id = ME.EncodeArticleId2ByCheck(MC.ObjToString(v["_id"]))                                    //ME.EncodeArticleId2ByCheck(MC.ObjToString(v["_id"]))                                         //加密信息id
+		searchList.Area = MC.ObjToString(v["area"])                                                             //地区
+		searchList.AreaUrl = IC.LabelMap[searchList.Area].Url                                                   //地区分类链接
+		searchList.BuyerClass = MC.ObjToString(v["buyerclass"])                                                 //采购单位类型
+		searchList.City = MC.ObjToString(v["city"])                                                             //城市
+		searchList.Industry = IndustryFormat(industry, strings.Trim(MC.ObjToString(v["s_subscopeclass"]), ",")) //行业
+		searchList.IndustryUrl = IC.LabelMap[searchList.Industry].Url                                           //行业分类地址
+		searchList.PublishTime = MC.Int64All(v["publishtime"])                                                  //发布时间
+		searchList.FileExists, _ = v["isValidFile"].(bool)                                                      //是否有附件
+		searchList.Subtype = MC.ObjToString(v["subtype"])                                                       //信息类型
+		searchList.SubtypeUrl = IC.LabelMap[searchList.Subtype].Url                                             //信息类型分类链接
+		searchList.Title = MC.ObjToString(v["title"])                                                           //标题
+		searchList.ProjectName = MC.ObjToString(v["projectname"])                                               //项目名称
+		searchList.ProjectCode = MC.ObjToString(v["projectcode"])                                               //项目代码
+		if budget, ok := v["budget"].(float64); ok && budget > 0 {                                              //预算
+			searchList.Budget = int64(budget)
+		}
+		if bidAmount, ok := v["bidamount"].(float64); ok && bidAmount > 0 { //中标金额
+			searchList.BidAmount = int64(bidAmount)
+		}
+		searchList.Buyer = MC.ObjToString(v["buyer"])               //采购单位
+		searchList.BuyerTel = MC.ObjToString(v["buyertel"])         //采购单位联系方式
+		searchList.BuyerPerson = MC.ObjToString(v["buyerperson"])   //采购单位联系人
+		searchList.Agency = MC.ObjToString(v["agency"])             //代理机构
+		searchList.AgencyTel = MC.ObjToString(v["agencytel"])       //代理机构联系电话
+		searchList.AgencyPerson = MC.ObjToString(v["agencyperson"]) //代理机构联系人
+		searchList.BidOpenTime = MC.Int64All(v["bidopentime"])      //开标时间
+		searchList.BidEndTime = MC.Int64All(v["bidendtime"])        //发布时间
+		searchList.SignEndTime = MC.Int64All(v["signendtime"])      //投标截止日期
+		searchList.Site = MC.ObjToString(v["site"])                 //网站来源名称
+		searchList.SpiderCode = MC.ObjToString(v["spidercode"])     //网站来源代码
+		searchList.Winner = MC.ObjToString(v["winner"])             //中标企业
+		winnerList := MC.ObjToString(v["s_winner"])                 //中标企业名称集合
+		if winnerList != "" && len(strings.Split(winnerList, ",")) > 0 {
+			for wk, wv := range strings.Split(winnerList, ",") {
+				var (
+					winnerId = ""
+				)
+				if v["entidlist"] != nil {
+					if entIdList := MC.ObjArrToStringArr(v["entidlist"].([]interface{})); len(entIdList) > wk { //中标企业id集合
+						winnerId = entIdList[wk]
+					}
+				}
+				searchList.WinnerInfo = append(searchList.WinnerInfo, &bxcore.WinnerInfo{
+					Winner:       wv,                                                                                                     //中标企业 需要单独处理
+					WinnerTel:    MC.ObjToString(v["winnertel"]),                                                                         //中标企业联系电话
+					WinnerPerson: MC.ObjToString(v["winnerperson"]),                                                                      //中标企业联系人
+					WinnerId:     MC.If(winnerId != "" && len([]rune(winnerId)) > 12, ME.EncodeArticleId2ByCheck(winnerId), "").(string), //中标企业加密id  存在winnerId 异常的情况
+				})
+			}
+		}
+		searchList.ProjectInfo = &bxcore.PInfo{} //拟建项目信息
+		if v["projectinfo"] != nil {
+			pInfo := MC.ObjToMap(v["projectinfo"])
+			searchList.ProjectInfo.ApproveCode = MC.ObjToString((*pInfo)["approvecode"])
+			searchList.ProjectInfo.ApproveContent = MC.ObjToString((*pInfo)["approvecontent"])
+			searchList.ProjectInfo.ApproveDept = MC.ObjToString((*pInfo)["approvedept"])
+			searchList.ProjectInfo.ApproveStatus = MC.ObjToString((*pInfo)["approvestatus"])
+			searchList.ProjectInfo.ProjectType = MC.ObjToString((*pInfo)["projecttype"])
+			searchList.ProjectInfo.ApproveNumber = MC.ObjToString((*pInfo)["approvenumber"])
+			searchList.ProjectInfo.ApproveTime = MC.ObjToString((*pInfo)["approvetime"])
+		}
+		list = append(list, searchList)
+	}
+	return
+}
 
 // IsOptimize 付费用户搜索优化
 // 需求来源:付费用户 默认查询 五年内数据,数据查询耗时,