Browse Source

feat:商机管理企业切换

wangshan 2 năm trước cách đây
mục cha
commit
a8ef23a166

+ 3 - 0
api/internal/logic/workdesktopmenuinfologic.go

@@ -2,6 +2,7 @@ package logic
 
 import (
 	"context"
+	"log"
 	"net/http"
 	"userCenter/entity"
 	"userCenter/rpc/pb"
@@ -35,7 +36,9 @@ func (l *WorkDesktopMenuInfoLogic) WorkDesktopMenuInfo(req *types.WorkDesktopMen
 		Phone:     req.Phone,
 		Platform:  req.Platform,
 		NewUserId: req.NewUserId,
+		EntId:     req.EntId,
 	})
+	log.Println("----:", req.EntId)
 	return &types.CommonResp{
 		Error_code: res.ErrorCode,
 		Error_msg:  res.ErrorMsg,

+ 1 - 0
api/internal/types/types.go

@@ -238,6 +238,7 @@ type WorkDesktopMenuInfoReq struct {
 	AppId     string `header:"appId"`
 	Phone     string `header:"phone,optional"`
 	NewUserId string `header:"newUserId"` //base_user_id<---base_user
+	EntId     int64  `header:"entId,optional"`
 }
 
 type WorkDesktopComprehensiveReq struct {

+ 3 - 2
api/userCenter.api

@@ -252,6 +252,7 @@ type (
 		AppId     string `header:"appId"`
 		Phone     string `header:"phone,optional"`
 		NewUserId string `header:"newUserId"` //base_user_id<---base_user
+		EntId     int64  `header:"entId,optional"`
 	}
 	//工作桌面-- 菜单模式:全部/可用选择记录
 	//工作桌面--常用功能更新
@@ -309,9 +310,9 @@ service userCenter-api {
 	get /userCenter/workDesktop/clearUserInfo (WorkDesktopClearUserInfo) returns (CommonResp)
 	
 	@handler GetUserInfo
-	post /userCenter/user/getUserInfo(UserReq)returns(resp)
+	post /userCenter/user/getUserInfo (UserReq) returns (resp)
 	@handler GetEntUserInfo
-	post  /userCenter/ent/userInfo(EntUserReq)returns(resp)
+	post /userCenter/ent/userInfo (EntUserReq) returns (resp)
 }
 
 @server(

+ 35 - 25
entity/user.go

@@ -16,6 +16,7 @@ const (
 	RedisCode               = "newother"
 	RedisMenuKey            = "jy_workdesktopmenu_%s_%s_%s"
 	UserPowerRedisKey       = "jy_userpowerredis_%s_%d_%s"
+	UserEntIdKey            = "jy_userentid_%s_%d_%s"
 )
 
 /*
@@ -23,7 +24,7 @@ const (
 *测试用例放的地方不对 待调整
  */
 //用户权限 初始化
-func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool) map[string]int {
+func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool, entId int64) map[string]int {
 	/*
 	* 商机管理--》新版商机管理vs老版商机管理
 	* 大会员--》bigmember_service
@@ -39,36 +40,41 @@ func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool
 			return UserPowerMap
 		}
 	}
-
 	//查询用户信息
 	data, ok := Mgo.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,i_member_status":1,"s_member_mainid":1,"i_member_sub_status":1,"i_vip_status":1,"o_vipjy":1,"o_jy":1,"l_registedate":1}`)
 	if ok && *data != nil && len(*data) > 0 {
 		var isFree = true
 		phone, _ := MC.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
 		if phone != "" {
-			//商机管理用户
 			//同一个手机号 多个商机管理角色 其中一个是企业管理员或者部门管理员 查的时候按角色权重排序
-			entNicheInfos := Mysql.SelectBySql(`SELECT i.isNew,r.role_id  FROM (entniche_user u LEFT JOIN entniche_user_role r ON r.user_id = u.id)  LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone = ? and u.power=1 and i.status=1 ORDER BY r.role_id,i.isNew DESC`, phone)
+			entNicheInfos := Mysql.SelectBySql(`SELECT i.isNew,r.role_id,u.ent_id FROM (entniche_user u LEFT JOIN entniche_user_role r ON r.user_id = u.id)  LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone = ? and u.power=1 and i.status=1 ORDER BY r.role_id,i.isNew DESC`, phone)
 			//商机管理用户信息判断
 			if entNicheInfos != nil && len(*entNicheInfos) > 0 {
 				isFree = false
-				entNicheInfo := (*entNicheInfos)[0]
-				UserPowerMap["100"] = 1
-				switch MC.IntAll(entNicheInfo["isNew"]) {
-				case 1: //新版商机管理
-					UserPowerMap["110"] = 1
-					switch MC.IntAll(entNicheInfo["role_id"]) {
-					case 1: //部门管理员
-						UserPowerMap["111"] = 1
-					case 2: //企业管理员
-						UserPowerMap["112"] = 1
+				for _, entNicheInfo := range *entNicheInfos {
+					//判断是否是当前企业
+					ent_id := MC.Int64All(entNicheInfo["ent_id"])
+					if entId > 0 && ent_id != entId {
+						continue
 					}
-				case 0: //老版商机管理
-					switch MC.IntAll(entNicheInfo["role_id"]) {
-					case 1: //部门管理员
-						UserPowerMap["101"] = 1
-					case 2: //企业管理员
-						UserPowerMap["102"] = 1
+					//entNicheInfo := (*entNicheInfos)[0]
+					UserPowerMap["100"] = 1
+					switch MC.IntAll(entNicheInfo["isNew"]) {
+					case 1: //新版商机管理
+						UserPowerMap["110"] = 1
+						switch MC.IntAll(entNicheInfo["role_id"]) {
+						case 1: //部门管理员
+							UserPowerMap["111"] = 1
+						case 2: //企业管理员
+							UserPowerMap["112"] = 1
+						}
+					case 0: //老版商机管理
+						switch MC.IntAll(entNicheInfo["role_id"]) {
+						case 1: //部门管理员
+							UserPowerMap["101"] = 1
+						case 2: //企业管理员
+							UserPowerMap["102"] = 1
+						}
 					}
 				}
 			}
@@ -122,6 +128,11 @@ func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool
 			bytes, err := json.Marshal(UserPowerMap)
 			if err == nil && len(bytes) > 0 {
 				redis.PutBytes(RedisCode, userPowerRedisKey, &bytes, internalTime)
+				if entId > 0 {
+					//商机管理用户entId 缓存
+					userEntIdKey := fmt.Sprintf(UserEntIdKey, appId, time.Now().Day(), userId)
+					redis.Put(RedisCode, userEntIdKey, entId, internalTime)
+				}
 			}
 		}
 	}
@@ -132,11 +143,10 @@ func AutoUserPowerInfo(userId, appId string, internalTime int, bigMemberOff bool
 func ClearUserPowerFunc(userId, appId string) {
 	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), userId)
 	redis.Del(RedisCode, userPowerRedisKey)
-}
-
-type userRolePower struct {
-	Name     string
-	PowerIds []int
+	for _, v := range []string{"PC", "APP", "WX"} {
+		RedisMenuKey := fmt.Sprintf(RedisMenuKey, appId, v, userId)
+		redis.Del(RedisCode, RedisMenuKey)
+	}
 }
 
 var UserRolePowers = map[string][]string{}

+ 2 - 1
entity/workDesktop.go

@@ -16,6 +16,7 @@ type WorkDesktopMenu struct {
 	MenuTree     []*JYMenu
 	UserId       string
 	NewUserId    string
+	EntId        int64
 	AppId        string
 	TimeOut      int
 	BigMemberOff bool
@@ -210,7 +211,7 @@ func (m *WorkDesktopMenu) VerifyPermissions(powerIds string) (b bool) {
 		return true
 	}
 	if len(strings.Split(powerIds, ",")) > 0 {
-		userPower := AutoUserPowerInfo(m.UserId, m.AppId, m.TimeOut, m.BigMemberOff)
+		userPower := AutoUserPowerInfo(m.UserId, m.AppId, m.TimeOut, m.BigMemberOff, m.EntId)
 		func(powerIds string) {
 			for _, pv := range strings.Split(powerIds, ",") {
 				if userPower[pv] > 0 {

+ 177 - 167
rpc/pb/userCenter.pb.go

@@ -3217,6 +3217,7 @@ type WorkDesktopMenuInfoReq struct {
 	InternalTime int64  `protobuf:"varint,6,opt,name=internalTime,proto3" json:"internalTime,omitempty"`
 	RedisOutTime int64  `protobuf:"varint,7,opt,name=redisOutTime,proto3" json:"redisOutTime,omitempty"`
 	NewUserId    string `protobuf:"bytes,8,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
+	EntId        int64  `protobuf:"varint,9,opt,name=entId,proto3" json:"entId,omitempty"`
 }
 
 func (x *WorkDesktopMenuInfoReq) Reset() {
@@ -3307,6 +3308,13 @@ func (x *WorkDesktopMenuInfoReq) GetNewUserId() string {
 	return ""
 }
 
+func (x *WorkDesktopMenuInfoReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
 //工作桌面-返回数据
 type WorkDesktopMenuInfoResp struct {
 	state         protoimpl.MessageState
@@ -4552,7 +4560,7 @@ var file_userCenter_proto_rawDesc = []byte{
 	0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x18, 0x0a, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07,
 	0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75,
-	0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x22, 0x82, 0x02, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x44,
+	0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x22, 0x98, 0x02, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x44,
 	0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
 	0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70,
@@ -4568,20 +4576,55 @@ var file_userCenter_proto_rawDesc = []byte{
 	0x69, 0x73, 0x4f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x0c, 0x72, 0x65, 0x64, 0x69, 0x73, 0x4f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a,
 	0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x74, 0x0a, 0x17, 0x57,
-	0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e,
-	0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
-	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
-	0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
-	0x73, 0x67, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
-	0x32, 0x09, 0x2e, 0x4d, 0x65, 0x6e, 0x75, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74,
-	0x61, 0x22, 0x4d, 0x0a, 0x08, 0x4d, 0x65, 0x6e, 0x75, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a,
-	0x08, 0x6d, 0x65, 0x6e, 0x75, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x08, 0x6d, 0x65, 0x6e, 0x75, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x6d, 0x65, 0x6e,
-	0x75, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4d, 0x65,
-	0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74,
-	0x22, 0x84, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a,
+	0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65,
+	0x6e, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49,
+	0x64, 0x22, 0x74, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,
+	0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65,
+	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4d, 0x65, 0x6e, 0x75, 0x44, 0x61, 0x74,
+	0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4d, 0x0a, 0x08, 0x4d, 0x65, 0x6e, 0x75, 0x44,
+	0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x25, 0x0a, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x09, 0x2e, 0x4d, 0x65, 0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x65,
+	0x6e, 0x75, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x6e, 0x75, 0x4c,
+	0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75,
+	0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a,
+	0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75,
+	0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x74,
+	0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x54,
+	0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+	0x26, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
+	0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75,
+	0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68,
+	0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x8a, 0x02,
+	0x0a, 0x0f, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e,
+	0x75, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x75,
+	0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x73, 0x61,
+	0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a,
+	0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x74, 0x69, 0x70,
+	0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x54, 0x69, 0x70,
+	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a,
+	0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x54,
+	0x68, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x52, 0x05, 0x63,
+	0x68, 0x69, 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xe2, 0x01, 0x0a, 0x0e, 0x54,
+	0x68, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x12, 0x12, 0x0a,
 	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
 	0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
@@ -4593,159 +4636,126 @@ var file_userCenter_proto_rawDesc = []byte{
 	0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65,
 	0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f,
 	0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x54, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f,
-	0x52, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x68, 0x69,
-	0x6c, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e,
-	0x64, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c,
-	0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09,
-	0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x8a, 0x02, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x6f,
-	0x6e, 0x64, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x12, 0x12, 0x0a, 0x04, 0x6e,
-	0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
-	0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69,
-	0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18,
-	0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a,
-	0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
-	0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
-	0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54,
-	0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08,
-	0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x54, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07,
-	0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64,
-	0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x65, 0x4c, 0x65,
-	0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x14,
-	0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d,
-	0x61, 0x74, 0x63, 0x68, 0x22, 0xe2, 0x01, 0x0a, 0x0e, 0x54, 0x68, 0x72, 0x65, 0x65, 0x4c, 0x65,
-	0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69,
-	0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12,
-	0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
-	0x6c, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x06, 0x75, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70,
-	0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18,
-	0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12,
-	0x22, 0x0a, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
-	0x32, 0x08, 0x2e, 0x54, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x74, 0x69, 0x70, 0x49,
-	0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x03,
-	0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xd5, 0x01, 0x0a, 0x07, 0x54, 0x69,
-	0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
-	0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
-	0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d,
-	0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69,
-	0x72, 0x6d, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d,
-	0x54, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x66,
-	0x69, 0x72, 0x6d, 0x54, 0x65, 0x78, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x53, 0x68, 0x6f,
-	0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69,
-	0x73, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61,
-	0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70,
-	0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70,
-	0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x54, 0x79, 0x70,
-	0x65, 0x22, 0xff, 0x02, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f,
-	0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65,
-	0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70,
-	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12,
-	0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70,
-	0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
-	0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64,
-	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a,
-	0x07, 0x6d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
-	0x6d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x69, 0x67, 0x4d, 0x65,
-	0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x62,
-	0x69, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x63,
-	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12,
-	0x22, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x73, 0x4f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18,
-	0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x73, 0x4f, 0x75, 0x74, 0x54,
-	0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49,
-	0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x49, 0x64, 0x73,
-	0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79,
-	0x49, 0x64, 0x73, 0x22, 0x7f, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74,
-	0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64,
-	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
-	0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12,
-	0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
-	0x54, 0x68, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4d, 0x65, 0x6e, 0x75, 0x52, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x22, 0x9f, 0x01, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73,
-	0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
-	0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
-	0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18,
-	0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0xc5, 0x07, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x43,
-	0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68,
-	0x12, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e,
-	0x45, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0a, 0x45,
-	0x6e, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x12, 0x0b, 0x2e, 0x45, 0x78, 0x61, 0x6d,
-	0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12,
-	0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45,
-	0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x45, 0x78,
-	0x61, 0x6d, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x45, 0x78, 0x61, 0x6d,
-	0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x45, 0x78, 0x61,
-	0x6d, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x08,
-	0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x45, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e,
-	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x45, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
-	0x12, 0x0c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0c,
-	0x2e, 0x45, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x09,
-	0x45, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x45, 0x6e, 0x74, 0x55,
-	0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69,
-	0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e,
-	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x78, 0x61,
-	0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e, 0x74, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74,
-	0x75, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74,
-	0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e,
-	0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x12, 0x0b,
-	0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x55, 0x73,
-	0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0a, 0x55, 0x73, 0x65,
-	0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
-	0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73,
-	0x70, 0x12, 0x23, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x12, 0x0a, 0x2e, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69,
-	0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65,
-	0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e,
-	0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49,
-	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73,
-	0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x57, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43,
-	0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x2e, 0x57,
-	0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65,
-	0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x57, 0x6f, 0x72,
+	0x52, 0x07, 0x74, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74,
+	0x63, 0x68, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22,
+	0xd5, 0x01, 0x0a, 0x07, 0x54, 0x69, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74,
+	0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
+	0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63,
+	0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x63,
+	0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x54, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x54, 0x65, 0x78, 0x74, 0x12, 0x22, 0x0a,
+	0x0c, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x61, 0x6e, 0x63, 0x65,
+	0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f,
+	0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f,
+	0x70, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xff, 0x02, 0x0a, 0x1b, 0x57, 0x6f, 0x72, 0x6b,
+	0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e,
+	0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
+	0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
+	0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f,
+	0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74,
+	0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4d,
+	0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6e, 0x75, 0x4d,
+	0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a,
+	0x0c, 0x62, 0x69, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x18, 0x08, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x69, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66,
+	0x66, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x53, 0x69, 0x7a,
+	0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x6c,
+	0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x73, 0x4f, 0x75,
+	0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x64,
+	0x69, 0x73, 0x4f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65,
+	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x6c, 0x79, 0x49, 0x64, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x6c, 0x79, 0x49, 0x64, 0x73, 0x22, 0x7f, 0x0a, 0x1c, 0x57, 0x6f, 0x72,
 	0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65,
-	0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x18, 0x57, 0x6f, 0x72,
-	0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x73, 0x65,
-	0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b,
-	0x74, 0x6f, 0x70, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
-	0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f,
-	0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x22, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
-	0x6f, 0x12, 0x08, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x55, 0x73,
-	0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73,
-	0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65,
-	0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
-	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63,
-	0x6b, 0x49, 0x73, 0x45, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x0b, 0x2e, 0x45, 0x6e,
-	0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x49, 0x73, 0x45, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06,
-	0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65,
+	0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f,
+	0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c,
+	0x4d, 0x65, 0x6e, 0x75, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9f, 0x01, 0x0a, 0x1b, 0x57,
+	0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74,
+	0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74,
+	0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1c,
+	0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x32, 0xc5, 0x07, 0x0a,
+	0x0a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x07, 0x45,
+	0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x12, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68,
+	0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x27, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x12,
+	0x0b, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45,
+	0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x45, 0x6e,
+	0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52,
+	0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x30, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12,
+	0x0f, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
+	0x1a, 0x10, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x27, 0x0a, 0x08, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x12, 0x0c,
+	0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x43,
+	0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x45,
+	0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0c, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6e,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x28, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
+	0x0d, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c,
+	0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0b,
+	0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x2e, 0x43, 0x68,
+	0x65, 0x63, 0x6b, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e,
+	0x45, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0f, 0x47,
+	0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x13,
+	0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x64, 0x65,
+	0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42,
+	0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x55, 0x73, 0x65,
+	0x72, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65,
+	0x71, 0x1a, 0x0c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x26, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x2e,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x78, 0x61, 0x6d,
+	0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x44,
+	0x65, 0x6c, 0x12, 0x0a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0c,
+	0x2e, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x13,
+	0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49,
+	0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f,
+	0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x57,
+	0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x6e,
+	0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65,
+	0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69,
+	0x76, 0x65, 0x12, 0x1c, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,
+	0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x1d, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f,
+	0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x57, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6c,
+	0x65, 0x61, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x57, 0x6f,
+	0x72, 0x6b, 0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
+	0x44, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x68, 0x65, 0x6e,
+	0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x08, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+	0x71, 0x1a, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x0e,
+	0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0b,
+	0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x45, 0x6e,
+	0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x33, 0x0a, 0x0e, 0x47, 0x65, 0x74,
+	0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0f, 0x2e, 0x45, 0x6e,
+	0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x45,
+	0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34,
+	0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x45, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69,
+	0x6e, 0x12, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14,
+	0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x73, 0x45, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e,
+	0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 57 - 56
rpc/userCenter.proto

@@ -199,100 +199,100 @@ message GetStatusByCodeResp{
 
 //用户权益
 message UserInfo{
-	string phone =1;//手机号
-	int64 vipStatus =2;//超级订阅状态; >0有权限 <=0无权限
-	int64 memberStatus =3;//大会员状态;  >0:有权限  <=0:无权限
-	int64 entnicheStatus=4;//商机管理权限状态; 1:有权限   -1:无权限
-	string subscribeType =5;//订阅设置类型 f:免费订阅 v:超级订阅 m:大会员订阅 e:商机管理订阅
-	Subscribe data =6;
-    	string error_msg = 7;
-	int64 error_code = 8; 
-	string nickname =9;
-	string headimg=10;
+  string phone = 1;//手机号
+  int64 vipStatus = 2;//超级订阅状态; >0有权限 <=0无权限
+  int64 memberStatus = 3;//大会员状态;  >0:有权限  <=0:无权限
+  int64 entnicheStatus = 4;//商机管理权限状态; 1:有权限   -1:无权限
+  string subscribeType = 5;//订阅设置类型 f:免费订阅 v:超级订阅 m:大会员订阅 e:商机管理订阅
+  Subscribe data = 6;
+  string error_msg = 7;
+  int64 error_code = 8;
+  string nickname = 9;
+  string headimg = 10;
 }
 
 //订阅设置
 message Subscribe{
-	int64 startTime =1;//开始时间
-	int64 endTime =2;//结束时间
-    map<string,List> area =3;//地区
-    repeated string buyerclass=4;//采购单位类型
-    repeated string infotype=5;//信息类型
-    repeated Items items =6;//关键词
-    int64 matchway =7;//匹配方式 1标题 2正文
-    int64 projectmatch=8;//项目匹配 
+  int64 startTime = 1;//开始时间
+  int64 endTime = 2;//结束时间
+  map<string, List> area = 3;//地区
+  repeated string buyerclass = 4;//采购单位类型
+  repeated string infotype = 5;//信息类型
+  repeated Items items = 6;//关键词
+  int64 matchway = 7;//匹配方式 1标题 2正文
+  int64 projectmatch = 8;//项目匹配
 }
 
 message List{
-	repeated string value =1;
+  repeated string value = 1;
 }
 
 //分类
 message Items{
-	string s_item =1;//分类名称
-	int64 updateTime=2;
-	repeated Keys a_key=3;
+  string s_item = 1;//分类名称
+  int64 updateTime = 2;
+  repeated Keys a_key = 3;
 }
 
 //关键词
 message Keys {
-	repeated string key =1;
-	repeated string notkey=2;
-	int64 updateTime=3; 
-	int64 matchway=4;
+  repeated string key = 1;
+  repeated string notkey = 2;
+  int64 updateTime = 3;
+  int64 matchway = 4;
 }
 
 message UserReq{
-	string appId =1;
-	int64 userId =2;
-	string types =3;//类型,不传按默认规则获取 m大会员 e商机管理 v超级订阅 f免费订阅
+  string appId = 1;
+  int64 userId = 2;
+  string types = 3;//类型,不传按默认规则获取 m大会员 e商机管理 v超级订阅 f免费订阅
 }
 
 message EntUserReq{
-	string appId =1;
-	int64 entUserId =2;
-	int64 entId=3;
+  string appId = 1;
+  int64 entUserId = 2;
+  int64 entId = 3;
 }
 
 message EntUserResp{
-	int64 error_code = 1;
-	string error_msg = 2;
-	EntUser data=3;
+  int64 error_code = 1;
+  string error_msg = 2;
+  EntUser data = 3;
 }
 
 message EntUser{
-	string Name =1; //员工名册
-	string phone =2;//员工手机号
-	string mail =3;//邮箱
-	string deptName =4;//部门名称
-	int64 entUserId=5;
+  string Name = 1; //员工名册
+  string phone = 2;//员工手机号
+  string mail = 3;//邮箱
+  string deptName = 4;//部门名称
+  int64 entUserId = 5;
 }
 
 message EntUserListReq{
-	string appId =1;
-	int64 entId=2;
-	int64 deptId=3;
-	string name=4;
+  string appId = 1;
+  int64 entId = 2;
+  int64 deptId = 3;
+  string name = 4;
 }
 
 message EntUserListResp{
-	int64 error_code = 1;
-	string error_msg = 2;
-	repeated EntUserListData data=3;
+  int64 error_code = 1;
+  string error_msg = 2;
+  repeated EntUserListData data = 3;
 }
 
 message EntUserListData{
-	string name =1;
-	int64 deptId=2;
-	int64 pId=3;
-	repeated EntUser entUserList=4;
-	repeated EntUserListData deptList=5;
+  string name = 1;
+  int64 deptId = 2;
+  int64 pId = 3;
+  repeated EntUser entUserList = 4;
+  repeated EntUserListData deptList = 5;
 }
 
 message CheckIsEntAdminResp{
-	int64 error_code = 1;
-	string error_msg = 2;
-	int64 status=3; //1企业管理员 2部门管理员 3员工 
+  int64 error_code = 1;
+  string error_msg = 2;
+  int64 status = 3; //1企业管理员 2部门管理员 3员工
 }
 
 message GetStatusByCode {
@@ -348,6 +348,7 @@ message WorkDesktopMenuInfoReq{
   int64 internalTime = 6;
   int64 redisOutTime = 7;
   string newUserId = 8;
+  int64 entId = 9;
 }
 
 //工作桌面-返回数据
@@ -473,7 +474,7 @@ service UserCenter {
   rpc WorkDesktopComprehensive (WorkDesktopComprehensiveReq) returns (WorkDesktopComprehensiveResp);
   //手动清除用户功能内存信息
   rpc WorkDesktopClearUserInfo (WorkDesktopClearUserInfoReq) returns (WorkDesktopComprehensiveResp);
- 
+
   //获取客户信息
   rpc GetUserInfo(UserReq) returns(UserInfo);
   //根据企业员工id获取员工的信息

+ 9 - 0
service/workDesktop.go

@@ -167,6 +167,14 @@ func GetWorkDesktopMenuMode(in *WorkDesktopMenuInfoReq) (str string, err error)
 
 //获取工作桌面菜单树
 func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error) {
+	if in.EntId > 0 {
+		//判断商机管理用户是否切换企业
+		userEntIdKey := fmt.Sprintf(entity.UserEntIdKey, in.AppId, time.Now().Day(), in.UserId)
+		if redisEntid := redis.GetInt(entity.RedisCode, userEntIdKey); int64(redisEntid) > 0 && int64(redisEntid) != in.EntId {
+			//商机管理用户切换企业---清除用户权限缓存&&清除用户菜单缓存
+			entity.ClearUserPowerFunc(in.UserId, in.AppId)
+		}
+	}
 	t1 := time.Now()
 	//redis缓存
 	var menuList []*pb.MenuList
@@ -189,6 +197,7 @@ func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error)
 		AppId:        in.AppId,
 		TimeOut:      int(in.RedisOutTime),
 		BigMemberOff: in.BigMemberOff,
+		EntId:        in.EntId,
 	}
 	for _, v := range *menuData {
 		menu := &entity.JYMenu{