Преглед изворни кода

feat:移动端首页 最新招标信息

wangshan пре 3 година
родитељ
комит
6c42e4421a

+ 11 - 1
jyBXBase/api/bxbase.api

@@ -78,7 +78,13 @@ type (
 		Notkey       string `json:"notkey,optional"`     //排除词
 		InKey        string `json:"inkey,optional"`
 	}
-
+	//首页最新招标信息
+	NewestReq {
+		City     string `json:"city,optional"`     //定位城市
+		IsSearch int64  `json:"isSearch,optional"` //是否根据定位查询es
+		UserId   string `header:"userId,optional"` //用户id
+		AppId    string `header:"appId"`           //appId
+	}
 	//公共接口返回
 	CommonRes {
 		Err_code int         `json:"error_code"`
@@ -119,4 +125,8 @@ service bxbase-api {
 	//删除筛选条件
 	@handler DelSearchScreen
 	post /jybx/base/delSearchScreen (DelSearchScreen) returns(CommonRes)
+	
+	//首页最新招标信息
+	@handler NewestBidding
+	post /jybx/base/newest (NewestReq) returns(CommonRes)
 }

+ 28 - 0
jyBXBase/api/internal/handler/newestBiddingHandler.go

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

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

@@ -62,6 +62,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/base/delSearchScreen",
 				Handler: DelSearchScreenHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/base/newest",
+				Handler: NewestBiddingHandler(serverCtx),
+			},
 		},
 	)
 }

+ 50 - 0
jyBXBase/api/internal/logic/newestBiddingLogic.go

@@ -0,0 +1,50 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXBase/rpc/bxbase"
+	"net/http"
+
+	"jyBXBase/api/internal/svc"
+	"jyBXBase/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type NewestBiddingLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewNewestBiddingLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *NewestBiddingLogic {
+	return &NewestBiddingLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+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,
+	})
+	if err0 != nil {
+		return &types.CommonRes{
+			Err_code: -1,
+			Err_msg:  "错误",
+			Data:     nil,
+		}, nil
+	}
+	return &types.CommonRes{
+		Err_code: common.IntAll(res.ErrCode),
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 7 - 0
jyBXBase/api/internal/types/types.go

@@ -70,6 +70,13 @@ type AddSearchScreen struct {
 	InKey        string `json:"inkey,optional"`
 }
 
+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
+}
+
 type CommonRes struct {
 	Err_code int         `json:"error_code"`
 	Err_msg  string      `json:"error_msg"`

+ 11 - 6
jyBXBase/entity/db.go

@@ -20,14 +20,19 @@ type MongoStruct struct {
 	MaxIdleConns   int    `json:"maxIdleConns,optional"`
 }
 
+type Mysql struct {
+	Main *MysqlStruct `json:"main,optional"`
+	Push *MysqlStruct `json:"push,optional"`
+}
+
 //mysql
 type MysqlStruct struct {
-	DbName       string `json:"dbName"`
-	Address      string `json:"address"`
-	UserName     string `json:"userName"`
-	Password     string `json:"password"`
-	MaxOpenConns int    `json:"maxOpenConns"`
-	MaxIdleConns int    `json:"maxIdleConns"`
+	DbName       string `json:"dbName,optional"`
+	Address      string `json:"address,optional"`
+	UserName     string `json:"userName,optional"`
+	Password     string `json:"password,optional"`
+	MaxOpenConns int    `json:"maxOpenConns,optional"`
+	MaxIdleConns int    `json:"maxIdleConns,optional"`
 }
 
 //redis

+ 45 - 1
jyBXBase/rpc/bxbase.proto

@@ -134,7 +134,7 @@ message ListSearchRes{
 message AddSearchReq{
   string userId =1;
   string type =2;
-  string keywords =3;                   //搜索词
+  string keywords =3;     //搜索词
   string publishTime=4;   //发布时间
   string area =5;       //地区
   string subtype =6;    //信息类型
@@ -155,11 +155,52 @@ message DelSearchReq{
   string id =1;
 }
 
+//首页最新招标信息Req
+
+message NewestBiddingReq{
+  string  city = 1;
+  int64 isSearch = 2;
+  string  userId = 3;
+  string  appId = 4;
+}
+
+//首页最新招标信息Resp
+message NewsetBiddingResp{
+  int64 err_code = 1;
+  string err_msg = 2;
+  NewsetBidding data = 3;
+}
+message NewsetBidding{
+  bool  isVip = 1;//是否超级订阅用户
+  bool hasSubKeys = 2;//是否有订阅词
+  bool hasHSKeys = 3;//是否有搜索历史
+  int64 count = 4;//数据长度
+  repeated newestList list = 5;//数据
+  repeated  string  history = 6;//历史数据
+}
+
+//
+message newestList {
+  string  area = 1;//省份
+  string city = 2;//城市
+  int64 bidamount = 3;//中标金额
+  int64 budget = 4;//预算
+  string buyerclass = 5;//采购单位类型
+  string matchkeys = 6;//订阅匹配信息
+  int64 publishTime = 7;//发布时间
+  string industry = 8;//行业
+  string  title = 9;//标题
+  string  subtype = 10;//
+  string  appId = 11;
+  string id = 12;//招标信息id
+  bool fileExists = 13;//是否有附件
+}
 //公共返回
 message CommonRes {
   int64 err_code = 1;
   string err_msg = 2;
 }
+
 //公共返回
 message CheckRes {
   int64 err_code = 1;
@@ -191,4 +232,7 @@ service bxbase {
   rpc CheckSearch(AddSearchReq) returns(CheckRes);
   //删除筛选列表
   rpc DelSearch(DelSearchReq) returns(CommonRes);
+
+  //首页最新招标信息
+  rpc NewestBidding(NewestBiddingReq)returns(NewsetBiddingResp);
 }

+ 12 - 0
jyBXBase/rpc/bxbase/bxbase.go

@@ -34,6 +34,10 @@ type (
 	ListReq           = bxbase.ListReq
 	ListRes           = bxbase.ListRes
 	ListSearchRes     = bxbase.ListSearchRes
+	NewestBiddingReq  = bxbase.NewestBiddingReq
+	NewestList        = bxbase.NewestList
+	NewsetBidding     = bxbase.NewsetBidding
+	NewsetBiddingResp = bxbase.NewsetBiddingResp
 	ShowSearchReq     = bxbase.ShowSearchReq
 	ShowSearchRes     = bxbase.ShowSearchRes
 
@@ -58,6 +62,8 @@ type (
 		CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CheckRes, error)
 		// 删除筛选列表
 		DelSearch(ctx context.Context, in *DelSearchReq, opts ...grpc.CallOption) (*CommonRes, error)
+		// 首页最新招标信息
+		NewestBidding(ctx context.Context, in *NewestBiddingReq, opts ...grpc.CallOption) (*NewsetBiddingResp, error)
 	}
 
 	defaultBxbase struct {
@@ -130,3 +136,9 @@ func (m *defaultBxbase) DelSearch(ctx context.Context, in *DelSearchReq, opts ..
 	client := bxbase.NewBxbaseClient(m.cli.Conn())
 	return client.DelSearch(ctx, in, opts...)
 }
+
+// 首页最新招标信息
+func (m *defaultBxbase) NewestBidding(ctx context.Context, in *NewestBiddingReq, opts ...grpc.CallOption) (*NewsetBiddingResp, error) {
+	client := bxbase.NewBxbaseClient(m.cli.Conn())
+	return client.NewestBidding(ctx, in, opts...)
+}

+ 14 - 6
jyBXBase/rpc/etc/db.yaml

@@ -1,10 +1,18 @@
 mysql:
-    dbName: jianyu
-    address: 192.168.3.11:3366
-    userName: root
-    password: Topnet123
-    maxOpenConns: 5
-    maxIdleConns: 5
+    main:
+        dbName: jianyu
+        address: 192.168.3.11:3366
+        userName: root
+        password: Topnet123
+        maxOpenConns: 5
+        maxIdleConns: 5
+    push:
+        dbName: jianyu
+        address: 192.168.3.11:3366
+        userName: root
+        password: Topnet123
+        maxOpenConns: 5
+        maxIdleConns: 5
 redis:
     addr:
         - other=192.168.3.206:1712

+ 23 - 9
jyBXBase/rpc/init/db.go

@@ -17,6 +17,7 @@ import (
 
 var (
 	MainMysql  *mysql.Mysql
+	PushMysql  *mysql.Mysql
 	Mgo        mongodb.MongodbSim
 	MgoEnt     mongodb.MongodbSim
 	MgoBidding mongodb.MongodbSim
@@ -61,20 +62,33 @@ func MongoDBInit(em *entity.Mongo) {
 }
 
 //
-func MysqlInit(em *entity.MysqlStruct) {
+func MysqlInit(em *entity.Mysql) {
 	//初始化 mysql-main
-	if em.Address != "" {
-		logx.Info("--初始化 mysql--")
+	if em.Main.Address != "" {
+		logx.Info("--初始化 main mysql--")
 		MainMysql = &mysql.Mysql{
-			Address:      em.Address,
-			UserName:     em.UserName,
-			PassWord:     em.Password,
-			DBName:       em.DbName,
-			MaxOpenConns: em.MaxOpenConns,
-			MaxIdleConns: em.MaxIdleConns,
+			Address:      em.Main.Address,
+			UserName:     em.Main.UserName,
+			PassWord:     em.Main.Password,
+			DBName:       em.Main.DbName,
+			MaxOpenConns: em.Main.MaxOpenConns,
+			MaxIdleConns: em.Main.MaxIdleConns,
 		}
 		MainMysql.Init()
 	}
+	//初始化 mysql-push
+	if em.Push.Address != "" {
+		logx.Info("--初始化 push mysql--")
+		PushMysql = &mysql.Mysql{
+			Address:      em.Push.Address,
+			UserName:     em.Push.UserName,
+			PassWord:     em.Push.Password,
+			DBName:       em.Push.DbName,
+			MaxOpenConns: em.Push.MaxOpenConns,
+			MaxIdleConns: em.Push.MaxIdleConns,
+		}
+		PushMysql.Init()
+	}
 }
 
 //

+ 4 - 4
jyBXBase/rpc/internal/config/config.go

@@ -11,8 +11,8 @@ type Config struct {
 }
 
 type Db struct {
-	Mysql entity.MysqlStruct `json:"mysql"`
-	Redis entity.RedisStuct  `json:"redis"`
-	Es    entity.EsStruct    `json:"es"`
-	Mongo entity.Mongo       `json:"mongo"`
+	Mysql entity.Mysql      `json:"mysql"`
+	Redis entity.RedisStuct `json:"redis"`
+	Es    entity.EsStruct   `json:"es"`
+	Mongo entity.Mongo      `json:"mongo"`
 }

+ 122 - 0
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -0,0 +1,122 @@
+package logic
+
+import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/redis"
+	"context"
+	"encoding/json"
+	"fmt"
+	IC "jyBXBase/rpc/init"
+	"jyBXBase/rpc/model"
+	"log"
+	"strings"
+
+	"jyBXBase/rpc/internal/svc"
+	"jyBXBase/rpc/type/bxbase"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type NewestBiddingLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewNewestBiddingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *NewestBiddingLogic {
+	return &NewestBiddingLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 首页最新招标信息
+func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase.NewsetBiddingResp, error) {
+	r := func(in *bxbase.NewestBiddingReq) *bxbase.NewsetBiddingResp {
+		var res = &bxbase.NewsetBiddingResp{
+			Data: &bxbase.NewsetBidding{
+				List: []*bxbase.NewestList{},
+			},
+		}
+		log.Println("userid:", in.UserId)
+		rks := MC.If(in.UserId != "", in.UserId, in.City).(string)
+		redisByte, err := redis.GetBytes("other", "p1_indexMessage_new_"+rks)
+		if redisByte != nil && len(*redisByte) > 0 && err != nil {
+			err := json.Unmarshal(*redisByte, res.Data)
+			if err != nil {
+				logx.Info("读取缓存 序列化异常")
+			}
+			return res
+		}
+		//登录用户
+		if in.UserId != "" {
+			//获取订阅信息
+			userMap, ok := IC.Mgo.FindById("user", rks, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
+			if !ok || userMap == nil || len(*userMap) == 0 {
+				//查询出错
+				res.ErrMsg = fmt.Errorf("未查询到用户信息").Error()
+				return res
+			}
+			//根据订阅词获取查询语句
+			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
+			//vip用户
+			if vipStatus > 0 {
+				o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
+				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
+				//vip查询推送历史
+				result := model.GetPushHistory(rks)
+				res.Data.IsVip = true
+				res.Data.HasSubKeys = ok && len(vip_items) > 0
+				res.Data.Count = int64(len(result))
+				res.Data.List = result
+				return res
+			}
+			//普通用户用户- 有关键词
+			o_msgset := MC.ObjToMap((*userMap)["o_jy"])
+			items, ok := (*o_msgset)["a_key"].([]interface{})
+			if ok && len(items) > 0 {
+				//普通用户查询推送历史
+				result := model.GetPushHistory(rks)
+				res.Data.IsVip = false
+				res.Data.HasSubKeys = ok && len(items) > 0
+				res.Data.Count = int64(len(result))
+				res.Data.List = result
+				return res
+			}
+			//搜索历史-关键词
+			hKeys := redis.GetStr("other", fmt.Sprintf("s_%", in.UserId))
+			if hKeys != "" && len(strings.Split(hKeys, ",")) > 0 {
+				query := model.NewestQuery("", hKeys)
+				result := model.NewestES(query)
+				res.Data.IsVip = false
+				res.Data.HasSubKeys = false
+				res.Data.Count = int64(len(result))
+				res.Data.List = result
+				return res
+			}
+		} else if in.IsSearch == 2 { //定位查询
+			query := model.NewestQuery(in.City, "")
+			result := model.NewestES(query)
+			res.Data.IsVip = false
+			res.Data.HasSubKeys = false
+			res.Data.Count = int64(len(result))
+			res.Data.List = result
+			return res
+		}
+		return res
+	}(in)
+	if r.Data.Count > 0 {
+		rks := MC.If(in.UserId != "", in.UserId, in.City).(string)
+		b, err := json.Marshal(r.Data.List)
+		if err != nil {
+			logx.Info("保存缓存 序列化异常")
+		} else {
+			if err := redis.PutBytes("other", "p1_indexMessage_new_"+rks, &b, 24*60*60); err != nil {
+				logx.Info("保存缓存 redis 异常")
+			}
+
+		}
+	}
+	return r, nil
+}

+ 6 - 0
jyBXBase/rpc/internal/server/bxbaseserver.go

@@ -81,3 +81,9 @@ func (s *BxbaseServer) DelSearch(ctx context.Context, in *bxbase.DelSearchReq) (
 	l := logic.NewDelSearchLogic(ctx, s.svcCtx)
 	return l.DelSearch(in)
 }
+
+// 首页最新招标信息
+func (s *BxbaseServer) NewestBidding(ctx context.Context, in *bxbase.NewestBiddingReq) (*bxbase.NewsetBiddingResp, error) {
+	l := logic.NewNewestBiddingLogic(ctx, s.svcCtx)
+	return l.NewestBidding(in)
+}

+ 159 - 0
jyBXBase/rpc/model/newestBidding.go

@@ -0,0 +1,159 @@
+package model
+
+import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	ME "app.yhyue.com/moapp/jybase/encrypt"
+	elastic "app.yhyue.com/moapp/jybase/esv1"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"fmt"
+	"go.mongodb.org/mongo-driver/bson/primitive"
+	"jyBXBase/rpc/bxbase"
+	IC "jyBXBase/rpc/init"
+	"strings"
+	"time"
+)
+
+const (
+	search_index        = "bidding"
+	search_type         = "bidding"
+	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1}`
+	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext"],"from":0,"size":%d}`
+	multi_match         = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
+	query_bool_must     = `{"terms":{"%s":[%s]}}`
+	query_bool_must_and = `{"bool":{"must":[%s],"must_not":[%s]}}`
+)
+
+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(0, 0, -7).Unix()))
+	if len(*list) > 0 {
+		m := map[string]bool{}
+		es_ids := []string{}
+		infos := map[string]*bxbase.NewestList{}
+		for _, v := range *list {
+			infoId := MC.ObjToString(v["infoid"])
+			if m[infoId] {
+				continue
+			}
+			es_ids = append(es_ids, infoId)
+			m[MC.ObjToString(v["infoid"])] = true
+			//
+			infos[infoId] = &bxbase.NewestList{
+				Id:         ME.EncodeArticleId2ByCheck(MC.ObjToString(v["infoid"])),
+				Matchkeys:  MC.ObjToString(v["matchkeys"]),
+				Budget:     MC.Int64All(v["budget"]),
+				Bidamount:  MC.Int64All(v["bidamount"]),
+				FileExists: MC.Int64All(v["attachment_count"]) > 0,
+			}
+		}
+		if len(es_ids) > 0 {
+			list := elastic.Get(search_index, search_type, fmt.Sprintf(query, strings.Join(es_ids, `","`), len(es_ids)))
+			if list != nil {
+				for _, v := range *list {
+					_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.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)
+				}
+			}
+		}
+		//mongodb bidding
+		mgo_ids := []primitive.ObjectID{}
+		for _, v := range es_ids {
+			if infos[v] == nil {
+				_id, _ := primitive.ObjectIDFromHex(v)
+				mgo_ids = append(mgo_ids, _id)
+			}
+		}
+		if len(mgo_ids) > 0 {
+			list, ok := IC.MgoBidding.Find("bidding", map[string]interface{}{"_id": map[string]interface{}{"$in": mgo_ids}}, nil, mongodb_fields, false, -1, -1)
+			if ok && *list != nil {
+				for _, v := range *list {
+					_id := mongodb.BsonIdToSId(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.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)
+				}
+			}
+		}
+		//mongodb bidding_back
+		mgo_back_ids := []primitive.ObjectID{}
+		for _, v := range mgo_ids {
+			if infos[mongodb.BsonIdToSId(v)] == nil {
+				mgo_back_ids = append(mgo_back_ids, v)
+			}
+		}
+		if len(mgo_back_ids) > 0 {
+			list, ok := IC.MgoBidding.Find("bidding_back", map[string]interface{}{"_id": map[string]interface{}{"$in": mgo_back_ids}}, nil, mongodb_fields, false, -1, -1)
+			if ok && *list != nil {
+				for _, v := range *list {
+					_id := mongodb.BsonIdToSId(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.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)
+				}
+			}
+		}
+		//
+		for _, v := range infos {
+			res = append(res, v)
+		}
+	}
+	return
+}
+
+//根据定位或者搜索历史 查es
+func NewestQuery(city, keys string) (str string) {
+	var musts, bools []string
+	if keys != "" {
+		for _, v := range strings.Split(keys, ",") {
+			keys := strings.Split(v, " ") //历史搜索 空格划分
+			must_tmp := []string{}
+			for _, key := range keys {
+				must_tmp = append(must_tmp, fmt.Sprintf(multi_match, "\""+key+"\""))
+			}
+			bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(must_tmp, ","), ""))
+		}
+
+	}
+	if city != "" {
+		musts = append(musts, fmt.Sprintf(query_bool_must, "city", `"`+city+`"`))
+	}
+	str = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","))
+	return
+}
+
+//es查询
+func NewestES(doSearchStr string) (res []*bxbase.NewestList) {
+	list := elastic.Get(search_index, search_type, doSearchStr)
+	if list != nil && len(*list) > 0 {
+		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, v["subtype"], v["toptype"]).(string),
+				Area:       MC.If(MC.ObjToString(v["area"]) == "A", "全国", 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,
+			})
+		}
+	}
+	return
+}

+ 564 - 85
jyBXBase/rpc/type/bxbase/bxbase.pb.go

@@ -1,12 +1,13 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.0
-// 	protoc        v3.19.4
+// 	protoc-gen-go v1.23.0
+// 	protoc        v3.15.5
 // source: bxbase.proto
 
 package bxbase
 
 import (
+	proto "github.com/golang/protobuf/proto"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -20,6 +21,10 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+// This is a compile-time assertion that a sufficiently up-to-date version
+// of the legacy proto package is being used.
+const _ = proto.ProtoPackageIsVersion4
+
 type AddlabelReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1671,6 +1676,372 @@ func (x *DelSearchReq) GetId() string {
 	return ""
 }
 
+type NewestBiddingReq struct {
+	state         protoimpl.MessageState
+	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"`
+}
+
+func (x *NewestBiddingReq) Reset() {
+	*x = NewestBiddingReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbase_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *NewestBiddingReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NewestBiddingReq) ProtoMessage() {}
+
+func (x *NewestBiddingReq) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbase_proto_msgTypes[21]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use NewestBiddingReq.ProtoReflect.Descriptor instead.
+func (*NewestBiddingReq) Descriptor() ([]byte, []int) {
+	return file_bxbase_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *NewestBiddingReq) GetCity() string {
+	if x != nil {
+		return x.City
+	}
+	return ""
+}
+
+func (x *NewestBiddingReq) GetIsSearch() int64 {
+	if x != nil {
+		return x.IsSearch
+	}
+	return 0
+}
+
+func (x *NewestBiddingReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *NewestBiddingReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+//首页最新招标信息Resp
+type NewsetBiddingResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrCode int64          `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
+	ErrMsg  string         `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
+	Data    *NewsetBidding `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *NewsetBiddingResp) Reset() {
+	*x = NewsetBiddingResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbase_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *NewsetBiddingResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NewsetBiddingResp) ProtoMessage() {}
+
+func (x *NewsetBiddingResp) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbase_proto_msgTypes[22]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use NewsetBiddingResp.ProtoReflect.Descriptor instead.
+func (*NewsetBiddingResp) Descriptor() ([]byte, []int) {
+	return file_bxbase_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *NewsetBiddingResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *NewsetBiddingResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *NewsetBiddingResp) GetData() *NewsetBidding {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type NewsetBidding struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	IsVip      bool          `protobuf:"varint,1,opt,name=isVip,proto3" json:"isVip,omitempty"`           //是否超级订阅用户
+	HasSubKeys bool          `protobuf:"varint,2,opt,name=hasSubKeys,proto3" json:"hasSubKeys,omitempty"` //是否有订阅词
+	HasHSKeys  bool          `protobuf:"varint,3,opt,name=hasHSKeys,proto3" json:"hasHSKeys,omitempty"`   //是否有搜索历史
+	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"`        //历史数据
+}
+
+func (x *NewsetBidding) Reset() {
+	*x = NewsetBidding{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbase_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *NewsetBidding) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NewsetBidding) ProtoMessage() {}
+
+func (x *NewsetBidding) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbase_proto_msgTypes[23]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use NewsetBidding.ProtoReflect.Descriptor instead.
+func (*NewsetBidding) Descriptor() ([]byte, []int) {
+	return file_bxbase_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *NewsetBidding) GetIsVip() bool {
+	if x != nil {
+		return x.IsVip
+	}
+	return false
+}
+
+func (x *NewsetBidding) GetHasSubKeys() bool {
+	if x != nil {
+		return x.HasSubKeys
+	}
+	return false
+}
+
+func (x *NewsetBidding) GetHasHSKeys() bool {
+	if x != nil {
+		return x.HasHSKeys
+	}
+	return false
+}
+
+func (x *NewsetBidding) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+func (x *NewsetBidding) GetList() []*NewestList {
+	if x != nil {
+		return x.List
+	}
+	return nil
+}
+
+func (x *NewsetBidding) GetHistory() []string {
+	if x != nil {
+		return x.History
+	}
+	return nil
+}
+
+//
+type NewestList struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Area        string `protobuf:"bytes,1,opt,name=area,proto3" json:"area,omitempty"`                //省份
+	City        string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`                //城市
+	Bidamount   int64  `protobuf:"varint,3,opt,name=bidamount,proto3" json:"bidamount,omitempty"`     //中标金额
+	Budget      int64  `protobuf:"varint,4,opt,name=budget,proto3" json:"budget,omitempty"`           //预算
+	Buyerclass  string `protobuf:"bytes,5,opt,name=buyerclass,proto3" json:"buyerclass,omitempty"`    //采购单位类型
+	Matchkeys   string `protobuf:"bytes,6,opt,name=matchkeys,proto3" json:"matchkeys,omitempty"`      //订阅匹配信息
+	PublishTime int64  `protobuf:"varint,7,opt,name=publishTime,proto3" json:"publishTime,omitempty"` //发布时间
+	Industry    string `protobuf:"bytes,8,opt,name=industry,proto3" json:"industry,omitempty"`        //行业
+	Title       string `protobuf:"bytes,9,opt,name=title,proto3" json:"title,omitempty"`              //标题
+	Subtype     string `protobuf:"bytes,10,opt,name=subtype,proto3" json:"subtype,omitempty"`         //
+	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"` //是否有附件
+}
+
+func (x *NewestList) Reset() {
+	*x = NewestList{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxbase_proto_msgTypes[24]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *NewestList) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NewestList) ProtoMessage() {}
+
+func (x *NewestList) ProtoReflect() protoreflect.Message {
+	mi := &file_bxbase_proto_msgTypes[24]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use NewestList.ProtoReflect.Descriptor instead.
+func (*NewestList) Descriptor() ([]byte, []int) {
+	return file_bxbase_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *NewestList) GetArea() string {
+	if x != nil {
+		return x.Area
+	}
+	return ""
+}
+
+func (x *NewestList) GetCity() string {
+	if x != nil {
+		return x.City
+	}
+	return ""
+}
+
+func (x *NewestList) GetBidamount() int64 {
+	if x != nil {
+		return x.Bidamount
+	}
+	return 0
+}
+
+func (x *NewestList) GetBudget() int64 {
+	if x != nil {
+		return x.Budget
+	}
+	return 0
+}
+
+func (x *NewestList) GetBuyerclass() string {
+	if x != nil {
+		return x.Buyerclass
+	}
+	return ""
+}
+
+func (x *NewestList) GetMatchkeys() string {
+	if x != nil {
+		return x.Matchkeys
+	}
+	return ""
+}
+
+func (x *NewestList) GetPublishTime() int64 {
+	if x != nil {
+		return x.PublishTime
+	}
+	return 0
+}
+
+func (x *NewestList) GetIndustry() string {
+	if x != nil {
+		return x.Industry
+	}
+	return ""
+}
+
+func (x *NewestList) GetTitle() string {
+	if x != nil {
+		return x.Title
+	}
+	return ""
+}
+
+func (x *NewestList) GetSubtype() string {
+	if x != nil {
+		return x.Subtype
+	}
+	return ""
+}
+
+func (x *NewestList) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *NewestList) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *NewestList) GetFileExists() bool {
+	if x != nil {
+		return x.FileExists
+	}
+	return false
+}
+
 //公共返回
 type CommonRes struct {
 	state         protoimpl.MessageState
@@ -1684,7 +2055,7 @@ type CommonRes struct {
 func (x *CommonRes) Reset() {
 	*x = CommonRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_bxbase_proto_msgTypes[21]
+		mi := &file_bxbase_proto_msgTypes[25]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1697,7 +2068,7 @@ func (x *CommonRes) String() string {
 func (*CommonRes) ProtoMessage() {}
 
 func (x *CommonRes) ProtoReflect() protoreflect.Message {
-	mi := &file_bxbase_proto_msgTypes[21]
+	mi := &file_bxbase_proto_msgTypes[25]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1710,7 +2081,7 @@ func (x *CommonRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CommonRes.ProtoReflect.Descriptor instead.
 func (*CommonRes) Descriptor() ([]byte, []int) {
-	return file_bxbase_proto_rawDescGZIP(), []int{21}
+	return file_bxbase_proto_rawDescGZIP(), []int{25}
 }
 
 func (x *CommonRes) GetErrCode() int64 {
@@ -1741,7 +2112,7 @@ type CheckRes struct {
 func (x *CheckRes) Reset() {
 	*x = CheckRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_bxbase_proto_msgTypes[22]
+		mi := &file_bxbase_proto_msgTypes[26]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -1754,7 +2125,7 @@ func (x *CheckRes) String() string {
 func (*CheckRes) ProtoMessage() {}
 
 func (x *CheckRes) ProtoReflect() protoreflect.Message {
-	mi := &file_bxbase_proto_msgTypes[22]
+	mi := &file_bxbase_proto_msgTypes[26]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -1767,7 +2138,7 @@ func (x *CheckRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CheckRes.ProtoReflect.Descriptor instead.
 func (*CheckRes) Descriptor() ([]byte, []int) {
-	return file_bxbase_proto_rawDescGZIP(), []int{22}
+	return file_bxbase_proto_rawDescGZIP(), []int{26}
 }
 
 func (x *CheckRes) GetErrCode() int64 {
@@ -1988,53 +2359,105 @@ var file_bxbase_proto_rawDesc = []byte{
 	0x0a, 0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69,
 	0x6e, 0x4b, 0x65, 0x79, 0x22, 0x1e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x53, 0x65, 0x61, 0x72, 0x63,
 	0x68, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x02, 0x69, 0x64, 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, 0xb5, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x78, 0x62, 0x61, 0x73, 0x65, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x02, 0x69, 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, 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 (
@@ -2049,7 +2472,7 @@ func file_bxbase_proto_rawDescGZIP() []byte {
 	return file_bxbase_proto_rawDescData
 }
 
-var file_bxbase_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_bxbase_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
 var file_bxbase_proto_goTypes = []interface{}{
 	(*AddlabelReq)(nil),       // 0: bxcol.AddlabelReq
 	(*AddlabelRes)(nil),       // 1: bxcol.AddlabelRes
@@ -2072,8 +2495,12 @@ var file_bxbase_proto_goTypes = []interface{}{
 	(*ListSearchRes)(nil),     // 18: bxcol.ListSearchRes
 	(*AddSearchReq)(nil),      // 19: bxcol.AddSearchReq
 	(*DelSearchReq)(nil),      // 20: bxcol.DelSearchReq
-	(*CommonRes)(nil),         // 21: bxcol.CommonRes
-	(*CheckRes)(nil),          // 22: bxcol.CheckRes
+	(*NewestBiddingReq)(nil),  // 21: bxcol.NewestBiddingReq
+	(*NewsetBiddingResp)(nil), // 22: bxcol.NewsetBiddingResp
+	(*NewsetBidding)(nil),     // 23: bxcol.NewsetBidding
+	(*NewestList)(nil),        // 24: bxcol.newestList
+	(*CommonRes)(nil),         // 25: bxcol.CommonRes
+	(*CheckRes)(nil),          // 26: bxcol.CheckRes
 }
 var file_bxbase_proto_depIdxs = []int32{
 	4,  // 0: bxcol.GetLabelActionRes.labels:type_name -> bxcol.LabelByUser
@@ -2082,31 +2509,35 @@ var file_bxbase_proto_depIdxs = []int32{
 	14, // 3: bxcol.ListRes.ldata:type_name -> bxcol.ColList
 	15, // 4: bxcol.ColList.res:type_name -> bxcol.ColData
 	18, // 5: bxcol.ShowSearchRes.data:type_name -> bxcol.ListSearchRes
-	0,  // 6: bxcol.bxbase.Addlabel:input_type -> bxcol.AddlabelReq
-	2,  // 7: bxcol.bxbase.GetLabelAction:input_type -> bxcol.GetLabelActionReq
-	5,  // 8: bxcol.bxbase.LabelAction:input_type -> bxcol.LabelActionReq
-	7,  // 9: bxcol.bxbase.BCAction:input_type -> bxcol.BCActionReq
-	8,  // 10: bxcol.bxbase.IsCollAction:input_type -> bxcol.IsCollActionReq
-	12, // 11: bxcol.bxbase.List:input_type -> bxcol.ListReq
-	16, // 12: bxcol.bxbase.ShowSearch:input_type -> bxcol.ShowSearchReq
-	19, // 13: bxcol.bxbase.AddSearch:input_type -> bxcol.AddSearchReq
-	19, // 14: bxcol.bxbase.CheckSearch:input_type -> bxcol.AddSearchReq
-	20, // 15: bxcol.bxbase.DelSearch:input_type -> bxcol.DelSearchReq
-	1,  // 16: bxcol.bxbase.Addlabel:output_type -> bxcol.AddlabelRes
-	3,  // 17: bxcol.bxbase.GetLabelAction:output_type -> bxcol.GetLabelActionRes
-	6,  // 18: bxcol.bxbase.LabelAction:output_type -> bxcol.LabelActionRes
-	6,  // 19: bxcol.bxbase.BCAction:output_type -> bxcol.LabelActionRes
-	9,  // 20: bxcol.bxbase.IsCollAction:output_type -> bxcol.IsCollActionRes
-	13, // 21: bxcol.bxbase.List:output_type -> bxcol.ListRes
-	17, // 22: bxcol.bxbase.ShowSearch:output_type -> bxcol.ShowSearchRes
-	21, // 23: bxcol.bxbase.AddSearch:output_type -> bxcol.CommonRes
-	22, // 24: bxcol.bxbase.CheckSearch:output_type -> bxcol.CheckRes
-	21, // 25: bxcol.bxbase.DelSearch:output_type -> bxcol.CommonRes
-	16, // [16:26] is the sub-list for method output_type
-	6,  // [6:16] is the sub-list for method input_type
-	6,  // [6:6] is the sub-list for extension type_name
-	6,  // [6:6] is the sub-list for extension extendee
-	0,  // [0:6] is the sub-list for field type_name
+	23, // 6: bxcol.NewsetBiddingResp.data:type_name -> bxcol.NewsetBidding
+	24, // 7: bxcol.NewsetBidding.list:type_name -> bxcol.newestList
+	0,  // 8: bxcol.bxbase.Addlabel:input_type -> bxcol.AddlabelReq
+	2,  // 9: bxcol.bxbase.GetLabelAction:input_type -> bxcol.GetLabelActionReq
+	5,  // 10: bxcol.bxbase.LabelAction:input_type -> bxcol.LabelActionReq
+	7,  // 11: bxcol.bxbase.BCAction:input_type -> bxcol.BCActionReq
+	8,  // 12: bxcol.bxbase.IsCollAction:input_type -> bxcol.IsCollActionReq
+	12, // 13: bxcol.bxbase.List:input_type -> bxcol.ListReq
+	16, // 14: bxcol.bxbase.ShowSearch:input_type -> bxcol.ShowSearchReq
+	19, // 15: bxcol.bxbase.AddSearch:input_type -> bxcol.AddSearchReq
+	19, // 16: bxcol.bxbase.CheckSearch:input_type -> bxcol.AddSearchReq
+	20, // 17: bxcol.bxbase.DelSearch:input_type -> bxcol.DelSearchReq
+	21, // 18: bxcol.bxbase.NewestBidding:input_type -> bxcol.NewestBiddingReq
+	1,  // 19: bxcol.bxbase.Addlabel:output_type -> bxcol.AddlabelRes
+	3,  // 20: bxcol.bxbase.GetLabelAction:output_type -> bxcol.GetLabelActionRes
+	6,  // 21: bxcol.bxbase.LabelAction:output_type -> bxcol.LabelActionRes
+	6,  // 22: bxcol.bxbase.BCAction:output_type -> bxcol.LabelActionRes
+	9,  // 23: bxcol.bxbase.IsCollAction:output_type -> bxcol.IsCollActionRes
+	13, // 24: bxcol.bxbase.List:output_type -> bxcol.ListRes
+	17, // 25: bxcol.bxbase.ShowSearch:output_type -> bxcol.ShowSearchRes
+	25, // 26: bxcol.bxbase.AddSearch:output_type -> bxcol.CommonRes
+	26, // 27: bxcol.bxbase.CheckSearch:output_type -> bxcol.CheckRes
+	25, // 28: bxcol.bxbase.DelSearch:output_type -> bxcol.CommonRes
+	22, // 29: bxcol.bxbase.NewestBidding:output_type -> bxcol.NewsetBiddingResp
+	19, // [19:30] is the sub-list for method output_type
+	8,  // [8:19] is the sub-list for method input_type
+	8,  // [8:8] is the sub-list for extension type_name
+	8,  // [8:8] is the sub-list for extension extendee
+	0,  // [0:8] is the sub-list for field type_name
 }
 
 func init() { file_bxbase_proto_init() }
@@ -2368,7 +2799,7 @@ func file_bxbase_proto_init() {
 			}
 		}
 		file_bxbase_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*CommonRes); i {
+			switch v := v.(*NewestBiddingReq); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -2380,6 +2811,54 @@ func file_bxbase_proto_init() {
 			}
 		}
 		file_bxbase_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*NewsetBiddingResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbase_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*NewsetBidding); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbase_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*NewestList); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbase_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CommonRes); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxbase_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*CheckRes); i {
 			case 0:
 				return &v.state
@@ -2398,7 +2877,7 @@ func file_bxbase_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxbase_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   23,
+			NumMessages:   27,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 39 - 1
jyBXBase/rpc/type/bxbase/bxbase_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.19.4
+// - protoc             v3.15.5
 // source: bxbase.proto
 
 package bxbase
@@ -42,6 +42,8 @@ type BxbaseClient interface {
 	CheckSearch(ctx context.Context, in *AddSearchReq, opts ...grpc.CallOption) (*CheckRes, error)
 	//删除筛选列表
 	DelSearch(ctx context.Context, in *DelSearchReq, opts ...grpc.CallOption) (*CommonRes, error)
+	//首页最新招标信息
+	NewestBidding(ctx context.Context, in *NewestBiddingReq, opts ...grpc.CallOption) (*NewsetBiddingResp, error)
 }
 
 type bxbaseClient struct {
@@ -142,6 +144,15 @@ func (c *bxbaseClient) DelSearch(ctx context.Context, in *DelSearchReq, opts ...
 	return out, nil
 }
 
+func (c *bxbaseClient) NewestBidding(ctx context.Context, in *NewestBiddingReq, opts ...grpc.CallOption) (*NewsetBiddingResp, error) {
+	out := new(NewsetBiddingResp)
+	err := c.cc.Invoke(ctx, "/bxcol.bxbase/NewestBidding", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BxbaseServer is the server API for Bxbase service.
 // All implementations must embed UnimplementedBxbaseServer
 // for forward compatibility
@@ -166,6 +177,8 @@ type BxbaseServer interface {
 	CheckSearch(context.Context, *AddSearchReq) (*CheckRes, error)
 	//删除筛选列表
 	DelSearch(context.Context, *DelSearchReq) (*CommonRes, error)
+	//首页最新招标信息
+	NewestBidding(context.Context, *NewestBiddingReq) (*NewsetBiddingResp, error)
 	mustEmbedUnimplementedBxbaseServer()
 }
 
@@ -203,6 +216,9 @@ func (UnimplementedBxbaseServer) CheckSearch(context.Context, *AddSearchReq) (*C
 func (UnimplementedBxbaseServer) DelSearch(context.Context, *DelSearchReq) (*CommonRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method DelSearch not implemented")
 }
+func (UnimplementedBxbaseServer) NewestBidding(context.Context, *NewestBiddingReq) (*NewsetBiddingResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method NewestBidding not implemented")
+}
 func (UnimplementedBxbaseServer) mustEmbedUnimplementedBxbaseServer() {}
 
 // UnsafeBxbaseServer may be embedded to opt out of forward compatibility for this service.
@@ -396,6 +412,24 @@ func _Bxbase_DelSearch_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxbase_NewestBidding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(NewestBiddingReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxbaseServer).NewestBidding(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcol.bxbase/NewestBidding",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxbaseServer).NewestBidding(ctx, req.(*NewestBiddingReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Bxbase_ServiceDesc is the grpc.ServiceDesc for Bxbase service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -443,6 +477,10 @@ var Bxbase_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "DelSearch",
 			Handler:    _Bxbase_DelSearch_Handler,
 		},
+		{
+			MethodName: "NewestBidding",
+			Handler:    _Bxbase_NewestBidding_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxbase.proto",

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

@@ -1,7 +1,7 @@
 Name: bxcore-api
 Host: 0.0.0.0
 Port: 8004
-Timeout: 5000
+Timeout: 10000
 Webrpcport: 8014
 Gateway:
   ServerCode: jybxcore