ソースを参照

关键词获取

WH01243 2 年 前
コミット
9b70a76139

+ 17 - 1
jyBXSubscribe/api/bxsubscribe.api

@@ -36,7 +36,7 @@ type (
 		AppId     string `header:"appId"`
 		UserType  string `path:"userType"`
 		NewUserId int64  `header:"newUserId"`
-		EntId     int64  `header:"endId"`
+		EntId     int64  `header:"entId"`
 	}
 	//
 	commonResp {
@@ -72,6 +72,20 @@ type (
 		IsEnt     bool   `form:"isEnt,optional"`
 		UserType  string `path:"userType,optional"`
 	}
+	GetKeyReq {
+		AppId       string `header:"appId"`
+		UserId      string `header:"userId"`
+		EntId       string `header:"entId,optional"`
+		EntUserId   string `header:"entUserId,optional"`
+		DeptId      string `header:"deptId,optional"` //部门id
+		NewUserId   int64  `header:"newUserId"`
+		IsEnt       bool   `form:"IsEnt,optional"`
+		UserType    string `path:"userType,optional"`
+		VipPower    int64  `form:"vipPower,optional"`
+		MemberPower int64  `form:"memberPower,optional"`
+		PowerSource int64  `form:"powerSource,optional"`
+		UserPower   int64  `form:"userPower,optional"`
+	}
 )
 service bxsubscribe-api {
 	@handler subscribeList
@@ -84,4 +98,6 @@ service bxsubscribe-api {
 	post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
 	@handler SetRead
 	post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
+	@handler getKey
+	post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
 }

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

@@ -37,6 +37,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/subscribe/:userType/setRead",
 				Handler: SetReadHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/subscribe/:userType/getKey",
+				Handler: getKeyHandler(serverCtx),
+			},
 		},
 	)
 }

+ 16 - 1
jyBXSubscribe/api/internal/types/types.go

@@ -28,7 +28,7 @@ type SomeInfoReq struct {
 	AppId     string `header:"appId"`
 	UserType  string `path:"userType"`
 	NewUserId int64  `header:"newUserId"`
-	EntId     int64  `header:"endId"`
+	EntId     int64  `header:"entId"`
 }
 
 type CommonResp struct {
@@ -65,3 +65,18 @@ type SetReadReq struct {
 	IsEnt     bool   `form:"isEnt,optional"`
 	UserType  string `path:"userType,optional"`
 }
+
+type GetKeyReq struct {
+	AppId       string `header:"appId"`
+	UserId      string `header:"userId"`
+	EntId       string `header:"entId,optional"`
+	EntUserId   string `header:"entUserId,optional"`
+	DeptId      string `header:"deptId,optional"` //部门id
+	NewUserId   int64  `header:"newUserId"`
+	IsEnt       bool   `form:"IsEnt,optional"`
+	UserType    string `path:"userType,optional"`
+	VipPower    int64  `form:"vipPower,optional"`
+	MemberPower int64  `form:"memberPower,optional"`
+	PowerSource int64  `form:"powerSource,optional"`
+	UserPower   int64  `form:"userPower,optional"`
+}

+ 25 - 2
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -60,7 +60,7 @@ message subscribeInfo {
   int64  bidOpenTime = 19;
   int64  ca_isvip = 20;
   bool   ca_fileExists = 21;
-  int64  source=22;//来源;1:个人订阅 2:企业自动分发 3:企业手动分发
+  int64  source = 22;//来源;1:个人订阅 2:企业自动分发 3:企业手动分发
 }
 //
 message SomeInfoReq{
@@ -87,7 +87,6 @@ message SomeInfo{
   repeated string  industry = 8;//会员订阅的行业
   string userId = 9;//用户id
 }
-
 //
 message StatusResp{
   string error_msg = 1;
@@ -147,6 +146,28 @@ message SetReadReq{
   string  entUserId = 7;
   bool    isEnt = 8;
 }
+message GetKeyReq{
+  string  appId = 1;
+  string  userId = 2;
+  string  userType = 3;
+  string  entId = 5;
+  int64   newUserId = 6;
+  string  entUserId = 7;
+  bool    isEnt = 8;
+  int64   vipPower = 4;
+  int64   memberPower = 10;
+  int64   powerSource = 11;
+  int64   userPower = 12;
+  string  deptId = 13;
+}
+message KeyResp {
+  int64 err_code = 1;
+  string err_msg = 2;
+  repeated Items items = 3;//关键词
+}
+
+
+
 service Bxsubscribe {
   //获取订阅推送列表
   rpc GetSubList(SubscribeInfosReq) returns(SubscribeInfosResp);
@@ -158,4 +179,6 @@ service Bxsubscribe {
   rpc ByPushHistory(SubscribeInfosReq)returns(ByPushHistoryResp);
   //推送数据浏览状态修改
   rpc SetRead(SetReadReq)returns(StatusResp);
+  //关键词获取
+  rpc GetKey(GetKeyReq)returns(KeyResp);
 }

+ 10 - 0
jyBXSubscribe/rpc/bxsubscribe/bxsubscribe.go

@@ -15,7 +15,9 @@ import (
 type (
 	ByPushHistoryResp      = bxsubscribe.ByPushHistoryResp
 	CityList               = bxsubscribe.CityList
+	GetKeyReq              = bxsubscribe.GetKeyReq
 	Items                  = bxsubscribe.Items
+	KeyResp                = bxsubscribe.KeyResp
 	Keys                   = bxsubscribe.Keys
 	SetReadReq             = bxsubscribe.SetReadReq
 	SomeInfo               = bxsubscribe.SomeInfo
@@ -39,6 +41,8 @@ type (
 		ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error)
 		// 推送数据浏览状态修改
 		SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error)
+		// 关键词获取
+		GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error)
 	}
 
 	defaultBxsubscribe struct {
@@ -81,3 +85,9 @@ func (m *defaultBxsubscribe) SetRead(ctx context.Context, in *SetReadReq, opts .
 	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
 	return client.SetRead(ctx, in, opts...)
 }
+
+// 关键词获取
+func (m *defaultBxsubscribe) GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error) {
+	client := bxsubscribe.NewBxsubscribeClient(m.cli.Conn())
+	return client.GetKey(ctx, in, opts...)
+}

+ 5 - 1
jyBXSubscribe/rpc/internal/logic/getsublistlogic.go

@@ -56,13 +56,17 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 		NewUserId:        in.NewUserId,
 		BaseServiceMysql: IC.BaseServiceMysql,
 		IsEnt:            in.IsEnt,
+		BuySubject:       0,
 	}
 	//主体处理(fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户)
 	if in.UserType == "vType" || in.UserType == "mType" {
-		infoCount := IC.MainMysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW()", in.EntId)
+		infoCount := IC.MainMysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and product_type like '%超级订阅%' or product_type like '大会员' ", in.EntId)
 		if infoCount > 0 {
 			in.UserType = "eType"
+			//主体等于企业的
+			spqp.BuySubject = 1
 		}
+
 	}
 	hasNextPage, total, list := model.NewSubscribePush(in.UserType).Datas(spqp)
 	start1 := time.Now().Unix()

+ 0 - 1
jyBXSubscribe/rpc/internal/logic/getsublistlogic_test.go

@@ -19,7 +19,6 @@ import (
 )
 
 func init() {
-
 	logx.Info("--初始化 mongodb--")
 	IC.Mgo = mongodb.MongodbSim{
 		MongodbAddr: "192.168.3.206:27080",

+ 1 - 0
jyBXSubscribe/rpc/internal/logic/getsubsomeinfologic.go

@@ -34,6 +34,7 @@ func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsu
 		Data: &bxsubscribe.SomeInfo{},
 	}
 	user, _ := model.NewSubscribePush(in.UserType).UserInfo(in.UserId)
+	//
 	resp.Data.HasKey, resp.Data.Industry = model.GetKeySet(in.UserType, user, []string{})
 	todayNum := time.Unix(time.Now().Unix(), 1).Format("20060102")
 	if user != nil {

+ 9 - 0
jyBXSubscribe/rpc/internal/logic/setreadlogic.go

@@ -2,6 +2,7 @@ package logic
 
 import (
 	"context"
+	IC "jyBXSubscribe/rpc/init"
 	"jyBXSubscribe/rpc/model"
 
 	"jyBXSubscribe/rpc/internal/svc"
@@ -28,6 +29,14 @@ func NewSetReadLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SetReadLo
 func (l *SetReadLogic) SetRead(in *bxsubscribe.SetReadReq) (*bxsubscribe.StatusResp, error) {
 	// todo: add your logic here and delete this line
 	resp := &bxsubscribe.StatusResp{}
+	//主体处理(fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户)
+	if in.UserType == "vType" || in.UserType == "mType" {
+		infoCount := IC.MainMysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and product_type like '%超级订阅%' or product_type like '大会员' ", in.EntId)
+		if infoCount > 0 {
+			in.UserType = "eType"
+		}
+
+	}
 	model.NewSubscribePush(in.UserType).SetRead(in.NewUserId, in.GetVsid(), in.UserId, in.EntUserId, in.EntId, in.IsEnt)
 	return resp, nil
 }

+ 0 - 53
jyBXSubscribe/rpc/internal/server/bxsubscribeserver.go

@@ -1,53 +0,0 @@
-// Code generated by goctl. DO NOT EDIT!
-// Source: bxsubscribe.proto
-
-package server
-
-import (
-	"context"
-
-	"jyBXSubscribe/rpc/internal/logic"
-	"jyBXSubscribe/rpc/internal/svc"
-	"jyBXSubscribe/rpc/type/bxsubscribe"
-)
-
-type BxsubscribeServer struct {
-	svcCtx *svc.ServiceContext
-	bxsubscribe.UnimplementedBxsubscribeServer
-}
-
-func NewBxsubscribeServer(svcCtx *svc.ServiceContext) *BxsubscribeServer {
-	return &BxsubscribeServer{
-		svcCtx: svcCtx,
-	}
-}
-
-// 获取订阅推送列表
-func (s *BxsubscribeServer) GetSubList(ctx context.Context, in *bxsubscribe.SubscribeInfosReq) (*bxsubscribe.SubscribeInfosResp, error) {
-	l := logic.NewGetSubListLogic(ctx, s.svcCtx)
-	return l.GetSubList(in)
-}
-
-// 获取订阅推送相关信息
-func (s *BxsubscribeServer) GetSubSomeInfo(ctx context.Context, in *bxsubscribe.SomeInfoReq) (*bxsubscribe.SomeInfoResp, error) {
-	l := logic.NewGetSubSomeInfoLogic(ctx, s.svcCtx)
-	return l.GetSubSomeInfo(in)
-}
-
-// 修改订阅信息接口
-func (s *BxsubscribeServer) UpdateSubScribeInfo(ctx context.Context, in *bxsubscribe.UpdateSubScribeInfoReq) (*bxsubscribe.StatusResp, error) {
-	l := logic.NewUpdateSubScribeInfoLogic(ctx, s.svcCtx)
-	return l.UpdateSubScribeInfo(in)
-}
-
-// 推送页面筛选导出
-func (s *BxsubscribeServer) ByPushHistory(ctx context.Context, in *bxsubscribe.SubscribeInfosReq) (*bxsubscribe.ByPushHistoryResp, error) {
-	l := logic.NewByPushHistoryLogic(ctx, s.svcCtx)
-	return l.ByPushHistory(in)
-}
-
-// 推送数据浏览状态修改
-func (s *BxsubscribeServer) SetRead(ctx context.Context, in *bxsubscribe.SetReadReq) (*bxsubscribe.StatusResp, error) {
-	l := logic.NewSetReadLogic(ctx, s.svcCtx)
-	return l.SetRead(in)
-}

+ 222 - 2
jyBXSubscribe/rpc/model/push.go

@@ -100,6 +100,21 @@ type SubPushQueryParam struct {
 	NewUserId        int64
 	IsEnt            bool
 	SelectInfoIds    []string
+	BuySubject       int64
+}
+
+// 关键词参数
+type KeyParam struct {
+	UserId      string //用户id
+	EntUserId   string //商机管理用户id
+	DeptId      string //商机管理用户部门id
+	NewUserId   int64
+	IsEnt       bool
+	VipPower    int64
+	EntId       string //企业id
+	MemberPower int64
+	PowerSource int64
+	UserPower   int64
 }
 
 func (spqp *SubPushQueryParam) IsEmpty() bool {
@@ -322,7 +337,11 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
 	} else {
 		if spqp.IsEnt {
-			userStr = fmt.Sprintf("   a.entid='%s' and a.source>1", spqp.EntId)
+			if spqp.BuySubject == 1 {
+				userStr = fmt.Sprintf("   a.entid='%s' and (a.source =2 or   a.source =1) ", spqp.EntId)
+			} else {
+				userStr = fmt.Sprintf("   a.entid='%s' ", spqp.EntId)
+			}
 		} else {
 			userStr = fmt.Sprintf("  a.userid='%s'", common.If(s.ModuleFlag == "eType", spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
 		}
@@ -471,7 +490,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		logx.Info("count:", count, "---", s.ModuleFlag)
 		findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
 		if s.ModuleFlag == "eType" {
-			findSql += ",a.source "
+			findSql += ", IF(a.source is NULL,1,a.source) as  source "
 		}
 	}
 	if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
@@ -637,6 +656,7 @@ func (s *subscribePush) GetCache(code, key string) (*SubPush, error) {
 	if err := json.Unmarshal(*pc_a, &p); err != nil {
 		return nil, err
 	}
+	logx.Info("redis数据", p)
 	return p, nil
 }
 
@@ -1277,3 +1297,203 @@ func (s *subscribePush) IsInTsGuide(userid string) bool {
 	}
 	return false
 }
+func (s *subscribePush) Keys(spqp *KeyParam) (result []*bxsubscribe.Items) {
+	keyData := map[string][]interface{}{}
+	if !spqp.IsEnt {
+		//个人关键词查找
+		//fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户
+		mData, ok := IC.Mgo.FindById("user", spqp.UserId, `{"o_jy":1,"o_vipjy":1,"o_member_jy":1}`)
+		if s.ModuleFlag == "vType" {
+			//从user表中取 o_vipjy.a_items
+			if mData == nil || len(*mData) == 0 || !ok {
+				return nil
+			}
+			o_vipjy := common.ObjToMap((*mData)["o_vipjy"])
+			if (*o_vipjy)["a_items"] != nil {
+				a_items := common.ObjArrToMapArr((*o_vipjy)["a_items"].([]interface{}))
+				for _, v := range a_items {
+					if v["a_key"] != nil {
+						a_key_arr := v["a_key"].([]interface{})
+						keyData[common.InterfaceToStr(v["s_item"])] = a_key_arr
+					}
+				}
+			}
+		} else if s.ModuleFlag == "mType" {
+			//从user表中取 o_member_jy.a_items
+			if mData == nil || len(*mData) == 0 || !ok {
+				return nil
+			}
+			o_memeberjy := common.ObjToMap((*mData)["o_member_jy"])
+			if (*o_memeberjy)["o_area"] != nil {
+				a_items := common.ObjArrToMapArr((*o_memeberjy)["a_items"].([]interface{}))
+				for _, v := range a_items {
+					if v["a_key"] != nil {
+						a_key_arr := v["a_key"].([]interface{})
+						keyData[common.InterfaceToStr(v["s_item"])] = a_key_arr
+					}
+				}
+			}
+		} else if s.ModuleFlag == "eType" {
+			//entniche_rule表,查询条件:{i_entid:123,i_userid:456},取 o_entniche.a_items
+			res_, _ := IC.Mgo.FindOneByField("entniche_rule", map[string]interface{}{
+				"i_userid": common.Int64All(spqp.EntUserId),
+				"i_entid":  common.Int64All(spqp.EntId),
+			}, `{"o_entniche":1}`)
+			o_entniche := &map[string]interface{}{}
+			if res_ != nil {
+				o_entniche = common.ObjToMap((*res_)["o_entniche"])
+			}
+			if (*o_entniche)["a_items"] != nil {
+				a_item := common.ObjArrToMapArr((*o_entniche)["a_items"].([]interface{}))
+				for _, v := range a_item {
+					if v["a_key"] != nil {
+						a_key_arr := v["a_key"].([]interface{})
+						keyData[common.InterfaceToStr(v["s_item"])] = a_key_arr
+					}
+				}
+			}
+		} else {
+			if mData == nil || len(*mData) == 0 || !ok {
+				return nil
+			}
+			o_jy, _ := (*mData)["o_jy"].(map[string]interface{})
+			//免费用户
+			a_key, _ := o_jy["a_key"].([]interface{})
+			if len(a_key) > 0 {
+				for _, v := range a_key {
+					if keyData["其他"] != nil {
+						keyData["其他"] = append(keyData["其他"], v)
+					} else {
+						keyData["其他"] = []interface{}{v}
+					}
+				}
+			}
+		}
+		log.Println(keyData)
+		if (spqp.VipPower == 1 || spqp.MemberPower == 1) || (spqp.UserPower == 1 && spqp.PowerSource == 0) {
+			//1、mysql entniche_user_rule表中获取自己的分发规则id
+			data := IC.MainMysql.SelectBySql(`select rule_id from entniche_user_rule where user_id =? and dept_id =?`, spqp.EntUserId, spqp.DeptId)
+			if data == nil && len(*data) == 0 {
+				MapToarr(keyData, s.ModuleFlag)
+			}
+			ruleId := common.ObjToString((*data)[0]["rule_id"])
+			//3、entniche_distribute表,查询条件:{_id:ObjectId(1结果中的分发规则id),i_status:0},取 o_entniche.a_items,这个查到的是分类名称,然后到上面1的结果中获取这个分类下的词
+			res, _ := IC.Mgo.FindById("entniche_distribute", ruleId, nil)
+			entItem := (*res)["a_items"].([]interface{})
+			if (*res)["a_items"] == nil {
+				MapToarr(keyData, s.ModuleFlag)
+			}
+
+			//2、entniche_rule表, 企业订阅关键词查询条件:  {i_entid:123,i_deptid:0},取 o_entniche.a_items
+			res_, _ := IC.Mgo.FindOneByField("entniche_rule", map[string]interface{}{
+				"i_deptid": int64(0),
+				"i_entid":  common.Int64All(spqp.EntId),
+			}, `{"o_entniche":1}`)
+			o_entniche := &map[string]interface{}{}
+			if res_ != nil {
+				o_entniche = common.ObjToMap((*res_)["o_entniche"])
+			}
+			entnicheRule := map[string][]interface{}{}
+			if (*o_entniche)["a_items"] != nil {
+				a_item := common.ObjArrToMapArr((*o_entniche)["a_items"].([]interface{}))
+				for _, v := range a_item {
+					if v["a_key"] != nil {
+						a_key_arr := v["a_key"].([]interface{})
+						entnicheRule[common.InterfaceToStr(v["s_item"])] = a_key_arr
+					}
+				}
+			}
+			for _, value := range entItem {
+				v := common.InterfaceToStr(value)
+				if entnicheRule[v] != nil {
+					if keyData[v] != nil {
+						//第一次搜索存在
+						//去重
+						keyData[v] = MergeArray(keyData[v], entnicheRule[v])
+					} else {
+						//第一次搜索不存在
+						keyData[v] = entnicheRule[v]
+					}
+				}
+
+			}
+		}
+	} else {
+		//企业关键词查找
+		res_, _ := IC.Mgo.FindOneByField("entniche_rule", map[string]interface{}{
+			"i_deptid": int64(0),
+			"i_entid":  common.Int64All(spqp.EntId),
+		}, `{"o_entniche":1}`)
+		o_entniche := &map[string]interface{}{}
+		if res_ != nil {
+			o_entniche = common.ObjToMap((*res_)["o_entniche"])
+		}
+		if (*o_entniche)["a_items"] != nil {
+			a_item := common.ObjArrToMapArr((*o_entniche)["a_items"].([]interface{}))
+			for _, v := range a_item {
+				if v["a_key"] != nil {
+					a_key_arr := v["a_key"].([]interface{})
+					keyData[common.InterfaceToStr(v["s_item"])] = a_key_arr
+				}
+			}
+		}
+	}
+
+	return MapToarr(keyData, s.ModuleFlag)
+
+}
+
+//关键词处理
+func KeyHandle(a_items map[string]interface{}) []interface{} {
+	keyArr := []interface{}{}
+	if a_items["a_key"] != nil {
+		a_key_arr := common.ObjArrToMapArr(a_items["a_key"].([]interface{}))
+		for _, vv := range a_key_arr {
+			for _, v := range vv["key"].([]interface{}) {
+				keyArr = append(keyArr, v)
+			}
+		}
+	}
+	return keyArr
+}
+func MapToarr(data map[string][]interface{}, userType string) []*bxsubscribe.Items {
+	result := []*bxsubscribe.Items{}
+	for k, v := range data {
+		log.Println(common.ObjArrToStringArr(v))
+		keyArr := []*bxsubscribe.Keys{}
+		for _, m := range common.ObjArrToMapArr(v) {
+			keys := &bxsubscribe.Keys{}
+			if m["notkey"] != nil {
+				keys.Notkey = common.ObjArrToStringArr(m["notkey"].([]interface{}))
+			}
+			if m["key"] != nil {
+				keys.Key = common.ObjArrToStringArr(m["key"].([]interface{}))
+			}
+			if m["matchway"] != nil {
+				keys.Matchway = common.Int64All(m["matchway"])
+			}
+			if m["appendKey"] != nil {
+				keys.AppendKey = common.ObjArrToStringArr(m["appendKey"].([]interface{}))
+			}
+			keyArr = append(keyArr, keys)
+		}
+
+		if userType == "ftype" {
+			k = ""
+		}
+		result = append(result, &bxsubscribe.Items{
+			AKey:  keyArr,
+			SItem: k,
+		})
+	}
+	return result
+}
+
+func MergeArray(dest []interface{}, src []interface{}) (result []interface{}) {
+	result = make([]interface{}, len(dest)+len(src))
+	//将第一个数组传入result
+	copy(result, dest)
+	//将第二个数组接在尾部,也就是 len(dest):
+	copy(result[len(dest):], src)
+	return
+}

+ 306 - 47
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -1371,6 +1371,204 @@ func (x *SetReadReq) GetIsEnt() bool {
 	return false
 }
 
+type GetKeyReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AppId       string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"`
+	UserId      string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
+	UserType    string `protobuf:"bytes,3,opt,name=userType,proto3" json:"userType,omitempty"`
+	EntId       string `protobuf:"bytes,5,opt,name=entId,proto3" json:"entId,omitempty"`
+	NewUserId   int64  `protobuf:"varint,6,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
+	EntUserId   string `protobuf:"bytes,7,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	IsEnt       bool   `protobuf:"varint,8,opt,name=isEnt,proto3" json:"isEnt,omitempty"`
+	VipPower    int64  `protobuf:"varint,4,opt,name=vipPower,proto3" json:"vipPower,omitempty"`
+	MemberPower int64  `protobuf:"varint,10,opt,name=memberPower,proto3" json:"memberPower,omitempty"`
+	PowerSource int64  `protobuf:"varint,11,opt,name=powerSource,proto3" json:"powerSource,omitempty"`
+	UserPower   int64  `protobuf:"varint,12,opt,name=userPower,proto3" json:"userPower,omitempty"`
+	DeptId      string `protobuf:"bytes,13,opt,name=deptId,proto3" json:"deptId,omitempty"`
+}
+
+func (x *GetKeyReq) Reset() {
+	*x = GetKeyReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[14]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetKeyReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetKeyReq) ProtoMessage() {}
+
+func (x *GetKeyReq) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[14]
+	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 GetKeyReq.ProtoReflect.Descriptor instead.
+func (*GetKeyReq) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *GetKeyReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *GetKeyReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *GetKeyReq) GetUserType() string {
+	if x != nil {
+		return x.UserType
+	}
+	return ""
+}
+
+func (x *GetKeyReq) GetEntId() string {
+	if x != nil {
+		return x.EntId
+	}
+	return ""
+}
+
+func (x *GetKeyReq) GetNewUserId() int64 {
+	if x != nil {
+		return x.NewUserId
+	}
+	return 0
+}
+
+func (x *GetKeyReq) GetEntUserId() string {
+	if x != nil {
+		return x.EntUserId
+	}
+	return ""
+}
+
+func (x *GetKeyReq) GetIsEnt() bool {
+	if x != nil {
+		return x.IsEnt
+	}
+	return false
+}
+
+func (x *GetKeyReq) GetVipPower() int64 {
+	if x != nil {
+		return x.VipPower
+	}
+	return 0
+}
+
+func (x *GetKeyReq) GetMemberPower() int64 {
+	if x != nil {
+		return x.MemberPower
+	}
+	return 0
+}
+
+func (x *GetKeyReq) GetPowerSource() int64 {
+	if x != nil {
+		return x.PowerSource
+	}
+	return 0
+}
+
+func (x *GetKeyReq) GetUserPower() int64 {
+	if x != nil {
+		return x.UserPower
+	}
+	return 0
+}
+
+func (x *GetKeyReq) GetDeptId() string {
+	if x != nil {
+		return x.DeptId
+	}
+	return ""
+}
+
+type KeyResp 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"`
+	Items   []*Items `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` //关键词
+}
+
+func (x *KeyResp) Reset() {
+	*x = KeyResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_bxsubscribe_proto_msgTypes[15]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *KeyResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyResp) ProtoMessage() {}
+
+func (x *KeyResp) ProtoReflect() protoreflect.Message {
+	mi := &file_bxsubscribe_proto_msgTypes[15]
+	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 KeyResp.ProtoReflect.Descriptor instead.
+func (*KeyResp) Descriptor() ([]byte, []int) {
+	return file_bxsubscribe_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *KeyResp) GetErrCode() int64 {
+	if x != nil {
+		return x.ErrCode
+	}
+	return 0
+}
+
+func (x *KeyResp) GetErrMsg() string {
+	if x != nil {
+		return x.ErrMsg
+	}
+	return ""
+}
+
+func (x *KeyResp) GetItems() []*Items {
+	if x != nil {
+		return x.Items
+	}
+	return nil
+}
+
 var File_bxsubscribe_proto protoreflect.FileDescriptor
 
 var file_bxsubscribe_proto_rawDesc = []byte{
@@ -1571,33 +1769,65 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
 	0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
 	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18, 0x08,
-	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x32, 0x86, 0x03, 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, 0x12, 0x53, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63,
-	0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
-	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62,
-	0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e,
-	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74,
-	0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0d, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68,
-	0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 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, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
-	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74,
-	0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x52, 0x65,
-	0x61, 0x64, 0x12, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78,
-	0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
-	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,
+	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x22, 0xd3, 0x02, 0x0a, 0x09,
+	0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 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, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65,
+	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18, 0x08,
+	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x76,
+	0x69, 0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76,
+	0x69, 0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65,
+	0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65,
+	0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x77,
+	0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
+	0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75,
+	0x73, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x75, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x70,
+	0x74, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x70, 0x74, 0x49,
+	0x64, 0x22, 0x67, 0x0a, 0x07, 0x4b, 0x65, 0x79, 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, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x12, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x49, 0x74,
+	0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x32, 0xbe, 0x03, 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,
+	0x12, 0x53, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62,
+	0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0d, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48,
+	0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 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, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74, 0x6f,
+	0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61,
+	0x64, 0x12, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4b,
+	0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 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 (
@@ -1612,7 +1842,7 @@ func file_bxsubscribe_proto_rawDescGZIP() []byte {
 	return file_bxsubscribe_proto_rawDescData
 }
 
-var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_bxsubscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
 var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*SubscribeInfosReq)(nil),      // 0: bxsubscribe.SubscribeInfosReq
 	(*SubscribeInfosResp)(nil),     // 1: bxsubscribe.SubscribeInfosResp
@@ -1628,31 +1858,36 @@ var file_bxsubscribe_proto_goTypes = []interface{}{
 	(*Items)(nil),                  // 11: bxsubscribe.Items
 	(*Keys)(nil),                   // 12: bxsubscribe.Keys
 	(*SetReadReq)(nil),             // 13: bxsubscribe.SetReadReq
-	nil,                            // 14: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	(*GetKeyReq)(nil),              // 14: bxsubscribe.GetKeyReq
+	(*KeyResp)(nil),                // 15: bxsubscribe.KeyResp
+	nil,                            // 16: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
 }
 var file_bxsubscribe_proto_depIdxs = []int32{
 	2,  // 0: bxsubscribe.SubscribeInfosResp.data:type_name -> bxsubscribe.subscribeData
 	3,  // 1: bxsubscribe.subscribeData.list:type_name -> bxsubscribe.subscribeInfo
 	6,  // 2: bxsubscribe.SomeInfoResp.data:type_name -> bxsubscribe.SomeInfo
-	14, // 3: bxsubscribe.UpdateSubScribeInfoReq.area:type_name -> bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
+	16, // 3: bxsubscribe.UpdateSubScribeInfoReq.area:type_name -> bxsubscribe.UpdateSubScribeInfoReq.AreaEntry
 	11, // 4: bxsubscribe.UpdateSubScribeInfoReq.items:type_name -> bxsubscribe.Items
 	12, // 5: bxsubscribe.Items.a_key:type_name -> bxsubscribe.Keys
-	10, // 6: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry.value:type_name -> bxsubscribe.CityList
-	0,  // 7: bxsubscribe.Bxsubscribe.GetSubList:input_type -> bxsubscribe.SubscribeInfosReq
-	4,  // 8: bxsubscribe.Bxsubscribe.GetSubSomeInfo:input_type -> bxsubscribe.SomeInfoReq
-	9,  // 9: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:input_type -> bxsubscribe.UpdateSubScribeInfoReq
-	0,  // 10: bxsubscribe.Bxsubscribe.ByPushHistory:input_type -> bxsubscribe.SubscribeInfosReq
-	13, // 11: bxsubscribe.Bxsubscribe.SetRead:input_type -> bxsubscribe.SetReadReq
-	1,  // 12: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
-	5,  // 13: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
-	7,  // 14: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
-	8,  // 15: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
-	7,  // 16: bxsubscribe.Bxsubscribe.SetRead:output_type -> bxsubscribe.StatusResp
-	12, // [12:17] is the sub-list for method output_type
-	7,  // [7:12] is the sub-list for method input_type
-	7,  // [7:7] is the sub-list for extension type_name
-	7,  // [7:7] is the sub-list for extension extendee
-	0,  // [0:7] is the sub-list for field type_name
+	11, // 6: bxsubscribe.KeyResp.items:type_name -> bxsubscribe.Items
+	10, // 7: bxsubscribe.UpdateSubScribeInfoReq.AreaEntry.value:type_name -> bxsubscribe.CityList
+	0,  // 8: bxsubscribe.Bxsubscribe.GetSubList:input_type -> bxsubscribe.SubscribeInfosReq
+	4,  // 9: bxsubscribe.Bxsubscribe.GetSubSomeInfo:input_type -> bxsubscribe.SomeInfoReq
+	9,  // 10: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:input_type -> bxsubscribe.UpdateSubScribeInfoReq
+	0,  // 11: bxsubscribe.Bxsubscribe.ByPushHistory:input_type -> bxsubscribe.SubscribeInfosReq
+	13, // 12: bxsubscribe.Bxsubscribe.SetRead:input_type -> bxsubscribe.SetReadReq
+	14, // 13: bxsubscribe.Bxsubscribe.GetKey:input_type -> bxsubscribe.GetKeyReq
+	1,  // 14: bxsubscribe.Bxsubscribe.GetSubList:output_type -> bxsubscribe.SubscribeInfosResp
+	5,  // 15: bxsubscribe.Bxsubscribe.GetSubSomeInfo:output_type -> bxsubscribe.SomeInfoResp
+	7,  // 16: bxsubscribe.Bxsubscribe.UpdateSubScribeInfo:output_type -> bxsubscribe.StatusResp
+	8,  // 17: bxsubscribe.Bxsubscribe.ByPushHistory:output_type -> bxsubscribe.ByPushHistoryResp
+	7,  // 18: bxsubscribe.Bxsubscribe.SetRead:output_type -> bxsubscribe.StatusResp
+	15, // 19: bxsubscribe.Bxsubscribe.GetKey:output_type -> bxsubscribe.KeyResp
+	14, // [14:20] is the sub-list for method output_type
+	8,  // [8:14] 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_bxsubscribe_proto_init() }
@@ -1829,6 +2064,30 @@ func file_bxsubscribe_proto_init() {
 				return nil
 			}
 		}
+		file_bxsubscribe_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetKeyReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_bxsubscribe_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*KeyResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -1836,7 +2095,7 @@ func file_bxsubscribe_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_bxsubscribe_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   15,
+			NumMessages:   17,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 0
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe_grpc.pb.go

@@ -32,6 +32,8 @@ type BxsubscribeClient interface {
 	ByPushHistory(ctx context.Context, in *SubscribeInfosReq, opts ...grpc.CallOption) (*ByPushHistoryResp, error)
 	//推送数据浏览状态修改
 	SetRead(ctx context.Context, in *SetReadReq, opts ...grpc.CallOption) (*StatusResp, error)
+	//关键词获取
+	GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error)
 }
 
 type bxsubscribeClient struct {
@@ -87,6 +89,15 @@ func (c *bxsubscribeClient) SetRead(ctx context.Context, in *SetReadReq, opts ..
 	return out, nil
 }
 
+func (c *bxsubscribeClient) GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error) {
+	out := new(KeyResp)
+	err := c.cc.Invoke(ctx, "/bxsubscribe.Bxsubscribe/GetKey", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BxsubscribeServer is the server API for Bxsubscribe service.
 // All implementations must embed UnimplementedBxsubscribeServer
 // for forward compatibility
@@ -101,6 +112,8 @@ type BxsubscribeServer interface {
 	ByPushHistory(context.Context, *SubscribeInfosReq) (*ByPushHistoryResp, error)
 	//推送数据浏览状态修改
 	SetRead(context.Context, *SetReadReq) (*StatusResp, error)
+	//关键词获取
+	GetKey(context.Context, *GetKeyReq) (*KeyResp, error)
 	mustEmbedUnimplementedBxsubscribeServer()
 }
 
@@ -123,6 +136,9 @@ func (UnimplementedBxsubscribeServer) ByPushHistory(context.Context, *SubscribeI
 func (UnimplementedBxsubscribeServer) SetRead(context.Context, *SetReadReq) (*StatusResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SetRead not implemented")
 }
+func (UnimplementedBxsubscribeServer) GetKey(context.Context, *GetKeyReq) (*KeyResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetKey not implemented")
+}
 func (UnimplementedBxsubscribeServer) mustEmbedUnimplementedBxsubscribeServer() {}
 
 // UnsafeBxsubscribeServer may be embedded to opt out of forward compatibility for this service.
@@ -226,6 +242,24 @@ func _Bxsubscribe_SetRead_Handler(srv interface{}, ctx context.Context, dec func
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Bxsubscribe_GetKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetKeyReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxsubscribeServer).GetKey(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxsubscribe.Bxsubscribe/GetKey",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxsubscribeServer).GetKey(ctx, req.(*GetKeyReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Bxsubscribe_ServiceDesc is the grpc.ServiceDesc for Bxsubscribe service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -253,6 +287,10 @@ var Bxsubscribe_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "SetRead",
 			Handler:    _Bxsubscribe_SetRead_Handler,
 		},
+		{
+			MethodName: "GetKey",
+			Handler:    _Bxsubscribe_GetKey_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxsubscribe.proto",