Selaa lähdekoodia

feat:最新招标信息

wangshan 3 vuotta sitten
vanhempi
commit
7edbeb386a

+ 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"`       //商机管理用户 用户id:entUserId
 	}
 	//公共接口返回
 	CommonRes {

+ 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"`       //商机管理用户 用户id:entUserId
 }
 
 type CommonRes struct {

+ 2 - 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:普通用户
 }
 
 //

+ 37 - 4
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -9,6 +9,7 @@ import (
 	IC "jyBXBase/rpc/init"
 	"jyBXBase/rpc/model"
 	"log"
+	"sort"
 	"strings"
 	"time"
 
@@ -53,25 +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,"o_member_jy":1,"i_member_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
 			}
 			//普通用户用户- 有关键词
@@ -79,11 +106,12 @@ 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
 			}
 			//搜索历史-关键词
@@ -113,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 {

+ 20 - 3
jyBXBase/rpc/model/newestBidding.go

@@ -27,8 +27,26 @@ 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"
+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{}
@@ -55,7 +73,6 @@ func GetPushHistory(userId string) (res []*bxbase.NewestList) {
 			if list != nil {
 				for _, v := range *list {
 					_id := MC.ObjToString(v["_id"])
-					log.Println(_id, "--1---:", v["publishtime"])
 					bn := infos[_id]
 					bn.Title = MC.ObjToString(v["title"])
 					bn.PublishTime = MC.Int64All(v["publishtime"])

+ 121 - 101
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
@@ -2461,106 +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, 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,
+	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, 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, 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,
+	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, 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,
+	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 (

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

@@ -38,7 +38,7 @@ 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, oneDay)
+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)
 }
 
@@ -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)
 		}
@@ -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{}