浏览代码

Merge branch 'master' of http://192.168.3.207:8080/BaseService/jyMicroservices

duxin 3 年之前
父节点
当前提交
a1913d7f75
共有 37 个文件被更改,包括 550 次插入338 次删除
  1. 5 4
      jyBXBase/api/bxbase.api
  2. 2 0
      jyBXBase/api/etc/bxbase-api.yaml
  3. 5 4
      jyBXBase/api/internal/logic/newestBiddingLogic.go
  4. 5 4
      jyBXBase/api/internal/types/types.go
  5. 3 0
      jyBXBase/rpc/bxbase.proto
  6. 1 0
      jyBXBase/rpc/etc/bxbase.yaml
  7. 1 1
      jyBXBase/rpc/etc/db.yaml
  8. 42 6
      jyBXBase/rpc/internal/logic/newestbiddinglogic.go
  9. 39 0
      jyBXBase/rpc/model/collectionInfo.go
  10. 44 19
      jyBXBase/rpc/model/newestBidding.go
  11. 131 102
      jyBXBase/rpc/type/bxbase/bxbase.pb.go
  12. 2 1
      jyBXBuyer/api/etc/bxbuyer-api.yaml
  13. 1 0
      jyBXBuyer/rpc/bxbuyer.proto
  14. 1 0
      jyBXBuyer/rpc/etc/bxbuyer.yaml
  15. 1 1
      jyBXBuyer/rpc/etc/db.yaml
  16. 14 7
      jyBXBuyer/rpc/model/buyerListBYEs.go
  17. 17 8
      jyBXBuyer/rpc/type/bxbuyer/bxbuyer.pb.go
  18. 2 2
      jyBXCore/api/bxcore.api
  19. 3 1
      jyBXCore/api/etc/bxcore-api.yaml
  20. 4 0
      jyBXCore/api/internal/logic/searchListLogic.go
  21. 2 2
      jyBXCore/api/internal/types/types.go
  22. 2 2
      jyBXCore/go.mod
  23. 4 3
      jyBXCore/go.sum
  24. 7 4
      jyBXCore/rpc/bxcore.proto
  25. 2 0
      jyBXCore/rpc/etc/bxcore.yaml
  26. 1 1
      jyBXCore/rpc/etc/db.yaml
  27. 1 0
      jyBXCore/rpc/internal/config/config.go
  28. 14 4
      jyBXCore/rpc/internal/logic/getsearchlistlogic.go
  29. 64 33
      jyBXCore/rpc/type/bxcore/bxcore.pb.go
  30. 24 28
      jyBXCore/rpc/util/search.go
  31. 3 0
      jyBXCore/rpc/util/userInfo.go
  32. 2 0
      jyBXSubscribe/api/etc/bxsubscribe-api.yaml
  33. 1 1
      jyBXSubscribe/rpc/bxsubscribe.proto
  34. 1 0
      jyBXSubscribe/rpc/etc/bxsubscribe.yaml
  35. 5 1
      jyBXSubscribe/rpc/etc/db.yaml
  36. 82 82
      jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go
  37. 12 17
      jyBXSubscribe/rpc/util/push.go

+ 5 - 4
jyBXBase/api/bxbase.api

@@ -90,10 +90,11 @@ type (
 	}
 	//首页最新招标信息
 	NewestReq {
-		City     string `json:"city,optional"`     //定位城市
-		IsSearch int64  `json:"isSearch,optional"` //是否根据定位查询es
-		UserId   string `header:"userId,optional"` //用户id
-		AppId    string `header:"appId"`           //appId
+		City      string `json:"city,optional"`        //定位城市
+		IsSearch  int64  `json:"isSearch,optional"`    //是否根据定位查询es
+		UserId    string `header:"userId,optional"`    //用户id
+		AppId     string `header:"appId"`              //appId
+		EntUserId string `header:"entUserId,optional"` //商机管理用户 用户id:entUserId
 	}
 	//公共接口返回
 	CommonRes {

+ 2 - 0
jyBXBase/api/etc/bxbase-api.yaml

@@ -1,6 +1,7 @@
 Name: bxbase-api
 Host: 0.0.0.0
 Port: 8006
+Timeout: 8000
 Gateway:
   ServerCode: jybxbase
   Etcd:
@@ -10,6 +11,7 @@ BxBase:
     Hosts:
       - 127.0.0.1:2379
     Key: bxbase.rpc
+  Timeout: 8000
 Webrpcport: 8016
 MgoLogsName: jybxbase_logs
 MgoLogsCount: 500

+ 5 - 4
jyBXBase/api/internal/logic/newestBiddingLogic.go

@@ -30,10 +30,11 @@ func NewNewestBiddingLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *h
 
 func (l *NewestBiddingLogic) NewestBidding(req *types.NewestReq) (resp *types.CommonRes, err error) {
 	res, err0 := l.svcCtx.Bxbase.NewestBidding(l.ctx, &bxbase.NewestBiddingReq{
-		UserId:   req.UserId,
-		AppId:    req.AppId,
-		City:     req.City,
-		IsSearch: req.IsSearch,
+		UserId:    req.UserId,
+		AppId:     req.AppId,
+		City:      req.City,
+		IsSearch:  req.IsSearch,
+		EntUserId: req.EntUserId,
 	})
 	if err0 != nil {
 		return &types.CommonRes{

+ 5 - 4
jyBXBase/api/internal/types/types.go

@@ -81,10 +81,11 @@ type AddSearchScreen struct {
 }
 
 type NewestReq struct {
-	City     string `json:"city,optional"`     //定位城市
-	IsSearch int64  `json:"isSearch,optional"` //是否根据定位查询es
-	UserId   string `header:"userId,optional"` //用户id
-	AppId    string `header:"appId"`           //appId
+	City      string `json:"city,optional"`        //定位城市
+	IsSearch  int64  `json:"isSearch,optional"`    //是否根据定位查询es
+	UserId    string `header:"userId,optional"`    //用户id
+	AppId     string `header:"appId"`              //appId
+	EntUserId string `header:"entUserId,optional"` //商机管理用户 用户id:entUserId
 }
 
 type CommonRes struct {

+ 3 - 0
jyBXBase/rpc/bxbase.proto

@@ -172,6 +172,7 @@ message NewestBiddingReq{
   int64 isSearch = 2;
   string  userId = 3;
   string  appId = 4;
+  string  entUserId = 5;
 }
 
 //首页最新招标信息Resp
@@ -187,6 +188,7 @@ message NewsetBidding{
   int64 count = 4;//数据长度
   repeated newestList list = 5;//数据
   repeated  string  history = 6;//历史数据
+  string subFlag = 7;//当前用户订阅信息属性:m:大会员;e:商机管理;v:VIP;f:普通用户
 }
 
 //
@@ -204,6 +206,7 @@ message newestList {
   string  appId = 11;
   string id = 12;//招标信息id
   bool fileExists = 13;//是否有附件
+  bool  isCol = 14;//是否收藏
 }
 //公共返回
 message CommonRes {

+ 1 - 0
jyBXBase/rpc/etc/bxbase.yaml

@@ -4,5 +4,6 @@ Etcd:
   Hosts:
   - 127.0.0.1:2379
   Key: bxbase.rpc
+Timeout: 8000
 Webrpcport: 8015
 BidSearchOldUserLimit: 1626105600

+ 1 - 1
jyBXBase/rpc/etc/db.yaml

@@ -18,7 +18,7 @@ redis:
         - other=192.168.3.206:1712
 es:
     addr: http://192.168.3.206:9800
-    size: 5
+    size: 30
 mongo:
     main:
         dbName: qfw

+ 42 - 6
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -9,6 +9,7 @@ import (
 	IC "jyBXBase/rpc/init"
 	"jyBXBase/rpc/model"
 	"log"
+	"sort"
 	"strings"
 	"time"
 
@@ -53,26 +54,51 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 		}
 		//登录用户
 		if in.UserId != "" {
+			//优先级 由测试确认  大会员 》 商机管理 》 VIP 》 普通用户 》 搜索历史
 			//获取订阅信息
-			userMap, ok := IC.Mgo.FindById("user", rks, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
+			userMap, ok := IC.Mgo.FindById("user", rks, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1,"o_member_jy":1,"i_member_status":1,"s_m_phone":1,"s_phone":1}`)
 			if !ok || userMap == nil || len(*userMap) == 0 {
 				//查询出错
 				res.ErrCode = -1
 				res.ErrMsg = fmt.Errorf("未查询到用户信息").Error()
 				return res
 			}
-			//根据订阅词获取查询语句
-			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
+			//大会员用户
+			bigStatus := MC.Int64All((*userMap)["i_vip_status"])
+			if bigStatus > 0 {
+				o_msgset := MC.ObjToMap((*userMap)["o_member_jy"])
+				big_items, ok := (*o_msgset)["a_items"].([]interface{})
+				//大会员推送历史
+				result := model.GetNewestInfo(rks, "m").GetPushHistory()
+				res.Data.HasSubKeys = ok && len(big_items) > 0
+				res.Data.Count = int64(len(result))
+				res.Data.List = result
+				res.Data.SubFlag = "m"
+				return res
+			}
+			//商机管理
+			if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" {
+				if count := IC.MainMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
+					//大会员推送历史
+					result := model.GetNewestInfo(in.EntUserId, "e").GetPushHistory()
+					res.Data.Count = int64(len(result))
+					res.Data.List = result
+					res.Data.SubFlag = "e"
+					return res
+				}
+			}
 			//vip用户
+			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
 			if vipStatus > 0 {
 				o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
 				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
 				//vip查询推送历史
-				result := model.GetPushHistory(rks)
+				result := model.GetNewestInfo(rks, "v").GetPushHistory()
 				res.Data.IsVip = true
 				res.Data.HasSubKeys = ok && len(vip_items) > 0
 				res.Data.Count = int64(len(result))
 				res.Data.List = result
+				res.Data.SubFlag = "v"
 				return res
 			}
 			//普通用户用户- 有关键词
@@ -80,16 +106,20 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 			items, ok := (*o_msgset)["a_key"].([]interface{})
 			if ok && len(items) > 0 {
 				//普通用户查询推送历史
-				result := model.GetPushHistory(rks)
+				result := model.GetNewestInfo(rks, "f").GetPushHistory()
 				res.Data.IsVip = false
 				res.Data.HasSubKeys = ok && len(items) > 0
 				res.Data.Count = int64(len(result))
 				res.Data.List = result
+				res.Data.SubFlag = "f"
 				return res
 			}
 			//搜索历史-关键词
-			hKeys := redis.GetStr("other", fmt.Sprintf("s_%", in.UserId))
+			hKeys := redis.GetStr("other", fmt.Sprintf("s_%", in.UserId, in.UserId))
 			if hKeys != "" && len(strings.Split(hKeys, ",")) > 0 {
+				//历史搜索
+				res.Data.History = strings.Split(hKeys, ",")
+				//根据订阅词获取查询语句
 				query := model.NewestQuery("", hKeys)
 				result := model.NewestES(query)
 				res.Data.IsVip = false
@@ -111,6 +141,11 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 		return res
 	}(in)
 	if r.Data.Count > 0 {
+		//排序
+		sort.Slice(r.Data.List, func(i, j int) bool {
+			return r.Data.List[i].PublishTime > r.Data.List[j].PublishTime
+		})
+		//
 		rks := MC.If(in.UserId != "", in.UserId, in.City).(string)
 		b, err := json.Marshal(r.Data)
 		if err != nil {
@@ -124,6 +159,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 
 		}
 	}
+	model.MakeCollection(in.UserId, r.Data.List)
 	log.Println("接口耗时:", time.Since(t).Seconds())
 	return r, nil
 }

+ 39 - 0
jyBXBase/rpc/model/collectionInfo.go

@@ -0,0 +1,39 @@
+package model
+
+import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	ME "app.yhyue.com/moapp/jybase/encrypt"
+	"jyBXBase/rpc/bxbase"
+	IC "jyBXBase/rpc/init"
+	"strings"
+)
+
+//是否收藏
+func MakeCollection(userId string, list []*bxbase.NewestList) {
+	if list == nil || len(list) == 0 {
+		return
+	}
+	param := []interface{}{userId}
+	wh := []string{}
+	for _, v := range list {
+		array := ME.DecodeArticleId2ByCheck(v.Id)
+		if len(array) == 1 && array[0] != "" {
+			param = append(param, array[0])
+			wh = append(wh, "?")
+		}
+	}
+	if len(wh) > 0 {
+		result := IC.MainMysql.SelectBySql(`select bid from bdcollection where userid=? and bid in (`+strings.Join(wh, ",")+`)`, param...)
+		bid_map := map[string]bool{}
+		if result != nil {
+			for _, v := range *result {
+				bid_map[ME.EncodeArticleId2ByCheck(MC.ObjToString(v["bid"]))] = true
+			}
+		}
+		for _, v := range list {
+			if bid_map[v.Id] {
+				v.IsCol = true
+			}
+		}
+	}
+}

+ 44 - 19
jyBXBase/rpc/model/newestBidding.go

@@ -10,6 +10,7 @@ import (
 	"go.mongodb.org/mongo-driver/bson/primitive"
 	"jyBXBase/rpc/bxbase"
 	IC "jyBXBase/rpc/init"
+	"log"
 	"strings"
 	"time"
 )
@@ -26,9 +27,27 @@ const (
 	query_city_hkeys    = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": 1}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":20}`
 )
 
-func GetPushHistory(userId string) (res []*bxbase.NewestList) {
-	findSQL := "select infoid,matchkeys,attachment_count,budget,bidamount from pushsubscribe where userid = '" + userId + "'  and date >= %d order by id desc limit 50"
-	list := IC.PushMysql.SelectBySql(fmt.Sprintf(findSQL, time.Now().AddDate(-1, 0, -7).Unix()))
+type NewestInfo struct {
+	TableName string
+	UserId    string
+}
+
+var mysqlTables = map[string]string{
+	"f": "pushsubscribe",
+	"v": "pushsubscribe",
+	"m": "pushmember",
+	"e": "pushentniche",
+}
+
+func GetNewestInfo(userId, userType string) *NewestInfo {
+	return &NewestInfo{
+		UserId:    userId,
+		TableName: mysqlTables[userType],
+	}
+}
+func (n *NewestInfo) GetPushHistory() (res []*bxbase.NewestList) {
+	findSQL := "select infoid,matchkeys,attachment_count,budget,bidamount from " + n.TableName + " where userid = '" + n.UserId + "'  and date >= %d order by id desc limit 50"
+	list := IC.PushMysql.SelectBySql(fmt.Sprintf(findSQL, time.Now().AddDate(0, 0, -7).Unix()))
 	if len(*list) > 0 {
 		m := map[string]bool{}
 		es_ids := []string{}
@@ -56,8 +75,9 @@ func GetPushHistory(userId string) (res []*bxbase.NewestList) {
 					_id := MC.ObjToString(v["_id"])
 					bn := infos[_id]
 					bn.Title = MC.ObjToString(v["title"])
-					bn.Subtype = MC.If(v["subtype"] != nil, v["subtype"], v["toptype"]).(string)
-					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", v["area"]).(string)
+					bn.PublishTime = MC.Int64All(v["publishtime"])
+					bn.Subtype = MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string)
+					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string)
 					bn.Buyerclass = MC.ObjToString(v["buyerclass"])
 					bn.City = MC.ObjToString(v["city"])
 					bn.Industry = MC.If(MC.ObjToString(v["s_subscopeclass"]) != "", strings.Split(strings.Split(MC.ObjToString(v["s_subscopeclass"]), ",")[0], "_")[0], "").(string)
@@ -77,10 +97,12 @@ func GetPushHistory(userId string) (res []*bxbase.NewestList) {
 			if ok && *list != nil {
 				for _, v := range *list {
 					_id := mongodb.BsonIdToSId(v["_id"])
+					log.Println(_id, "---2--:", v["publishtime"])
 					bn := infos[_id]
 					bn.Title = MC.ObjToString(v["title"])
-					bn.Subtype = MC.If(v["subtype"] != nil, v["subtype"], v["toptype"]).(string)
-					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", v["area"]).(string)
+					bn.PublishTime = MC.Int64All(v["publishtime"])
+					bn.Subtype = MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string)
+					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string)
 					bn.Buyerclass = MC.ObjToString(v["buyerclass"])
 					bn.City = MC.ObjToString(v["city"])
 					bn.Industry = MC.If(MC.ObjToString(v["s_subscopeclass"]) != "", strings.Split(strings.Split(MC.ObjToString(v["s_subscopeclass"]), ",")[0], "_")[0], "").(string)
@@ -99,10 +121,12 @@ func GetPushHistory(userId string) (res []*bxbase.NewestList) {
 			if ok && *list != nil {
 				for _, v := range *list {
 					_id := mongodb.BsonIdToSId(v["_id"])
+					log.Println(_id, "---3--:", v["publishtime"])
 					bn := infos[_id]
 					bn.Title = MC.ObjToString(v["title"])
-					bn.Subtype = MC.If(v["subtype"] != nil, v["subtype"], v["toptype"]).(string)
-					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", v["area"]).(string)
+					bn.PublishTime = MC.Int64All(v["publishtime"])
+					bn.Subtype = MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string)
+					bn.Area = MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string)
 					bn.Buyerclass = MC.ObjToString(v["buyerclass"])
 					bn.City = MC.ObjToString(v["city"])
 					bn.Industry = MC.If(MC.ObjToString(v["s_subscopeclass"]) != "", strings.Split(strings.Split(MC.ObjToString(v["s_subscopeclass"]), ",")[0], "_")[0], "").(string)
@@ -146,16 +170,17 @@ func NewestES(doSearchStr string) (res []*bxbase.NewestList) {
 		for _, v := range *list {
 			_id := mongodb.BsonIdToSId(v["_id"])
 			res = append(res, &bxbase.NewestList{
-				Id:         ME.EncodeArticleId2ByCheck(_id),
-				Title:      MC.ObjToString(v["title"]),
-				Subtype:    MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string),
-				Area:       MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string),
-				Buyerclass: MC.ObjToString(v["buyerclass"]),
-				City:       MC.ObjToString(v["city"]),
-				Industry:   MC.If(MC.ObjToString(v["s_subscopeclass"]) != "", strings.Split(strings.Split(MC.ObjToString(v["s_subscopeclass"]), ",")[0], "_")[0], "").(string),
-				Budget:     MC.Int64All(v["budget"]),
-				Bidamount:  MC.Int64All(v["bidamount"]),
-				FileExists: v["filetext"] != nil,
+				Id:          ME.EncodeArticleId2ByCheck(_id),
+				Title:       MC.ObjToString(v["title"]),
+				Subtype:     MC.If(v["subtype"] != nil, MC.ObjToString(v["subtype"]), MC.ObjToString(v["toptype"])).(string),
+				Area:        MC.If(MC.ObjToString(v["area"]) == "A", "全国", MC.ObjToString(v["area"])).(string),
+				Buyerclass:  MC.ObjToString(v["buyerclass"]),
+				City:        MC.ObjToString(v["city"]),
+				Industry:    MC.If(MC.ObjToString(v["s_subscopeclass"]) != "", strings.Split(strings.Split(MC.ObjToString(v["s_subscopeclass"]), ",")[0], "_")[0], "").(string),
+				Budget:      MC.Int64All(v["budget"]),
+				Bidamount:   MC.Int64All(v["bidamount"]),
+				FileExists:  v["filetext"] != nil,
+				PublishTime: MC.Int64All(v["publishtime"]),
 			})
 		}
 	}

+ 131 - 102
jyBXBase/rpc/type/bxbase/bxbase.pb.go

@@ -1761,10 +1761,11 @@ type NewestBiddingReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	City     string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"`
-	IsSearch int64  `protobuf:"varint,2,opt,name=isSearch,proto3" json:"isSearch,omitempty"`
-	UserId   string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
-	AppId    string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
+	City      string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"`
+	IsSearch  int64  `protobuf:"varint,2,opt,name=isSearch,proto3" json:"isSearch,omitempty"`
+	UserId    string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
+	AppId     string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`
+	EntUserId string `protobuf:"bytes,5,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 }
 
 func (x *NewestBiddingReq) Reset() {
@@ -1827,6 +1828,13 @@ func (x *NewestBiddingReq) GetAppId() string {
 	return ""
 }
 
+func (x *NewestBiddingReq) GetEntUserId() string {
+	if x != nil {
+		return x.EntUserId
+	}
+	return ""
+}
+
 //首页最新招标信息Resp
 type NewsetBiddingResp struct {
 	state         protoimpl.MessageState
@@ -1902,6 +1910,7 @@ type NewsetBidding struct {
 	Count      int64         `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`           //数据长度
 	List       []*NewestList `protobuf:"bytes,5,rep,name=list,proto3" json:"list,omitempty"`              //数据
 	History    []string      `protobuf:"bytes,6,rep,name=history,proto3" json:"history,omitempty"`        //历史数据
+	SubFlag    string        `protobuf:"bytes,7,opt,name=subFlag,proto3" json:"subFlag,omitempty"`        //当前用户订阅信息属性:m:大会员;e:商机管理;v:VIP;f:普通用户
 }
 
 func (x *NewsetBidding) Reset() {
@@ -1978,6 +1987,13 @@ func (x *NewsetBidding) GetHistory() []string {
 	return nil
 }
 
+func (x *NewsetBidding) GetSubFlag() string {
+	if x != nil {
+		return x.SubFlag
+	}
+	return ""
+}
+
 //
 type NewestList struct {
 	state         protoimpl.MessageState
@@ -1997,6 +2013,7 @@ type NewestList struct {
 	AppId       string `protobuf:"bytes,11,opt,name=appId,proto3" json:"appId,omitempty"`
 	Id          string `protobuf:"bytes,12,opt,name=id,proto3" json:"id,omitempty"`                  //招标信息id
 	FileExists  bool   `protobuf:"varint,13,opt,name=fileExists,proto3" json:"fileExists,omitempty"` //是否有附件
+	IsCol       bool   `protobuf:"varint,14,opt,name=isCol,proto3" json:"isCol,omitempty"`           //是否收藏
 }
 
 func (x *NewestList) Reset() {
@@ -2122,6 +2139,13 @@ func (x *NewestList) GetFileExists() bool {
 	return false
 }
 
+func (x *NewestList) GetIsCol() bool {
+	if x != nil {
+		return x.IsCol
+	}
+	return false
+}
+
 //公共返回
 type CommonRes struct {
 	state         protoimpl.MessageState
@@ -2453,105 +2477,110 @@ var file_bxbase_proto_rawDesc = []byte{
 	0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
 	0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
-	0x49, 0x64, 0x22, 0x70, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x64,
-	0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73,
-	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73,
-	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14,
-	0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
-	0x70, 0x70, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x73, 0x65, 0x74, 0x42, 0x69,
-	0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72,
-	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72,
-	0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x28, 0x0a,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x78,
-	0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x65, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e,
-	0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xba, 0x01, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x73,
-	0x65, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x56,
-	0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x56, 0x69, 0x70, 0x12,
-	0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x53, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x53, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x12,
-	0x1c, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x48, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x08, 0x52, 0x09, 0x68, 0x61, 0x73, 0x48, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a,
-	0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f,
-	0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28,
-	0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69,
-	0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x69, 0x73,
-	0x74, 0x6f, 0x72, 0x79, 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62,
-	0x69, 0x64, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x62, 0x69, 0x64, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64,
-	0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65,
-	0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73,
-	0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x06,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6b, 0x65, 0x79, 0x73, 0x12,
-	0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d,
-	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a,
-	0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69,
-	0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
-	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
-	0x70, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74,
-	0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69,
-	0x73, 0x74, 0x73, 0x22, 0x3f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
-	0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65,
-	0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72,
-	0x72, 0x4d, 0x73, 0x67, 0x22, 0x52, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
-	0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65,
-	0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72,
-	0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf9, 0x04, 0x0a, 0x06, 0x62, 0x78, 0x62,
-	0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12,
-	0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c,
-	0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c,
-	0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61,
-	0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4c,
-	0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x3b, 0x0a,
-	0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x62,
-	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65,
-	0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x42, 0x43,
-	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x42,
-	0x43, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63,
-	0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
-	0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f,
-	0x6e, 0x12, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c,
-	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
-	0x73, 0x12, 0x26, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x53, 0x68, 0x6f,
-	0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e,
-	0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e,
-	0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
-	0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
-	0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72,
-	0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f,
-	0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41,
-	0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x78,
-	0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09,
-	0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f,
-	0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10,
-	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73,
-	0x12, 0x42, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e,
-	0x67, 0x12, 0x17, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74,
-	0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62, 0x78, 0x63,
+	0x49, 0x64, 0x22, 0x8e, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64,
+	0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69,
+	0x73, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69,
+	0x73, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x73, 0x65, 0x74, 0x42, 0x69, 0x64,
+	0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43,
+	0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x28, 0x0a, 0x04,
+	0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x78, 0x63,
 	0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x65, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67,
-	0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x62, 0x61, 0x73, 0x65,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd4, 0x01, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x73, 0x65,
+	0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x56, 0x69,
+	0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x56, 0x69, 0x70, 0x12, 0x1e,
+	0x0a, 0x0a, 0x68, 0x61, 0x73, 0x53, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x53, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c,
+	0x0a, 0x09, 0x68, 0x61, 0x73, 0x48, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x08, 0x52, 0x09, 0x68, 0x61, 0x73, 0x48, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x0a, 0x05,
+	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x12, 0x25, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x11, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x69, 0x73,
+	0x74, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74,
+	0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x46, 0x6c, 0x61, 0x67, 0x22, 0xf2, 0x02,
+	0x0a, 0x0a, 0x6e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
+	0x61, 0x72, 0x65, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x63, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
+	0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x62, 0x69, 0x64, 0x61, 0x6d, 0x6f, 0x75,
+	0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75,
+	0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61,
+	0x74, 0x63, 0x68, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d,
+	0x61, 0x74, 0x63, 0x68, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c,
+	0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70,
+	0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e,
+	0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e,
+	0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
+	0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
+	0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18,
+	0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02,
+	0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
+	0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08,
+	0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05,
+	0x69, 0x73, 0x43, 0x6f, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x43,
+	0x6f, 0x6c, 0x22, 0x3f, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12,
+	0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72,
+	0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72,
+	0x4d, 0x73, 0x67, 0x22, 0x52, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x12,
+	0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72,
+	0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72,
+	0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xf9, 0x04, 0x0a, 0x06, 0x62, 0x78, 0x62, 0x61,
+	0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12,
+	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52,
+	0x65, 0x71, 0x1a, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x6c, 0x61,
+	0x62, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62,
+	0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
+	0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+	0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61,
+	0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b,
+	0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x2e, 0x62, 0x78,
+	0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+	0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c,
+	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x42, 0x43, 0x41,
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x42, 0x43,
+	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f,
+	0x6c, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
+	0x12, 0x3e, 0x0a, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x12, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41,
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
+	0x2e, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
+	0x12, 0x26, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
+	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
+	0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x77,
+	0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53,
+	0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x62,
+	0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52,
+	0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
+	0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63,
+	0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53,
+	0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x64,
+	0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x62, 0x78, 0x63,
+	0x6f, 0x6c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x44,
+	0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x13, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c,
+	0x2e, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e,
+	0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x12,
+	0x42, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67,
+	0x12, 0x17, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x6c, 0x2e, 0x4e, 0x65, 0x77, 0x65, 0x73, 0x74, 0x42,
+	0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x62, 0x78, 0x63, 0x6f,
+	0x6c, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x65, 0x74, 0x42, 0x69, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52,
+	0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 2 - 1
jyBXBuyer/api/etc/bxbuyer-api.yaml

@@ -1,7 +1,7 @@
 Name: bxbuyer-api
 Host: 0.0.0.0
 Port: 8007
-Timeout: 10000
+Timeout: 8000
 Webrpcport: 8017
 Gateway:
   ServerCode: jybxbuyer
@@ -12,6 +12,7 @@ Buyer:
     Hosts:
       - 127.0.0.1:2379
     Key: bxbuyer.rpc
+  Timeout: 8000
 AppId: 10000
 MgoLogsName: jybxbuyer_logs
 MgoLogsCount: 500

+ 1 - 0
jyBXBuyer/rpc/bxbuyer.proto

@@ -42,6 +42,7 @@ message  BuyerList {
   int64  pCount = 5;//项目数量
   bool  isFollowed = 6;//是否关注
   bool  isReceived = 7;//是否已领取
+  string  recId = 8;//领取id
 }
 
 service Bxbuyer {

+ 1 - 0
jyBXBuyer/rpc/etc/bxbuyer.yaml

@@ -4,6 +4,7 @@ Etcd:
   Hosts:
   - 127.0.0.1:2379
   Key: bxbuyer.rpc
+Timeout: 8000
 Webrpcport: 8018
 BuyerCount: 500
 DefaultBuyerNames:

+ 1 - 1
jyBXBuyer/rpc/etc/db.yaml

@@ -11,7 +11,7 @@ redis:
         - other=192.168.3.206:1712
 es:
     addr: http://192.168.3.206:9800
-    size: 5
+    size: 30
 mongo:
     main:
         dbName: qfw

+ 14 - 7
jyBXBuyer/rpc/model/buyerListBYEs.go

@@ -2,6 +2,7 @@ package model
 
 import (
 	MC "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/esv1"
 	"encoding/json"
 	"fmt"
@@ -10,6 +11,7 @@ import (
 	"jyBXBuyer/rpc/type/bxbuyer"
 	"log"
 	"runtime"
+	"strconv"
 	"strings"
 	"sync"
 	"time"
@@ -190,10 +192,11 @@ func GetBuyerList(qstr string, in *bxbuyer.BuyerListReq, isCache bool) (resp *bx
 						isFws = IsFollowd(buyerNames, userId)
 					}
 					//领取状态
-					isRws := map[string]bool{}
+					isRws := map[string]string{}
 					if icr {
 						isRws = IsReceived(buyerNames, entUserId)
 					}
+					log.Println("---:", isRws)
 					for _, fv := range fiftyArr {
 						fv.Province = infoMap[fv.Buyer].Province
 						fv.City = infoMap[fv.Buyer].City
@@ -201,7 +204,10 @@ func GetBuyerList(qstr string, in *bxbuyer.BuyerListReq, isCache bool) (resp *bx
 							fv.IsFollowed = isFws[fv.Buyer]
 						}
 						if icr {
-							fv.IsReceived = isRws[fv.Buyer]
+							if isRws[fv.Buyer] != "" {
+								fv.RecId = isRws[fv.Buyer]
+								fv.IsReceived = true
+							}
 						}
 					}
 					wg.Done()
@@ -307,14 +313,15 @@ var (
 )
 
 //领取状态
-func IsReceived(buyerNames []string, entUserId string) (isRws map[string]bool) {
-	receInfos := IC.MainMysql.SelectBySql(fmt.Sprintf("SELECT  ecn.name  FROM %s ecn,%s  euu WHERE ecn.id = euu.customer_id AND euu.user_id =? AND ecn.`name` IN  ('%s') AND (euu.source_type =1 or euu.source_type=4)", Entniche_customer, Entniche_user_customer, strings.Join(buyerNames, "','")), entUserId)
+func IsReceived(buyerNames []string, entUserId string) (isRws map[string]string) {
+	//新加领取的客户id----保证领取的唯一性
+	receInfos := IC.MainMysql.SelectBySql(fmt.Sprintf("SELECT ecn.id,  ecn.name  FROM %s ecn,%s  euu WHERE ecn.id = euu.customer_id AND euu.user_id =? AND ecn.`name` IN  ('%s') AND (euu.source_type =1 or euu.source_type=4)", Entniche_customer, Entniche_user_customer, strings.Join(buyerNames, "','")), entUserId)
 	if receInfos != nil {
 		if len(*receInfos) > 0 {
-			isRws = map[string]bool{}
+			isRws = map[string]string{}
 			for _, rv := range *receInfos {
-				if MC.ObjToString(rv["name"]) != "" {
-					isRws[MC.ObjToString(rv["name"])] = true
+				if MC.ObjToString(rv["name"]) != "" && strconv.Itoa(MC.IntAll(rv["id"])) != "" {
+					isRws[MC.ObjToString(rv["name"])] = encrypt.SE.Encode2HexByCheck(strconv.Itoa(MC.IntAll(rv["id"])))
 				}
 			}
 		}

+ 17 - 8
jyBXBuyer/rpc/type/bxbuyer/bxbuyer.pb.go

@@ -338,6 +338,7 @@ type BuyerList struct {
 	PCount     int64   `protobuf:"varint,5,opt,name=pCount,proto3" json:"pCount,omitempty"`         //项目数量
 	IsFollowed bool    `protobuf:"varint,6,opt,name=isFollowed,proto3" json:"isFollowed,omitempty"` //是否关注
 	IsReceived bool    `protobuf:"varint,7,opt,name=isReceived,proto3" json:"isReceived,omitempty"` //是否已领取
+	RecId      string  `protobuf:"bytes,8,opt,name=recId,proto3" json:"recId,omitempty"`            //领取id
 }
 
 func (x *BuyerList) Reset() {
@@ -421,6 +422,13 @@ func (x *BuyerList) GetIsReceived() bool {
 	return false
 }
 
+func (x *BuyerList) GetRecId() string {
+	if x != nil {
+		return x.RecId
+	}
+	return ""
+}
+
 var File_bxbuyer_proto protoreflect.FileDescriptor
 
 var file_bxbuyer_proto_rawDesc = []byte{
@@ -470,7 +478,7 @@ var file_bxbuyer_proto_rawDesc = []byte{
 	0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
 	0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
 	0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73,
-	0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xc1, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65,
+	0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65,
 	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x62,
 	0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x62, 0x75, 0x64,
@@ -482,13 +490,14 @@ var file_bxbuyer_proto_rawDesc = []byte{
 	0x73, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
 	0x0a, 0x69, 0x73, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
 	0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
-	0x0a, 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x32, 0x45, 0x0a, 0x07, 0x42,
-	0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x09, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75,
-	0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x62, 0x78, 0x62,
-	0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
-	0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x62,
-	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x0a, 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72,
+	0x65, 0x63, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x63, 0x49,
+	0x64, 0x32, 0x45, 0x0a, 0x07, 0x42, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x09,
+	0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x62, 0x78, 0x62, 0x75,
+	0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
+	0x1a, 0x16, 0x2e, 0x62, 0x78, 0x62, 0x75, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x75, 0x79, 0x65, 0x72,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x62, 0x78,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 2 - 2
jyBXCore/api/bxcore.api

@@ -9,7 +9,7 @@ info (
 
 type (
 	searchReq {
-		AppId          string `header:"appId"`
+		AppId          string `header:"appId,optional"`
 		PageNum        int64  `json:"pageNum"`
 		PageSize       int64  `json:"pageSize"`
 		KeyWords       string `json:"keyWords,optional"`
@@ -36,7 +36,7 @@ type (
 	}
 	//
 	searchLimitReq {
-		AppId      string `header:"appId"`             //appid
+		AppId      string `header:"appId,optional"`    //appid
 		TimeOut    int64  `json:"timeOut,optional"`    //过滤过期时间
 		Count      int64  `json:"count,optional"`      //并发量
 		Flag       int64  `json:"flag,optional"`       //开关 1:打开;-1:关闭;-2:重置

+ 3 - 1
jyBXCore/api/etc/bxcore-api.yaml

@@ -1,7 +1,8 @@
 Name: bxcore-api
 Host: 0.0.0.0
 Port: 8004
-Timeout: 10000
+Verbose: true
+Timeout: 8000
 Webrpcport: 8014
 Gateway:
   ServerCode: jybxcore
@@ -12,6 +13,7 @@ Core:
     Hosts:
       - 127.0.0.1:2379
     Key: bxcore.rpc
+  Timeout: 12000
 AppId: 10000
 MgoLogsName: jybxcore_logs
 MgoLogsCount: 500

+ 4 - 0
jyBXCore/api/internal/logic/searchListLogic.go

@@ -7,7 +7,9 @@ import (
 	"jyBXCore/api/internal/types"
 	"jyBXCore/api/internal/util"
 	"jyBXCore/rpc/type/bxcore"
+	"log"
 	"net/http"
+	"time"
 )
 
 type SearchListLogic struct {
@@ -27,6 +29,7 @@ func NewSearchListLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http
 }
 
 func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonResp, err error) {
+	t := time.Now()
 	res, err := l.svcCtx.BxCore.GetSearchList(l.ctx, &bxcore.SearchReq{
 		PageNum:        req.PageNum,
 		PageSize:       req.PageSize,
@@ -50,6 +53,7 @@ func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonRe
 		EntId:          l.r.Header.Get("entId"),
 		Platform:       util.CheckPlatform(l.r),
 	})
+	log.Println("请求接口耗时:", time.Since(t).Seconds())
 	if err != nil {
 		return &types.CommonResp{
 			Err_code: res.ErrCode,

+ 2 - 2
jyBXCore/api/internal/types/types.go

@@ -2,7 +2,7 @@
 package types
 
 type SearchReq struct {
-	AppId          string `header:"appId"`
+	AppId          string `header:"appId,optional"`
 	PageNum        int64  `json:"pageNum"`
 	PageSize       int64  `json:"pageSize"`
 	KeyWords       string `json:"keyWords,optional"`
@@ -29,7 +29,7 @@ type CommonResp struct {
 }
 
 type SearchLimitReq struct {
-	AppId      string `header:"appId"`             //appid
+	AppId      string `header:"appId,optional"`    //appid
 	TimeOut    int64  `json:"timeOut,optional"`    //过滤过期时间
 	Count      int64  `json:"count,optional"`      //并发量
 	Flag       int64  `json:"flag,optional"`       //开关 1:打开;-1:关闭;-2:重置

+ 2 - 2
jyBXCore/go.mod

@@ -3,11 +3,11 @@ module jyBXCore
 go 1.16
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20220527072445-3116753a8f28
+	app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f
 	bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220505015640-56e56f06bc5c
 	github.com/go-sql-driver/mysql v1.6.0
 	github.com/golang/protobuf v1.5.2
 	github.com/zeromicro/go-zero v1.3.3
-	google.golang.org/grpc v1.46.0
+	google.golang.org/grpc v1.47.0
 	google.golang.org/protobuf v1.28.0
 )

+ 4 - 3
jyBXCore/go.sum

@@ -4,8 +4,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHu
 app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
-app.yhyue.com/moapp/jybase v0.0.0-20220527072445-3116753a8f28 h1:4f2Ut0aMEmanwpRdRD2npShh8HMz4/OVfIv+HwhKifk=
-app.yhyue.com/moapp/jybase v0.0.0-20220527072445-3116753a8f28/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f h1:U8sVqWn/JH2gcsJqQcHFaCx/MtY1pGUwbUAc5dVkwto=
+app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
 bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
 bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220505015640-56e56f06bc5c h1:p2WctRqfE6wdLPHnACIO983CfYV2LLaaLC2ADpSaNn0=
@@ -885,8 +885,9 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
 google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
 google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
-google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8=
 google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=
+google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=

+ 7 - 4
jyBXCore/rpc/bxcore.proto

@@ -68,10 +68,13 @@ message  SearchList {
 }
 //
 message PInfo {
-  string approveCode =1;
-  string approveContent = 2;
-  string approveDept = 3;
-  string approveStatus = 4 ;
+  string approveCode =1;//项目代码
+  string approveContent = 2;//项目内容
+  string approveDept = 3;//审批部门
+  string approveStatus = 4 ;//审批状态
+  string approveTime = 5;//审批时间
+  string projectType = 6;//审批类型
+  string approveNumber = 7;//
 }
 //
 message SearchLimitReq {

+ 2 - 0
jyBXCore/rpc/etc/bxcore.yaml

@@ -4,6 +4,7 @@ Etcd:
   Hosts:
     - 127.0.0.1:2379
   Key: bxcore.rpc
+Timeout: 10000
 Webrpcport: 8013
 BidSearchOldUserLimit: 1626105600
 LabelUrl:
@@ -19,3 +20,4 @@ LimitSearchText:
   UserIds:
     - 60f4f01156bf6da1bcbbcff6
   Msg: f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>
+SearchTypeSwitch: true

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

@@ -11,7 +11,7 @@ redis:
         - other=192.168.3.206:1712
 es:
     addr: http://192.168.3.206:9800
-    size: 5
+    size: 50
 mongo:
     main:
         dbName: qfw

+ 1 - 0
jyBXCore/rpc/internal/config/config.go

@@ -23,6 +23,7 @@ type Config struct {
 		UserIds    []string
 		Msg        string
 	}
+	SearchTypeSwitch bool
 }
 
 type Db struct {

+ 14 - 4
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -9,6 +9,7 @@ import (
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/util"
 	"strings"
+	"time"
 
 	"jyBXCore/rpc/internal/svc"
 	"jyBXCore/rpc/type/bxcore"
@@ -33,6 +34,7 @@ func NewGetSearchListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Get
 // 标讯搜索结果列表数据
 func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.SearchResp, error) {
 	defer MC.Catch()
+	t := time.Now()
 	res := &bxcore.SearchData{
 		Count: 0,
 		List:  []*bxcore.SearchList{},
@@ -60,8 +62,6 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 			ErrMsg:  "无权限",
 		}, nil
 	}
-	//搜索范围
-	queryItems := userInfo.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit)
 	if in.UserType == "fType" {
 		in.BuyerClass = ""
 		in.BuyerTel = ""
@@ -70,16 +70,19 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 		in.City = ""
 	}
 	in.KeyWords = strings.TrimSpace(in.KeyWords)
-	searchLimit := util.IsSearchLimit(strings.Split(in.SelectType, ","))
+	//搜索范围
+	queryItems := userInfo.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit)
 	in.SelectType = strings.Join(queryItems, ",")
 	//b_word, s_word := "", ""
 	res.IsLimit = 1
+	//以后可能会出现 关键词 C++ 等带+的关键词
 	if in.KeyWords != "" {
 		_, _, in.KeyWords = util.InterceptSearchKW(in.KeyWords, false, len(in.Industry) == 0)
 	}
 	//查询数据
 	if in.KeyWords != "" || in.Industry != "" {
 		//查询数据
+		searchLimit := util.IsSearchLimit(strings.Split(in.SelectType, ","))
 		//全文检索限制
 		if searchLimit {
 			res.IsLimit = util.IsLimited(in.UserId, in.UserType != "fType")
@@ -97,7 +100,12 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 			//二次搜索- 一次搜索结果少于一页数据;关键词长度大于三;第一,二页请求;搜索范围包括title;四个条件
 			if len([]rune(in.KeyWords)) > 3 && int(count) < util.SearchPageSize && in.PageNum < 3 && strings.Contains(in.SelectType, "title") {
 				if in.KeyWords = util.HttpEs(in.KeyWords, "ik_smart", IC.DB.Es.Addr); in.KeyWords != "" {
-					count, list = util.GetBidSearchData(in)
+					in.SelectType = "title,content"
+					_count, _list := util.GetBidSearchData(in)
+					if count < _count {
+						count = _count
+						list = _list
+					}
 					//最多两页数据
 					if count > util.SearchPageSize*2 {
 						count = util.SearchPageSize * 2
@@ -118,6 +126,7 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 			res.Count = count
 			res.List = list
 		}
+		logx.Info("关键词 -0- 查询耗时:", time.Since(t).Seconds())
 	} else if in.Platform == "PC" {
 		var count int64 = 0
 		var list = []*bxcore.SearchList{}
@@ -171,6 +180,7 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 			}, nil
 		}
 	}
+	logx.Info("关键词 -全部- 查询耗时:", time.Since(t).Seconds())
 	return &bxcore.SearchResp{
 		Data:    res,
 		ErrMsg:  "",

+ 64 - 33
jyBXCore/rpc/type/bxcore/bxcore.pb.go

@@ -611,10 +611,13 @@ type PInfo struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	ApproveCode    string `protobuf:"bytes,1,opt,name=approveCode,proto3" json:"approveCode,omitempty"`
-	ApproveContent string `protobuf:"bytes,2,opt,name=approveContent,proto3" json:"approveContent,omitempty"`
-	ApproveDept    string `protobuf:"bytes,3,opt,name=approveDept,proto3" json:"approveDept,omitempty"`
-	ApproveStatus  string `protobuf:"bytes,4,opt,name=approveStatus,proto3" json:"approveStatus,omitempty"`
+	ApproveCode    string `protobuf:"bytes,1,opt,name=approveCode,proto3" json:"approveCode,omitempty"`       //项目代码
+	ApproveContent string `protobuf:"bytes,2,opt,name=approveContent,proto3" json:"approveContent,omitempty"` //项目内容
+	ApproveDept    string `protobuf:"bytes,3,opt,name=approveDept,proto3" json:"approveDept,omitempty"`       //审批部门
+	ApproveStatus  string `protobuf:"bytes,4,opt,name=approveStatus,proto3" json:"approveStatus,omitempty"`   //审批状态
+	ApproveTime    string `protobuf:"bytes,5,opt,name=approveTime,proto3" json:"approveTime,omitempty"`       //审批时间
+	ProjectType    string `protobuf:"bytes,6,opt,name=projectType,proto3" json:"projectType,omitempty"`       //审批类型
+	ApproveNumber  string `protobuf:"bytes,7,opt,name=approveNumber,proto3" json:"approveNumber,omitempty"`   //
 }
 
 func (x *PInfo) Reset() {
@@ -677,6 +680,27 @@ func (x *PInfo) GetApproveStatus() string {
 	return ""
 }
 
+func (x *PInfo) GetApproveTime() string {
+	if x != nil {
+		return x.ApproveTime
+	}
+	return ""
+}
+
+func (x *PInfo) GetProjectType() string {
+	if x != nil {
+		return x.ProjectType
+	}
+	return ""
+}
+
+func (x *PInfo) GetApproveNumber() string {
+	if x != nil {
+		return x.ApproveNumber
+	}
+	return ""
+}
+
 //
 type SearchLimitReq struct {
 	state         protoimpl.MessageState
@@ -940,7 +964,7 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x0d, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b,
 	0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x70,
 	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x99, 0x01,
+	0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x83, 0x02,
 	0x0a, 0x05, 0x50, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x72, 0x6f,
 	0x76, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x70,
 	0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x70, 0x70,
@@ -950,34 +974,41 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x44,
 	0x65, 0x70, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x53, 0x74,
 	0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72,
-	0x6f, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0e, 0x53, 0x65,
-	0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
-	0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
-	0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75,
-	0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e,
-	0x74, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63,
-	0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e,
-	0x0a, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x59,
-	0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07,
-	0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65,
-	0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x80, 0x01, 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, 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, 0x42, 0x0a, 0x5a, 0x08,
-	0x2e, 0x2f, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6f, 0x76, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x70, 0x70,
+	0x72, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+	0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70,
+	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a,
+	0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x4e, 0x75, 0x6d,
+	0x62, 0x65, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x69,
+	0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07,
+	0x74, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74,
+	0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04,
+	0x66, 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67,
+	0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x05,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65,
+	0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x72,
+	0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65,
+	0x61, 0x72, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72,
+	0x63, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65,
+	0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65,
+	0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73,
+	0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12,
+	0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x32, 0x80, 0x01, 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, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x63, 0x6f,
+	0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 24 - 28
jyBXCore/rpc/util/search.go

@@ -158,12 +158,13 @@ const (
 	SearchMaxPageNum       = 10  //免费用户500条记录
 	SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
 
-	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass"`
+	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","filetext"`
 	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
 )
 
 //GetBidSearchData 标信息搜索
 func GetBidSearchData(in *bxcore.SearchReq) (count int64, list []*bxcore.SearchList) {
+	t := time.Now()
 	var hightlightContent bool = false //是否高亮正文
 	var selectTypeArr = strings.Split(in.SelectType, ",")
 	for _, v := range selectTypeArr {
@@ -224,6 +225,9 @@ func GetBidSearchData(in *bxcore.SearchReq) (count int64, list []*bxcore.SearchL
 					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"])
 				}
 				searchList.Winner = MC.ObjToString(v["winner"])
 				searchList.Buyer = MC.ObjToString(v["buyer"])
@@ -231,9 +235,11 @@ func GetBidSearchData(in *bxcore.SearchReq) (count int64, list []*bxcore.SearchL
 				list = append(list, searchList)
 			}
 		}
+		logx.Info("关键词 -1- 查询耗时:", time.Since(t).Seconds())
 		MakeCollection(in.UserId, list)
 		logx.Info("=====:", len(list))
 	}
+	logx.Info("关键词 查询耗时:", time.Since(t).Seconds())
 	return
 }
 
@@ -268,35 +274,12 @@ func GetBidSearchQuery(in *bxcore.SearchReq) string {
 	}
 	//发布时间
 	publishtime := in.PublishTime
-	if publishtime != "" {
+	if publishtime != "" && len(strings.Split(publishtime, "-")) > 1 {
 		if len(query) > 0 {
 			query += ","
 		}
-		starttime, endtime := "", ""
-		now := time.Now()
-		if publishtime == "lately-7" { //最近7天
-			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local).Unix())
-		} else if publishtime == "lately-30" { //最近30天
-			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Unix())
-		} else if publishtime == "thisyear" { //最近一年
-			starttime = fmt.Sprint(time.Date(now.Year()-1, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
-			endtime = fmt.Sprint(now.Unix())
-		} else if publishtime == "threeyear" { //最近三年
-			starttime = fmt.Sprint(time.Date(now.Year()-3, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
-			endtime = fmt.Sprint(now.Unix())
-		} else if publishtime == "fiveyear" { //最近五年
-			starttime = fmt.Sprint(time.Date(now.Year()-5, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
-			endtime = fmt.Sprint(now.Unix())
-		} else {
-			starttime = strings.Split(publishtime, "_")[0]
-			endtime = strings.Split(publishtime, "_")[1]
-			etTime := time.Now()
-			if endtime != "" {
-				et, _ := strconv.ParseInt(endtime, 0, 64)
-				etTime = time.Unix(et, 0)
-			}
-			endtime = fmt.Sprint(time.Date(etTime.Year(), etTime.Month(), etTime.Day()+1, 0, 0, 0, 0, time.Local).Unix())
-		}
+		starttime := strings.Split(publishtime, "-")[0]
+		endtime := strings.Split(publishtime, "-")[1]
 		query += `{"range":{"publishtime":{`
 		if starttime != "" {
 			query += `"gte":` + starttime
@@ -382,9 +365,19 @@ func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
 		if strings.Contains(findfields, "filetext") { //搜索范围选择附件,是否有附件条件无效;
 			isFileSearch = true
 		}
-		keyword_multi_match := fmt.Sprintf(multi_match, "%s", findfields)
 		shoulds := []string{}
+		var switchBool = strings.Contains(findfields, "detail") && strings.Contains(findfields, "title") && IC.C.SearchTypeSwitch
+		log.Println("in.KeyWords:", in.KeyWords)
 		for _, v := range strings.Split(in.KeyWords, "+") {
+			//标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
+			if switchBool && len([]rune(elastic.ReplaceYH(v))) > 1 {
+				if strings.Contains(findfields, `"title",`) {
+					findfields = strings.Replace(findfields, `"title",`, ``, -1)
+				} else if strings.Contains(findfields, `,"title"`) {
+					findfields = strings.Replace(findfields, `,"title"`, ``, -1)
+				}
+			}
+			keyword_multi_match := fmt.Sprintf(multi_match, "%s", findfields)
 			shoulds = append(shoulds, fmt.Sprintf(keyword_multi_match, elastic.ReplaceYH(v)))
 		}
 		musts = append(musts, fmt.Sprintf(elastic.NgramMust, strings.Join(shoulds, ",")))
@@ -600,6 +593,9 @@ func SearchCahcheData(in *bxcore.SearchReq) (count int64, list []*bxcore.SearchL
 					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"])
 				}
 				searchList.Winner = MC.ObjToString(v["winner"])
 				searchList.Buyer = MC.ObjToString(v["buyer"])

+ 3 - 0
jyBXCore/rpc/util/userInfo.go

@@ -17,6 +17,9 @@ type VipState struct {
 
 func GetVipState(mysql *mysql.Mysql, mg mongodb.MongodbSim, userId string) (vs *VipState) {
 	vs = &VipState{}
+	if userId == "" {
+		return
+	}
 	phone := ""
 	data, ok := mg.FindById("user", userId, `"i_member_status":1,"i_vip_status":1,"s_m_phone":1,"s_phone":1,"o_vipjy":1,"l_registedate":1`)
 	if data != nil && len(*data) > 0 && ok {

+ 2 - 0
jyBXSubscribe/api/etc/bxsubscribe-api.yaml

@@ -1,6 +1,7 @@
 Name: bxsubscribe-api
 Host: 0.0.0.0
 Port: 8002
+Timeout: 8000
 Webrpcport: 8012
 Gateway:
   ServerCode: jybxsub
@@ -11,6 +12,7 @@ Subscribe:
     Hosts:
       - 127.0.0.1:2379
     Key: bxsubscribe.rpc
+  Timeout: 12000
 AppId: 10000
 MgoLogsName: jybxsubscribe_logs
 MgoLogsCount: 500

+ 1 - 1
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -34,7 +34,7 @@ message subscribeData{
 }
 
 message subscribeInfo {
-  string  id = 1;
+  string  _id = 1;//和推送程序 缓存保持一致
   string  title = 2;
   string  area = 3;
   string buyerClass = 4;

+ 1 - 0
jyBXSubscribe/rpc/etc/bxsubscribe.yaml

@@ -4,4 +4,5 @@ Etcd:
   Hosts:
   - 127.0.0.1:2379
   Key: bxsubscribe.rpc
+Timeout: 8000
 Webrpcport: 8011

+ 5 - 1
jyBXSubscribe/rpc/etc/db.yaml

@@ -30,9 +30,13 @@ mysql:
 redis:
     addr:
         - other=192.168.3.206:1712
+        - push=192.168.3.206:1712
+        - pushcache_1=192.168.3.206:5000
+        - pushcache_2_a=192.168.3.206:5001
+        - pushcache_2_b=192.168.3.206:5002
 es:
     addr: http://192.168.3.206:9800
-    size: 5
+    size: 30
 mongo:
     main:
         dbName: qfw

+ 82 - 82
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -315,7 +315,7 @@ type SubscribeInfo struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id           string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	XId          string   `protobuf:"bytes,1,opt,name=_id,json=Id,proto3" json:"_id,omitempty"`
 	Title        string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
 	Area         string   `protobuf:"bytes,3,opt,name=area,proto3" json:"area,omitempty"`
 	BuyerClass   string   `protobuf:"bytes,4,opt,name=buyerClass,proto3" json:"buyerClass,omitempty"`
@@ -370,9 +370,9 @@ func (*SubscribeInfo) Descriptor() ([]byte, []int) {
 	return file_bxsubscribe_proto_rawDescGZIP(), []int{3}
 }
 
-func (x *SubscribeInfo) GetId() string {
+func (x *SubscribeInfo) GetXId() string {
 	if x != nil {
-		return x.Id
+		return x.XId
 	}
 	return ""
 }
@@ -801,85 +801,85 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x2e, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
 	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73,
 	0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22,
-	0xd3, 0x04, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
-	0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18,
-	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x62,
-	0x75, 0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73,
-	0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
-	0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72,
-	0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72,
-	0x79, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54,
-	0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
-	0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17,
-	0x0a, 0x07, 0x63, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x06, 0x63, 0x61, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x5f, 0x69, 0x73,
-	0x76, 0x69, 0x73, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x61, 0x49,
-	0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x74, 0x79, 0x70,
-	0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12,
-	0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03,
-	0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x0a,
-	0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62,
-	0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75,
-	0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f,
-	0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
-	0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
-	0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f,
-	0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
-	0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77,
-	0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e,
-	0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x69,
-	0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65,
-	0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76, 0x69,
-	0x70, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x73, 0x76, 0x69, 0x70,
-	0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74,
-	0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x45,
-	0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x57, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
-	0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6d,
-	0x0a, 0x0c, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19,
-	0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72,
-	0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d,
-	0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
-	0x32, 0x15, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53,
-	0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x84, 0x02,
-	0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61,
-	0x73, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4b,
-	0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x47, 0x75, 0x69, 0x64, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x47, 0x75, 0x69, 0x64, 0x65,
-	0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08,
-	0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
-	0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x50, 0x61,
-	0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69,
-	0x73, 0x50, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x74,
-	0x68, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f,
-	0x74, 0x68, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65,
-	0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64,
-	0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03,
-	0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06,
-	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
-	0x65, 0x72, 0x49, 0x64, 0x32, 0xa3, 0x01, 0x0a, 0x0b, 0x42, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
-	0x72, 0x69, 0x62, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x4c, 0x69,
-	0x73, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52,
-	0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x53, 0x6f, 0x6d,
-	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
-	0x19, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f,
-	0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f,
-	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x33,
+	0xd4, 0x04, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a, 0x0a,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07,
+	0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
+	0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74,
+	0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74,
+	0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d,
+	0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
+	0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
+	0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
+	0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x06, 0x63, 0x61, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x5f, 0x69,
+	0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x61,
+	0x49, 0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x74, 0x79,
+	0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16,
+	0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f,
+	0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d,
+	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x10, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72,
+	0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69,
+	0x6e, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x54,
+	0x69, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70,
+	0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76,
+	0x69, 0x70, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x73, 0x76, 0x69,
+	0x70, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73,
+	0x74, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x61, 0x46, 0x69, 0x6c, 0x65,
+	0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x57, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e,
+	0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22,
+	0x6d, 0x0a, 0x0c, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72,
+	0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72,
+	0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x84,
+	0x02, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x68,
+	0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73,
+	0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x47, 0x75, 0x69, 0x64, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x49, 0x6e, 0x47, 0x75, 0x69, 0x64,
+	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x1a, 0x0a,
+	0x08, 0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x08, 0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x50,
+	0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
+	0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f,
+	0x74, 0x68, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
+	0x6f, 0x74, 0x68, 0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52,
+	0x65, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61,
+	0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a,
+	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0xa3, 0x01, 0x0a, 0x0b, 0x42, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x4c,
+	0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73,
+	0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x53, 0x6f,
+	0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
+	0x1a, 0x19, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53,
+	0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0f, 0x5a, 0x0d, 0x2e,
+	0x2f, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 12 - 17
jyBXSubscribe/rpc/util/push.go

@@ -31,14 +31,14 @@ const (
 	SubVipFlag   = "vType"
 	MemberFlag   = "mType"
 	EntnicheFlag = "eType"
-	threeDay     = 172800
+	oneDay       = 24 * 60 * 60
 )
 
 var aboutDbMsg map[string]*AboutDbMsg = map[string]*AboutDbMsg{
 	SubFreeFlag:  &AboutDbMsg{"pushsubscribe", "subpush"},
 	SubVipFlag:   &AboutDbMsg{"pushsubscribe", "subpush"},
 	MemberFlag:   &AboutDbMsg{"pushmember", "memberpush"},
-	EntnicheFlag: &AboutDbMsg{"pushentniche", "pushentniche"},
+	EntnicheFlag: &AboutDbMsg{"pushentniche", "entnichepush"},
 }
 
 type AboutDbMsg struct {
@@ -102,8 +102,8 @@ func NewSubscribePush(module ...string) *subscribePush {
 }
 
 //从pushcache_2_a中取
-func (h *subscribePush) GetTodayCache(userId string) (*SubPush, error) {
-	pc_a, err := redis.GetNewBytes("pushcache_2_b", h.todayKey(userId))
+func (s *subscribePush) GetTodayCache(userId string) (*SubPush, error) {
+	pc_a, err := redis.GetNewBytes("pushcache_2_b", s.todayKey(userId))
 	if err != nil {
 		return nil, err
 	}
@@ -118,8 +118,8 @@ func (h *subscribePush) GetTodayCache(userId string) (*SubPush, error) {
 }
 
 //往pushcache_2_a中放
-func (h *subscribePush) PutTodayCache(userId string, pc_a *SubPush) {
-	redis.Put("pushcache_2_b", h.todayKey(userId), pc_a, threeDay)
+func (s *subscribePush) PutTodayCache(userId string, pc_a *SubPush) {
+	redis.Put("pushcache_2_b", s.todayKey(userId), pc_a, oneDay)
 }
 
 //获取redis key
@@ -127,7 +127,6 @@ func (s *subscribePush) todayKey(userId string) string {
 	return fmt.Sprintf("%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
 }
 func (s *subscribePush) allKey(userId string) string {
-	logx.Info(fmt.Sprintf("all_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId))
 	return fmt.Sprintf("all_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
 }
 
@@ -165,7 +164,7 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}) *bxs
 		_id = common.ObjToString((*info)["_id"])
 	}
 	return &bxsubscribe.SubscribeInfo{
-		Id:           encrypt.EncodeArticleId2ByCheck(_id),
+		XId:          encrypt.EncodeArticleId2ByCheck(_id),
 		Title:        common.ObjToString((*info)["title"]),
 		Area:         area,
 		BuyerClass:   common.ObjToString((*info)["buyerclass"]),
@@ -237,8 +236,7 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 	end := start + spqp.PageSize
 	//时间是今天,没有别的过滤条件
 	if nowFormat == date.FormatDateByInt64(&starttime, date.Date_Short_Layout) && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" && spqp.Price == "" && spqp.FileExists == "" {
-
-		logx.Info("a1")
+		logx.Info("a1:", s.todayKey(spqp.UserId))
 		subPush, err := s.GetTodayCache(spqp.UserId)
 		if err != nil {
 			logx.Info(spqp.UserId, "GetTodayCache Error", err)
@@ -261,7 +259,7 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 		}
 		total = int64(length)
 	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize <= 250 { //全部,没有过滤条件 之前缓存5页*50条=250
-		logx.Info("a2")
+		logx.Info("a2:", s.allKey(spqp.UserId))
 		allCache, err := s.GetAllCache(spqp.UserId)
 		if err != nil {
 			logx.Info(spqp.UserId, "GetAllCache Error", err)
@@ -443,7 +441,6 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 	} else {
 		result = []*bxsubscribe.SubscribeInfo{}
 	}
-	logx.Info("------ooooo----:", len(result))
 	return
 }
 
@@ -472,7 +469,6 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mongodb.MongodbSim, bidding, bi
 			info_m, _ := info_i.(map[string]interface{})
 			info_m["_id"] = v
 			infos[v] = info_m
-			logx.Info("----", info_m, "----")
 		} else {
 			es_ids = append(es_ids, v)
 		}
@@ -557,7 +553,7 @@ func (s *subscribePush) GetJyPushs(datas []map[string]interface{}) (pushCas []*P
 
 //查看全部列表缓存
 func (s *subscribePush) PutAllCache(userId string, datas *SubPush) {
-	redis.Put("pushcache_2_a", s.allKey(userId), datas, threeDay)
+	redis.Put("pushcache_2_a", s.allKey(userId), datas, oneDay)
 }
 
 func (s *subscribePush) GetAllCache(userId string) (*SubPush, error) {
@@ -587,7 +583,7 @@ func (s *subscribePush) MakeCollection(userId string, list []*bxsubscribe.Subscr
 	param := []interface{}{userId}
 	wh := []string{}
 	for _, v := range list {
-		array := encrypt.DecodeArticleId2ByCheck(v.Id)
+		array := encrypt.DecodeArticleId2ByCheck(v.XId)
 		if len(array) == 1 && array[0] != "" {
 			param = append(param, array[0])
 			wh = append(wh, "?")
@@ -602,7 +598,7 @@ func (s *subscribePush) MakeCollection(userId string, list []*bxsubscribe.Subscr
 			}
 		}
 		for _, v := range list {
-			if bid_map[v.Id] {
+			if bid_map[v.XId] {
 				v.Collection = 1
 			}
 		}
@@ -690,7 +686,6 @@ func GetKeySet(t string, u *map[string]interface{}, data []string) (bool, []stri
 		if t == SubFreeFlag {
 			o_jy, _ := (*u)["o_jy"].(map[string]interface{})
 			a_key, _ := o_jy["a_key"].([]interface{})
-			logx.Info(industry_, "--------------------------", len(a_key))
 			return len(a_key) > 0, industry_
 		} else {
 			var obj map[string]interface{}