浏览代码

feat:用户权益调整

wangshan 2 年之前
父节点
当前提交
d341d470ca

+ 2 - 0
api/internal/logic/workdesktopclearuserinfologic.go

@@ -38,6 +38,8 @@ func (l *WorkDesktopClearUserInfoLogic) WorkDesktopClearUserInfo(req *types.Work
 			Platform:  req.Platform,
 			UserIds:   req.UserIds,
 			NewUserId: req.NewUserId,
+			EntId:     req.EntId,
+			EntUserId: req.EntUserId,
 		})
 		return &types.CommonResp{
 			Error_code: res.ErrorCode,

+ 17 - 10
api/internal/logic/workdesktopcomprehensivelogic.go

@@ -1,10 +1,13 @@
 package logic
 
 import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	"bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/config"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/entity"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	"context"
 	"net/http"
+	"strings"
 
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/svc"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/api/internal/types"
@@ -30,16 +33,20 @@ func NewWorkDesktopComprehensiveLogic(ctx context.Context, svcCtx *svc.ServiceCo
 
 func (l *WorkDesktopComprehensiveLogic) WorkDesktopComprehensive(req *types.WorkDesktopComprehensiveReq) (resp *types.CommonResp, err error) {
 	res, err := entity.UserCenterRpc.WorkDesktopComprehensive(l.ctx, &pb.WorkDesktopComprehensiveReq{
-		AppId:      req.AppId,
-		UserId:     req.UserId,
-		Phone:      req.Phone,
-		Platform:   req.Platform,
-		MenuIds:    req.MenuIds,
-		MenuMode:   req.MenuMode,
-		ActionMode: req.ActionMode,
-		NewUserId:  req.NewUserId,
-		EntId:      req.EntId,
-		EntUserId:  req.EntUserId,
+		AppId:        req.AppId,
+		UserId:       req.UserId,
+		Phone:        req.Phone,
+		Platform:     req.Platform,
+		MenuIds:      req.MenuIds,
+		MenuMode:     req.MenuMode,
+		ActionMode:   req.ActionMode,
+		NewUserId:    req.NewUserId,
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		IntranetBool: MC.If(config.C.IntranetName != "" && strings.Contains(l.r.Referer(), config.C.IntranetName), true, false).(bool),
+		AccountId:    req.AccountId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
 	})
 	return &types.CommonResp{
 		Error_code: res.ErrorCode,

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

@@ -42,6 +42,9 @@ func (l *WorkDesktopMenuInfoLogic) WorkDesktopMenuInfo(req *types.WorkDesktopMen
 		EntUserId:    req.EntUserId,
 		IntranetBool: MC.If(config.C.IntranetName != "" && strings.Contains(l.r.Referer(), config.C.IntranetName), true, false).(bool),
 		WorkStatus:   req.WorkStatus,
+		AccountId:    req.AccountId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
 	})
 	return &types.CommonResp{
 		Error_code: res.ErrorCode,

+ 26 - 18
api/internal/types/types.go

@@ -236,27 +236,33 @@ type UserDelReq struct {
 }
 
 type WorkDesktopMenuInfoReq struct {
-	Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
-	UserId     string `header:"userId"`
-	AppId      string `header:"appId"`
-	Phone      string `header:"phone,optional"`
-	NewUserId  string `header:"newUserId"` //base_user_id<---base_user
-	EntId      int64  `header:"entId,optional"`
-	EntUserId  int64  `header:"entUserId,optional"`
-	WorkStatus int64  `json:"workStatus,optional"`
+	Platform     string `json:"platform,default=PC,options=PC|WX|APP"`
+	UserId       string `header:"userId"`
+	AppId        string `header:"appId"`
+	Phone        string `header:"phone,optional"`
+	NewUserId    string `header:"newUserId"` //base_user_id<---base_user
+	EntId        string `header:"entId,optional"`
+	EntUserId    string `header:"entUserId,optional"`
+	AccountId    string `header:"accountId,optional"`    //账户id
+	PositionType string `header:"positionType,optional"` //职位类型 0个人 1企业
+	PositionId   string `header:"positionId,optional"`   //职位id
+	WorkStatus   int64  `json:"workStatus,optional"`     //服务是否可用;1:内网可用;-1:不可用
 }
 
 type WorkDesktopComprehensiveReq struct {
-	Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
-	UserId     string `header:"userId"`
-	AppId      string `header:"appId"`
-	Phone      string `header:"phone,optional"`
-	MenuMode   string `json:"menuMode,optional"`
-	MenuIds    string `json:"menuIds,optional"`
-	ActionMode string `path:"actionMode,options=commonlyRenew|commonlyList|menuMode"`
-	NewUserId  string `header:"newUserId"`
-	EntId      int64  `header:"entId,optional"`
-	EntUserId  int64  `header:"entUserId,optional"`
+	Platform     string `json:"platform,default=PC,options=PC|WX|APP"`
+	UserId       string `header:"userId"`
+	AppId        string `header:"appId"`
+	Phone        string `header:"phone,optional"`
+	MenuMode     string `json:"menuMode,optional"`
+	MenuIds      string `json:"menuIds,optional"`
+	ActionMode   string `path:"actionMode,options=commonlyRenew|commonlyList|menuMode"`
+	NewUserId    string `header:"newUserId"`
+	EntId        string `header:"entId,optional"`
+	EntUserId    string `header:"entUserId,optional"`
+	AccountId    string `header:"accountId,optional"`    //账户id
+	PositionType string `header:"positionType,optional"` //职位类型 0个人 1企业
+	PositionId   string `header:"positionId,optional"`   //职位id
 }
 
 type CommonResp struct {
@@ -271,6 +277,8 @@ type WorkDesktopClearUserInfo struct {
 	AppId     string `header:"appId"`
 	UserIds   string `json:"userIds,optional"`
 	NewUserId string `header:"newUserId"`
+	EntId     string `header:"entId,optional"`
+	EntUserId string `header:"entUserId,optional"`
 }
 
 type UserIdentityReq struct {

+ 27 - 20
api/userCenter.api

@@ -250,28 +250,34 @@ type (
 
 	//工作桌面 -- 菜单
 	WorkDesktopMenuInfoReq {
-		Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
-		UserId     string `header:"userId"`
-		AppId      string `header:"appId"`
-		Phone      string `header:"phone,optional"`
-		NewUserId  string `header:"newUserId"` //base_user_id<---base_user
-		EntId      int64  `header:"entId,optional"`
-		EntUserId  int64  `header:"entUserId,optional"`
-		WorkStatus int64  `json:"workStatus,optional"`
+		Platform     string `json:"platform,default=PC,options=PC|WX|APP"`
+		UserId       string `header:"userId"`
+		AppId        string `header:"appId"`
+		Phone        string `header:"phone,optional"`
+		NewUserId    string `header:"newUserId"` //base_user_id<---base_user
+		EntId        string `header:"entId,optional"`
+		EntUserId    string `header:"entUserId,optional"`
+		AccountId    string `header:"accountId,optional"`    //账户id
+		PositionType string `header:"positionType,optional"` //职位类型 0个人 1企业
+		PositionId   string `header:"positionId,optional"`   //职位id
+		WorkStatus   int64  `json:"workStatus,optional"`     //服务是否可用;1:内网可用;-1:不可用
 	}
 	//工作桌面-- 菜单模式:全部/可用选择记录
 	//工作桌面--常用功能更新
 	WorkDesktopComprehensiveReq {
-		Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
-		UserId     string `header:"userId"`
-		AppId      string `header:"appId"`
-		Phone      string `header:"phone,optional"`
-		MenuMode   string `json:"menuMode,optional"`
-		MenuIds    string `json:"menuIds,optional"`
-		ActionMode string `path:"actionMode,options=commonlyRenew|commonlyList|menuMode"`
-		NewUserId  string `header:"newUserId"`
-		EntId      int64  `header:"entId,optional"`
-		EntUserId  int64  `header:"entUserId,optional"`
+		Platform     string `json:"platform,default=PC,options=PC|WX|APP"`
+		UserId       string `header:"userId"`
+		AppId        string `header:"appId"`
+		Phone        string `header:"phone,optional"`
+		MenuMode     string `json:"menuMode,optional"`
+		MenuIds      string `json:"menuIds,optional"`
+		ActionMode   string `path:"actionMode,options=commonlyRenew|commonlyList|menuMode"`
+		NewUserId    string `header:"newUserId"`
+		EntId        string `header:"entId,optional"`
+		EntUserId    string `header:"entUserId,optional"`
+		AccountId    string `header:"accountId,optional"`    //账户id
+		PositionType string `header:"positionType,optional"` //职位类型 0个人 1企业
+		PositionId   string `header:"positionId,optional"`   //职位id
 	}
 	//
 	CommonResp {
@@ -286,6 +292,8 @@ type (
 		AppId     string `header:"appId"`
 		UserIds   string `json:"userIds,optional"`
 		NewUserId string `header:"newUserId"`
+		EntId     string `header:"entId,optional"`
+		EntUserId string `header:"entUserId,optional"`
 	}
 
 	UserIdentityReq {
@@ -340,6 +348,5 @@ service userCenter-api {
 	post /userCenter/user/deleteById (UserDelReq) returns (resp)
 	@handler UserIdentity
 	post /userCenter/user/identity (UserIdentityReq) returns (resp)
-
-}
+	
 }

+ 2 - 0
entity/rpc.go

@@ -2,10 +2,12 @@ package entity
 
 import (
 	"app.yhyue.com/moapp/jyInfo/rpc/manager/manager"
+	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/powercheck"
 	"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/resource"
 )
 
 var (
 	ResourceLib resource.Resource
 	ManagerLib  manager.Manager
+	PowerCheck  powercheck.PowerCheck
 )

+ 38 - 10
entity/source.go

@@ -1,19 +1,29 @@
 package entity
 
 import (
-	resourcepb "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
+	powerCheck "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
+	resource "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
 	"context"
-	"strconv"
 )
 
-//获取用户资源信息
-func GetResources(appId, baseUserId string, entId, entUserId int64) []string {
-	baseUserIdInt, _ := strconv.ParseInt(baseUserId, 10, 0)
-	req := &resourcepb.HaspowersReq{
-		EntId:     entId,
-		UserId:    baseUserIdInt,
-		EntUserId: entUserId,
-		Appid:     appId,
+type UserInfoRpc struct {
+	AppId        string //appId 剑鱼 10000
+	UserId       string //用户id
+	BaseUserId   int64  //用户基本id
+	EntId        int64  //企业id
+	EntUserId    int64  //企业用户id
+	AccountId    int64  //账户id
+	PositionType int64  //职位类型 @个人 1企业
+	PositionId   int64  //职位id
+}
+
+// GetUserResources  获取用户资源信息
+func (ui *UserInfoRpc) GetUserResources() []string {
+	req := &resource.HaspowersReq{
+		EntId:     ui.EntId,
+		UserId:    ui.BaseUserId,
+		EntUserId: ui.EntUserId,
+		Appid:     ui.AppId,
 	}
 	powerList, err := ResourceLib.Haspowers(context.Background(), req)
 	if err == nil && len(powerList.Powers) > 0 {
@@ -21,3 +31,21 @@ func GetResources(appId, baseUserId string, entId, entUserId int64) []string {
 	}
 	return []string{}
 }
+
+// GetUserPowers  获取用户权益信息
+func (ui *UserInfoRpc) GetUserPowers() *powerCheck.CheckResp {
+	req := &powerCheck.CheckReq{
+		Appid:        ui.AppId,
+		Userid:       ui.UserId,
+		BaseUserId:   ui.BaseUserId,
+		AccountId:    ui.AccountId,
+		EntId:        ui.EntId,
+		PositionType: ui.PositionType,
+		PositionId:   ui.PositionId,
+	}
+	checkResp, err := PowerCheck.Check(context.Background(), req)
+	if err == nil {
+		return checkResp
+	}
+	return nil
+}

+ 164 - 214
entity/user.go

@@ -13,15 +13,11 @@ import (
 )
 
 const (
-	IsNewFreeTimeCell       = 1637830020
-	BigMemberUserPowerTable = "bigmember_service_user"
-	RedisCode               = "newother"
-	RedisMenuKey            = "jy_workdesktopmenu_%s_%s_%s"
-	UserPowerRedisKey       = "jy_userpowerredis_%s_%d_%s"
-	UserEntIdKey            = "jy_userentid_%s_%d_%s"
-	UserRegisterTime        = "jy_userregistertime_%s"
-	EntnicheWaitEmpower     = "entniche_wait_empower"
-	EntnichePower           = "entniche_power"
+	RedisCode         = "newother"
+	RedisMenuKey      = "jy_workdesktopmenu_%s_%s_%s"
+	UserPowerRedisKey = "jy_userpowerredis_%s_%d_%d_%s"
+	UserEntIdKey      = "jy_userentid_%s_%d_%s"
+	UserRegisterTime  = "jy_userregistertime_%s"
 )
 
 type UserInfo struct {
@@ -32,12 +28,9 @@ type UserInfo struct {
 
 var (
 	CapitalRetention = "capital_retention"
-	//UserCapitals     = map[string]map[string]int{}
-	//UserPermissions  = map[string]map[string]int{}
-	//UserLock         = map[string]*sync.Mutex{}
-	OverallLock    = &sync.Mutex{}
-	UserInfoMap    = map[string]*UserInfo{}
-	UserRolePowers = map[string][]string{}
+	OverallLock      = &sync.Mutex{}
+	UserInfoMap      = map[int64]*UserInfo{}
+	UserRolePowers   = map[string][]string{}
 )
 
 /*
@@ -52,219 +45,175 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
 	* 超级订阅--》新版超级订阅vs老版超级订阅
 	* 免费用户--》新免费用户
 	 */
+	/*
+	* P278 用户身份切换
+	* 用户权益 通过 权益中台rpc获取
+	* 用户资源 通过 资源中台rpc获取
+	 */
 	var UserPowerMap = map[string]int{}
 	//redis newother 查询是否存在用户功能信息
-	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, m.AppId, time.Now().Day(), m.UserId)
+	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, m.AppId, time.Now().Day(), m.EntId, m.UserId)
 	bytes, err := redis.GetBytes(RedisCode, userPowerRedisKey)
 	if err == nil && len(*bytes) > 0 {
 		if err = json.Unmarshal(*bytes, &UserPowerMap); err == nil {
 			return UserPowerMap
 		}
 	}
-	//查询用户信息
-	data, ok := Mgo.FindById("user", m.UserId, `{"s_phone":1,"s_m_phone":1,i_member_status":1,“i_member_endtime”:1,"s_member_mainid":1,"i_member_sub_status":1,"i_vip_status":1,"l_vip_endtime":1,"o_vipjy":1,"o_jy":1,"l_registedate":1}`)
-	if ok && *data != nil && len(*data) > 0 {
-		var (
-			isFree = true
-			//第一版领域化权限判断  ;第二版:超级订阅||大会员 到期时间超过90天
-			//商机管理服务 前提是超级订阅、大会员、医械通
-			domainBool           = false
-			registerTime   int64 = 0
-			entnicheRoleId       = 0                     //企业级服务 企业管理员
-			entnicheIsNew        = -1                    //是否是新版商机管理
-			powerSource          = 0                     //商机管理服务
-			memberStatus         = 0                     //大会员
-			serviceIds           = map[string][]string{} //大会员服务id集合
-		)
-		phone, _ := MC.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
-		if phone != "" {
-			//大会员
-			memberStatus = MC.IntAll((*data)["i_member_status"])
-			if memberStatus > 0 || ConfigJson.BigMemberOff {
-				mainUserId := m.UserId
-				if memberStatus > 0 {
-					registerTime = MC.Int64All((*data)["i_member_endtime"])
-					domainBool = true
-					isFree = false
-					UserPowerMap["0"] = memberStatus
-					UserPowerMap[strconv.Itoa(50+memberStatus)] = 1
-					serviceIds["M"] = append(serviceIds["M"], "0", strconv.Itoa(50+memberStatus))
-					//是否是子账号 而且 子账号被启用
-					if (*data)["s_member_mainid"] != nil && MC.ObjToString((*data)["s_member_mainid"]) != "" && MC.IntAllDef((*data)["i_member_sub_status"], 0) > 0 {
-						mainUserId = MC.ObjToString((*data)["s_member_mainid"])
-					}
-				}
-				//大会员用户购买的服务
-				serviceList := Mysql.Find(BigMemberUserPowerTable, map[string]interface{}{"s_userid": mainUserId, "i_status": 0}, "DISTINCT(s_serviceid),i_frequency", "", -1, -1)
-				if serviceList != nil && len(*serviceList) != 0 {
-					for _, sv := range *serviceList {
-						UserPowerMap[MC.ObjToString(sv["s_serviceid"])] = MC.If(MC.IntAll(sv["i_frequency"]) > 0, MC.IntAll(sv["i_frequency"]), memberStatus).(int)
-						serviceIds["M"] = append(serviceIds["M"], MC.ObjToString(sv["s_serviceid"]))
-					}
-				}
-			}
-			//VIP用户
-			if vipStatus := MC.IntAll((*data)["i_vip_status"]); vipStatus > 0 {
-				if registerTime < MC.Int64All((*data)["l_vip_endtime"]) {
-					registerTime = MC.Int64All((*data)["l_vip_endtime"])
-				}
-				domainBool = true
-				isFree = false
-				UserPowerMap["200"] = vipStatus
-				serviceIds["V"] = append(serviceIds["V"], "200")
-				if vipSet := MC.ObjToMap((*data)["o_vipjy"]); vipSet != nil {
-					if buySet := MC.ObjToMap((*vipSet)["o_buyset"]); buySet != nil {
-						//vip 升级用户
-						if MC.IntAll((*buySet)["upgrade"]) > 0 {
-							UserPowerMap["201"] = vipStatus
-							serviceIds["V"] = append(serviceIds["V"], "201")
-						}
-					}
-				}
-			}
-			//当前企业id
-			if m.EntId > 0 {
-				UserPowerMap["702"] = 1
-				entNicheInfos := Mysql.SelectBySql(`SELECT i.status,i.isNew,i.power_source,r.role_id,u.power,i.model 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 i.id = ? `, phone, m.EntId)
-				//商机管理用户信息判断
-				if entNicheInfos != nil && len(*entNicheInfos) > 0 {
-					entNicheInfo := (*entNicheInfos)[0]
-					//1:企业管理员 2:部门管理员
-					entnicheRoleId = MC.IntAll(entNicheInfo["role_id"])
-					//商机管理
-					//status>0 商机管理付费用户
-					if MC.IntAll(entNicheInfo["status"]) == 1 {
-						//是否是新版商机管理
-						entnicheIsNew = MC.IntAll(entNicheInfo["isNew"])
-						//管理员entnicheRoleId>0 并不一定 power==1,即使power==0 也有权限
-						//员工被分配后power==1否则没有权限
-						if MC.IntAll(entNicheInfo["power"]) == 1 || entnicheRoleId > 0 {
-							//商机管理服务 P259需求
-							//有商机管理服务 不会再有商机管理订阅菜单
-							//商机管理服务,上次陈老师说叫“企业管理服务”,不然和商机管理产品容易混淆-- 杨蘭 2022/12/14
-							powerSource = MC.IntAll(entNicheInfo["power_source"])
-							switch powerSource {
-							case 0:
-								isFree = false
-								switch entnicheIsNew {
-								case 1: //新版商机管理
-									UserPowerMap["110"] = 1
-									switch MC.IntAll(entNicheInfo["role_id"]) {
-									case 2: //部门管理员
-										UserPowerMap["111"] = 1
-									case 1: //企业管理员
-										UserPowerMap["112"] = 1
-									}
-								case 0: //老版商机管理
-									UserPowerMap["100"] = 1
-									switch MC.IntAll(entNicheInfo["role_id"]) {
-									case 2: //部门管理员
-										UserPowerMap["101"] = 1
-									case 1: //企业管理员
-										UserPowerMap["102"] = 1
-									}
-									//老版商机管理: model:1-统一订阅,2-个人订阅
-									if MC.IntAll(entNicheInfo["model"]) == 1 {
-										UserPowerMap["103"] = 1
-									} else if MC.IntAll(entNicheInfo["model"]) == 2 {
-										UserPowerMap["104"] = 1
-									}
-								}
-							case 1:
-								//客户管理服务(商机管理服务) [前提:大会员、超级订阅、医械通用户]---免费用户也可以用 (需求调整来自刘苗:产品已确认)
-								UserPowerMap["600"] = 1
-								switch MC.IntAll(entNicheInfo["role_id"]) {
-								case 2: //部门管理员
-									UserPowerMap["602"] = 1
-								case 1: //企业管理员
-									UserPowerMap["601"] = 1
-								}
-							}
-						}
-					}
-				}
-			}
-			//免费用户
-			if isFree {
-				UserPowerMap["300"] = 1
-				freeSet := MC.ObjToMap((*data)["o_jy"])
-				if MC.IntAll((*freeSet)["i_newfree"]) > 0 || IsNewFreeTimeCell < MC.IntAll((*data)["l_registedate"]) {
-					//新免费用户
-					UserPowerMap["301"] = 1
-				}
-			}
-			//广东移动DICT
-			if Mysql.CountBySql(`select count(*) from privatedata where phone = ?`, phone) > 0 {
-				UserPowerMap["400"] = 1
+	//数据库查询 、资源中台获取、权益中台获取 查询用户信息
+	var (
+		registerTime int64
+	)
+	//以上获取不到的信息 再自主查库
+	userInfoRpc := UserInfoRpc{
+		AppId:        m.AppId,
+		UserId:       m.UserId,
+		BaseUserId:   m.NewUserId,
+		EntId:        m.EntId,
+		EntUserId:    m.EntUserId,
+		AccountId:    m.AccountId,
+		PositionType: m.PositionType,
+		PositionId:   m.PositionId,
+	}
+	//权益中台获取权益
+	userPowers := userInfoRpc.GetUserPowers()
+	if userPowers != nil {
+		//注册时间
+		registerTime = userPowers.Free.Registedate
+		//大会员
+		member := userPowers.Member
+		if member.Status > 0 || ConfigJson.BigMemberOff {
+			if member.Status > 0 {
+				UserPowerMap["0"] = int(member.Status)
+				UserPowerMap[strconv.Itoa(50+int(member.Status))] = 1
 			}
-			//资源中台获取权限
-			powerList := GetResources(m.AppId, m.NewUserId, m.EntId, m.EntUserId)
-			if len(powerList) > 0 {
-				for _, plv := range powerList {
-					UserPowerMap[plv] = 1
+			//大会员用户购买的服务 也有可能是非大会员用户 购买这些服务
+			if member.MemberPowerList != nil && len(member.MemberPowerList) > 0 {
+				for _, mp := range member.MemberPowerList {
+					UserPowerMap[strconv.FormatInt(mp, 10)] = MC.If(member.Status > 0, int(member.Status), 1).(int)
 				}
 			}
-			//人员行为统计菜单-1、购买大会员且创建了企业的管理员;2、新版商机管理管理员;3、商机管理服务管理员
-			if entnicheRoleId > 0 && memberStatus > 0 {
-				UserPowerMap["50"] = 1
-			}
-			//必须是企业管理员-&-购买了企业级应用服务
-			c := Mysql.CountBySql(fmt.Sprintf(`SELECT COUNT(id) FROM %s WHERE ent_id = ? AND TO_DAYS(end_time) >= TO_DAYS(NOW()) AND (LOCATE('VIP订阅',product_type) OR LOCATE('大会员',product_type))`, EntnicheWaitEmpower), m.EntId)
-			//企业级服务 权限管理(只有企业管理员有权限)
-			if entnicheRoleId == 1 && c > 0 {
-				UserPowerMap["700"] = 1
-			}
-			//企业级服务 企业订阅--
-			//1、存在未到期的购买主体为“企业”切购买产品为大会员或者超级订阅的部门管理员或企业管理员;c > 0
-			//2、存在未到期的老版或者新版商机管理的企业管理员或部门管理员(非商机管理服务)。entnicheIsNew > -1 && powerSource == 0
-			if (c > 0 || entnicheIsNew > -1 && powerSource == 0) && entnicheRoleId > 0 {
-				UserPowerMap["701"] = 1
-			}
-			//领域化产品权限
-			//第一版:必须是大会员或者超级订阅用户 且留资 留资表:capital_retention;source = 'medical_domain',未留资提示留资信息
-			//第二版:调资源中台rpc获取用户是否有使用领域化产品的权限 无权限则去购买
-			//需求调整:
-			//1:是否是大会员或者超级订阅用户 否:提示购买到超级订阅购买页; 是>-2
-			//2:判断用户是否留资  否:提示用去留资;是:>-3
-			//3:资源中台获取用户权限码判断是否有权限 否:提示用户去联系客服
-			if domainBool {
-				userRegisterTimeKey := fmt.Sprintf(UserRegisterTime, m.UserId)
-				redis.Put(RedisCode, userRegisterTimeKey, strconv.Itoa(int(registerTime)), int(registerTime))
-				UserPowerMap["500"] = 1
+		}
+		//超级订阅
+		vip := userPowers.Vip
+		if vip.Status > 0 {
+			if registerTime < vip.EndTime {
+				registerTime = vip.EndTime
 			}
-			//当前用户是否被分配权限
-			if m.EntUserId > 0 {
-				entnichePowers := Mysql.SelectBySql(fmt.Sprintf(`SELECT a.product_type,a.ent_id FROM %s a LEFT JOIN %s b ON a.id = b.wait_empower_id WHERE b.status = 1 AND b.ent_user_id = ?`, EntnicheWaitEmpower, EntnichePower), m.EntUserId)
-				if entnichePowers != nil && len(*entnichePowers) > 0 {
-					for _, entnichePower := range *entnichePowers {
-						//排除非当前企业分配的权限
-						if MC.Int64All(entnichePower["ent_id"]) != m.EntId {
-							productType := MC.ObjToString(entnichePower["product_type"])
-							if strings.Contains(productType, "大会员") && len(serviceIds["M"]) > 0 {
-								for _, v := range serviceIds["M"] {
-									UserPowerMap[v] = 0
-								}
-							}
-							if strings.Contains(productType, "VIP订阅") && len(serviceIds["V"]) > 0 {
-								for _, v := range serviceIds["V"] {
-									UserPowerMap[v] = 0
-								}
-							}
+			UserPowerMap["200"] = int(vip.Status)
+			UserPowerMap["201"] = int(vip.Upgrade)
+		}
+		//企业信息
+		if m.EntId > 0 {
+			UserPowerMap["702"] = 1
+		}
+		entInfo := userPowers.Ent
+		//商机管理
+		entNiche := userPowers.Entniche
+		if entNiche.Status > 0 {
+			//entInfo.EntRoleId 1:企业管理员 2:部门管理员
+			//管理员 entInfo.EntRoleId>0 并不一定 entNiche.IsEntPower==1,entNiche.IsEntPower==0 也有权限
+			//员工被分配后 entNiche.IsEntPower==1否则没有权限
+			if entNiche.IsEntPower > 0 || entInfo.EntRoleId > 0 {
+				//商机管理服务 P259需求
+				//有商机管理服务 不会再有商机管理订阅菜单
+				//商机管理服务,上次陈老师说叫“企业管理服务”,不然和商机管理产品容易混淆-- 杨蘭 2022/12/14
+				switch entNiche.PowerSource {
+				case 0:
+					switch entNiche.IsNew {
+					case 1: //新版商机管理
+						UserPowerMap["110"] = 1
+						switch entInfo.EntRoleId {
+						case 2: //部门管理员
+							UserPowerMap["111"] = 1
+						case 1: //企业管理员
+							UserPowerMap["112"] = 1
 						}
-
+					case 0: //老版商机管理
+						UserPowerMap["100"] = 1
+						switch entInfo.EntRoleId {
+						case 2: //部门管理员
+							UserPowerMap["101"] = 1
+						case 1: //企业管理员
+							UserPowerMap["102"] = 1
+						}
+						//老版商机管理: model:1-统一订阅,2-个人订阅
+						//if entNiche.Model == 1 {
+						//	UserPowerMap["103"] = 1
+						//} else if entNiche.Model == 2 {
+						//	UserPowerMap["104"] = 1
+						//}
+					}
+				case 1:
+					//客户管理服务(商机管理服务) [前提:大会员、超级订阅、医械通用户]---免费用户也可以用 (需求调整来自刘苗:产品已确认)
+					UserPowerMap["600"] = 1
+					switch entInfo.EntRoleId {
+					case 2: //部门管理员
+						UserPowerMap["602"] = 1
+					case 1: //企业管理员
+						UserPowerMap["601"] = 1
 					}
 				}
 			}
 		}
-		if UserPowerMap != nil {
-			bytes, err := json.Marshal(UserPowerMap)
-			if err == nil && len(bytes) > 0 {
-				redis.PutBytes(RedisCode, userPowerRedisKey, &bytes, ConfigJson.InternalTime)
-				if m.EntId > 0 {
-					//商机管理用户entId 缓存
-					userEntIdKey := fmt.Sprintf(UserEntIdKey, m.AppId, time.Now().Day(), m.UserId)
-					redis.Put(RedisCode, userEntIdKey, m.EntId, ConfigJson.InternalTime)
-				}
+		//免费用户
+		free := userPowers.Free
+		if free.IsFree {
+			UserPowerMap["300"] = 1
+			if free.IsUpgrade {
+				//新免费用户
+				UserPowerMap["301"] = MC.If(free.IsUpgrade, 1, 0).(int)
+			}
+		}
+		//----------其他-----------
+		//广东移动DICT
+		if entInfo.PrivateGD {
+			UserPowerMap["400"] = 1
+		}
+		//人员行为统计菜单-1、购买大会员且创建了企业的管理员;2、新版商机管理管理员;3、商机管理服务管理员
+		if entInfo.EntRoleId > 0 && member.Status > 0 {
+			UserPowerMap["50"] = 1
+		}
+		//必须是企业管理员-&-购买了企业级应用服务
+		//企业级服务 权限管理(只有企业管理员有权限)
+		entService := entInfo.BuyMember > 0 || entInfo.BuyVip > 0
+		if entInfo.EntRoleId == 1 && entService {
+			UserPowerMap["700"] = 1
+		}
+		//企业级服务 企业订阅--
+		//1、存在未到期的购买主体为“企业”切购买产品为大会员或者超级订阅的部门管理员或企业管理员;c > 0
+		//2、存在未到期的老版或者新版商机管理的企业管理员或部门管理员(非商机管理服务)。entnicheIsNew > -1 && powerSource == 0
+		if (entService || entInfo.PowerSource == 0) && entInfo.EntRoleId > 0 {
+			UserPowerMap["701"] = 1
+		}
+		//领域化产品权限
+		//第一版:必须是大会员或者超级订阅用户 且留资 留资表:capital_retention;source = 'medical_domain',未留资提示留资信息
+		//第二版:调资源中台rpc获取用户是否有使用领域化产品的权限 无权限则去购买
+		//需求调整:
+		//1:是否是大会员或者超级订阅用户 否:提示购买到超级订阅购买页; 是>-2
+		//2:判断用户是否留资  否:提示用去留资;是:>-3
+		//3:资源中台获取用户权限码判断是否有权限 否:提示用户去联系客服
+		if member.Status > 0 || vip.Status > 0 {
+			userRegisterTimeKey := fmt.Sprintf(UserRegisterTime, m.UserId)
+			redis.Put(RedisCode, userRegisterTimeKey, strconv.Itoa(int(registerTime)), int(registerTime))
+			UserPowerMap["500"] = 1
+		}
+	}
+	//资源中台获取权限
+	powerList := userInfoRpc.GetUserResources()
+	if len(powerList) > 0 {
+		for _, plv := range powerList {
+			UserPowerMap[plv] = 1
+		}
+	}
+	//缓存
+	if UserPowerMap != nil {
+		bytes, err := json.Marshal(UserPowerMap)
+		if err == nil && len(bytes) > 0 {
+			redis.PutBytes(RedisCode, userPowerRedisKey, &bytes, ConfigJson.InternalTime)
+			if m.EntId > 0 {
+				//商机管理用户entId 缓存 --- 用户判断 下次是否是当前企业
+				userEntIdKey := fmt.Sprintf(UserEntIdKey, m.AppId, time.Now().Day(), m.UserId)
+				redis.Put(RedisCode, userEntIdKey, m.EntId, ConfigJson.InternalTime)
 			}
 		}
 	}
@@ -272,8 +221,9 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
 }
 
 //clear One
-func ClearUserPowerFunc(userId, appId string) {
-	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), userId)
+func ClearUserPowerFunc(userId, appId, entId string) {
+	entIdInt, _ := strconv.Atoi(entId)
+	userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), entIdInt, userId)
 	redis.Del(RedisCode, userPowerRedisKey)
 	for _, v := range []string{"PC", "APP", "WX"} {
 		RedisMenuKey := fmt.Sprintf(RedisMenuKey, appId, v, userId)
@@ -281,7 +231,7 @@ func ClearUserPowerFunc(userId, appId string) {
 	}
 }
 
-//用户角色权限初始化
+// UserRolePowerInit 用户角色权限初始化
 func UserRolePowerInit(strs []string) {
 	if len(strs) > 0 {
 		jyUserRoleData := BaseMysql.SelectBySql(`SELECT id,name FROM jyfunction WHERE status = 1`)

+ 7 - 4
entity/workDesktop.go

@@ -18,13 +18,17 @@ import (
 type WorkDesktopMenu struct {
 	MenuTree     []*JYMenu //菜单
 	UserId       string    //用户id
-	NewUserId    string    //base_userid
+	NewUserId    int64     //base_userid
 	EntId        int64     //企业id
 	EntUserId    int64     //企业用户id
 	AppId        string    //appid 剑鱼:10000
 	IntranetBool bool      //是否开启内网访问模式
 	Platform     string    //平台来源
 	WorkStatus   int64     //菜单分组
+	AccountId    int64     //账户id
+	PositionType int64     //职位类型 @个人 1企业
+	PositionId   int64     //职位id
+
 }
 
 // JYMenu 工作桌面菜单内容
@@ -60,7 +64,7 @@ type Additional struct {
 	OpenType     string `json:"openType,optional,omitempty"`
 }
 
-// 获取有效菜单数据
+// GetMenuTreeData 获取有效菜单数据
 func (m *WorkDesktopMenu) GetMenuTreeData() error {
 	//tidb数据
 	//query := `SELECT * FROM ` + ConfigJson.WorkTableOut + ` WHERE  appid=? AND status=0 ORDER BY id ASC`
@@ -313,7 +317,7 @@ func (m *WorkDesktopMenu) WorkMenuFormat() ([]*pb.MenuList, error) {
 		menuList = append(menuList, oneLevel)
 	}
 	//清用户内存信息
-	func(baseUserid string) {
+	func(baseUserid int64) {
 		OverallLock.Lock()
 		defer OverallLock.Unlock()
 		userInfo := UserInfoMap[baseUserid]
@@ -373,7 +377,6 @@ func CommonlyUpdate(in *pb.WorkDesktopComprehensiveReq) (B bool, M string) {
 		//id 解密
 		ids = append(ids, encrypt.SE.DecodeString(mid))
 	}
-	logx.Info("------ids:", ids)
 	//更新此用户设置的常用功能
 	if B = BaseMysql.ExecTx("常用功能批量更新", func(tx *sql.Tx) bool {
 		//查询此用户常用功能是否已存在记录

+ 2 - 1
go.mod

@@ -4,8 +4,9 @@ go 1.16
 
 require (
 	app.yhyue.com/moapp/jyInfo v1.0.0
-	app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196
+	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230203165614-5d3d5a0950a5
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.4
 	github.com/zeromicro/go-zero v1.4.3
 	google.golang.org/grpc v1.51.0

+ 5 - 2
go.sum

@@ -8,12 +8,15 @@ app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHu
 app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220719064915-2fef79005dfa/go.mod h1:FjBF25AYoBrPhVKTXGXWcmEAbBT0ATTK6KJMOA+I80Q=
 app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
-app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196 h1:mlNnwFwll5ZaJj7zI1mHRNrfPaFm8Z+GbRU69pWMHCI=
-app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jybase v0.0.0-20221229065928-e4ba75127ac9/go.mod h1:efAeRPDpJ13JuNODuqtfLlKQSQgCbnUcwGPzhFU5krY=
+app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
+app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
 bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.mod h1:Yj4oabIGItuMoF0BXYLz2XAnF581kxgXBrvlUtIJrkI=
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4 h1:zl5eZrKDBENVVBUiPpzyQQ0/SBdGUmZS3thXycSEO1g=
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230203165614-5d3d5a0950a5 h1:TN13reXm/Fokxo3Fz+mmsRcmIIUbruLAEurbCPTw/Yo=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230203165614-5d3d5a0950a5/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=

+ 1 - 1
rpc/internal/logic/workdesktopclearuserinfologic.go

@@ -29,7 +29,7 @@ func (l *WorkDesktopClearUserInfoLogic) WorkDesktopClearUserInfo(in *pb.WorkDesk
 	//in.UserIds 不为空;清此用户内存信息
 	if in.UserIds != "" {
 		for _, uv := range strings.Split(in.UserIds, ",") {
-			go entity.ClearUserPowerFunc(uv, in.AppId)
+			go entity.ClearUserPowerFunc(uv, in.AppId, in.EntId)
 		}
 	}
 	return &pb.WorkDesktopComprehensiveResp{}, nil

+ 1 - 1
rpc/internal/logic/workdesktopmenuinfologic.go

@@ -24,7 +24,7 @@ func NewWorkDesktopMenuInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext
 	}
 }
 
-// 获取菜单树
+// WorkDesktopMenuInfo 获取菜单树
 func (l *WorkDesktopMenuInfoLogic) WorkDesktopMenuInfo(in *pb.WorkDesktopMenuInfoReq) (*pb.WorkDesktopMenuInfoResp, error) {
 	if in.UserId == "" {
 		return &pb.WorkDesktopMenuInfoResp{

+ 341 - 251
rpc/pb/userCenter.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.27.1
-// 	protoc        v3.20.0--rc2
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.15.5
 // source: userCenter.proto
 
 package pb
@@ -3238,10 +3238,13 @@ type WorkDesktopMenuInfoReq struct {
 	Platform     string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
 	Phone        string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
 	NewUserId    string `protobuf:"bytes,5,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
-	EntId        int64  `protobuf:"varint,6,opt,name=entId,proto3" json:"entId,omitempty"`
-	EntUserId    int64  `protobuf:"varint,7,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	EntId        string `protobuf:"bytes,6,opt,name=entId,proto3" json:"entId,omitempty"`
+	EntUserId    string `protobuf:"bytes,7,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 	IntranetBool bool   `protobuf:"varint,8,opt,name=intranetBool,proto3" json:"intranetBool,omitempty"`
 	WorkStatus   int64  `protobuf:"varint,9,opt,name=workStatus,proto3" json:"workStatus,omitempty"`
+	AccountId    string `protobuf:"bytes,10,opt,name=accountId,proto3" json:"accountId,omitempty"`
+	PositionType string `protobuf:"bytes,11,opt,name=positionType,proto3" json:"positionType,omitempty"`
+	PositionId   string `protobuf:"bytes,12,opt,name=positionId,proto3" json:"positionId,omitempty"`
 }
 
 func (x *WorkDesktopMenuInfoReq) Reset() {
@@ -3311,18 +3314,18 @@ func (x *WorkDesktopMenuInfoReq) GetNewUserId() string {
 	return ""
 }
 
-func (x *WorkDesktopMenuInfoReq) GetEntId() int64 {
+func (x *WorkDesktopMenuInfoReq) GetEntId() string {
 	if x != nil {
 		return x.EntId
 	}
-	return 0
+	return ""
 }
 
-func (x *WorkDesktopMenuInfoReq) GetEntUserId() int64 {
+func (x *WorkDesktopMenuInfoReq) GetEntUserId() string {
 	if x != nil {
 		return x.EntUserId
 	}
-	return 0
+	return ""
 }
 
 func (x *WorkDesktopMenuInfoReq) GetIntranetBool() bool {
@@ -3339,6 +3342,27 @@ func (x *WorkDesktopMenuInfoReq) GetWorkStatus() int64 {
 	return 0
 }
 
+func (x *WorkDesktopMenuInfoReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *WorkDesktopMenuInfoReq) GetPositionType() string {
+	if x != nil {
+		return x.PositionType
+	}
+	return ""
+}
+
+func (x *WorkDesktopMenuInfoReq) GetPositionId() string {
+	if x != nil {
+		return x.PositionId
+	}
+	return ""
+}
+
 //工作桌面-返回数据
 type WorkDesktopMenuInfoResp struct {
 	state         protoimpl.MessageState
@@ -3909,16 +3933,20 @@ type WorkDesktopComprehensiveReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserId     string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
-	AppId      string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
-	Platform   string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
-	Phone      string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
-	ActionMode string `protobuf:"bytes,5,opt,name=actionMode,proto3" json:"actionMode,omitempty"`
-	MenuMode   string `protobuf:"bytes,6,opt,name=menuMode,proto3" json:"menuMode,omitempty"`
-	MenuIds    string `protobuf:"bytes,7,opt,name=menuIds,proto3" json:"menuIds,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"`
-	EntUserId  int64  `protobuf:"varint,10,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	UserId       string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
+	AppId        string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`
+	Platform     string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
+	Phone        string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
+	ActionMode   string `protobuf:"bytes,5,opt,name=actionMode,proto3" json:"actionMode,omitempty"`
+	MenuMode     string `protobuf:"bytes,6,opt,name=menuMode,proto3" json:"menuMode,omitempty"`
+	MenuIds      string `protobuf:"bytes,7,opt,name=menuIds,proto3" json:"menuIds,omitempty"`
+	NewUserId    string `protobuf:"bytes,8,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
+	EntId        string `protobuf:"bytes,9,opt,name=entId,proto3" json:"entId,omitempty"`
+	EntUserId    string `protobuf:"bytes,10,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
+	AccountId    string `protobuf:"bytes,11,opt,name=accountId,proto3" json:"accountId,omitempty"`
+	PositionType string `protobuf:"bytes,12,opt,name=positionType,proto3" json:"positionType,omitempty"`
+	PositionId   string `protobuf:"bytes,13,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	IntranetBool bool   `protobuf:"varint,14,opt,name=intranetBool,proto3" json:"intranetBool,omitempty"`
 }
 
 func (x *WorkDesktopComprehensiveReq) Reset() {
@@ -4009,18 +4037,46 @@ func (x *WorkDesktopComprehensiveReq) GetNewUserId() string {
 	return ""
 }
 
-func (x *WorkDesktopComprehensiveReq) GetEntId() int64 {
+func (x *WorkDesktopComprehensiveReq) GetEntId() string {
 	if x != nil {
 		return x.EntId
 	}
-	return 0
+	return ""
 }
 
-func (x *WorkDesktopComprehensiveReq) GetEntUserId() int64 {
+func (x *WorkDesktopComprehensiveReq) GetEntUserId() string {
 	if x != nil {
 		return x.EntUserId
 	}
-	return 0
+	return ""
+}
+
+func (x *WorkDesktopComprehensiveReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *WorkDesktopComprehensiveReq) GetPositionType() string {
+	if x != nil {
+		return x.PositionType
+	}
+	return ""
+}
+
+func (x *WorkDesktopComprehensiveReq) GetPositionId() string {
+	if x != nil {
+		return x.PositionId
+	}
+	return ""
+}
+
+func (x *WorkDesktopComprehensiveReq) GetIntranetBool() bool {
+	if x != nil {
+		return x.IntranetBool
+	}
+	return false
 }
 
 //工作桌面 综合功能-返回数据
@@ -4098,6 +4154,8 @@ type WorkDesktopClearUserInfoReq struct {
 	Platform  string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
 	UserIds   string `protobuf:"bytes,4,opt,name=userIds,proto3" json:"userIds,omitempty"`
 	NewUserId string `protobuf:"bytes,5,opt,name=newUserId,proto3" json:"newUserId,omitempty"`
+	EntId     string `protobuf:"bytes,6,opt,name=entId,proto3" json:"entId,omitempty"`
+	EntUserId string `protobuf:"bytes,7,opt,name=entUserId,proto3" json:"entUserId,omitempty"`
 }
 
 func (x *WorkDesktopClearUserInfoReq) Reset() {
@@ -4167,6 +4225,20 @@ func (x *WorkDesktopClearUserInfoReq) GetNewUserId() string {
 	return ""
 }
 
+func (x *WorkDesktopClearUserInfoReq) GetEntId() string {
+	if x != nil {
+		return x.EntId
+	}
+	return ""
+}
+
+func (x *WorkDesktopClearUserInfoReq) GetEntUserId() string {
+	if x != nil {
+		return x.EntUserId
+	}
+	return ""
+}
+
 //
 type IdentityReq struct {
 	state         protoimpl.MessageState
@@ -4968,7 +5040,7 @@ var file_userCenter_proto_rawDesc = []byte{
 	0x70, 0x65, 0x6e, 0x69, 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, 0x8e, 0x02, 0x0a, 0x16, 0x57,
+	0x09, 0x52, 0x07, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x22, 0xf0, 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,
@@ -4979,26 +5051,49 @@ var file_userCenter_proto_rawDesc = []byte{
 	0x70, 0x68, 0x6f, 0x6e, 0x65, 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, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e,
+	0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 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, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x61,
 	0x6e, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69,
 	0x6e, 0x74, 0x72, 0x61, 0x6e, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x77,
 	0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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,
+	0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73,
+	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a,
+	0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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,
@@ -5010,222 +5105,217 @@ 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,
+	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, 0x22, 0xa5, 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, 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, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x09,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65,
-	0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 0x22, 0x1d, 0x0a, 0x0b,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69,
-	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xca, 0x02, 0x0a, 0x08,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
-	0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
-	0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
-	0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
-	0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
-	0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63,
-	0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
-	0x6f, 0x6e, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69,
-	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
-	0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f,
-	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
-	0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20,
-	0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
-	0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e,
-	0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x6e,
-	0x74, 0x69, 0x74, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x49, 0x64,
-	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x09, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
-	0x73, 0x22, 0x5d, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
-	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, 0x1e, 0x0a, 0x0a, 0x62, 0x61,
-	0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
-	0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
-	0x22, 0xd2, 0x02, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,
-	0x79, 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, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a,
-	0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63,
-	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x6e, 0x74, 0x55, 0x73,
-	0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74,
-	0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x75, 0x73, 0x65,
-	0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x65,
-	0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
-	0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50,
-	0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,
-	0x72, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xb5, 0x09, 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,
+	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, 0xab, 0x03, 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, 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, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
+	0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a,
+	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73,
+	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a,
+	0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a,
+	0x0c, 0x69, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6c, 0x18, 0x0e, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x65, 0x74, 0x42, 0x6f, 0x6f,
+	0x6c, 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, 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, 0x12, 0x2b, 0x0a,
-	0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0c, 0x2e,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x49, 0x64,
-	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x10, 0x49, 0x64,
-	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0c,
-	0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x49,
-	0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74,
-	0x69, 0x74, 0x79, 0x42, 0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
-	0x0c, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x49, 0x64, 0x65, 0x6e,
-	0x74, 0x69, 0x74, 0x79, 0x42, 0x79, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
-	0x0c, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49,
-	0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x55, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a,
-	0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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, 0xd3, 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, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 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, 0x22, 0x1d, 0x0a, 0x0b, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0xca, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x73,
+	0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73,
+	0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22,
+	0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+	0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
+	0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,
+	0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+	0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
+	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e,
+	0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0b, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x09, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+	0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
+	0x74, 0x79, 0x52, 0x09, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x73, 0x22, 0x5d, 0x0a,
+	0x0f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 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, 0x1e, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xd2, 0x02, 0x0a,
+	0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x1a, 0x0a,
+	0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65,
+	0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
+	0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,
+	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x65,
+	0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
+	0x26, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+	0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73,
+	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x55, 0x73,
+	0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x11, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74,
+	0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+	0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+	0x65, 0x32, 0xb5, 0x09, 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, 0x12, 0x2b, 0x0a, 0x0c, 0x49, 0x64, 0x65,
+	0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
+	0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
+	0x74, 0x79, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0c, 0x2e, 0x49, 0x64, 0x65,
+	0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74,
+	0x69, 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42,
+	0x79, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0c, 0x2e, 0x49, 0x64,
+	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
+	0x42, 0x79, 0x45, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0c, 0x2e, 0x49, 0x64,
+	0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e,
+	0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74,
+	0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65,
+	0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
+	0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 1 - 1
rpc/pb/userCenter_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.20.0--rc2
+// - protoc             v3.15.5
 // source: userCenter.proto
 
 package pb

+ 13 - 4
rpc/userCenter.proto

@@ -348,10 +348,13 @@ message WorkDesktopMenuInfoReq{
   string platform = 3;
   string phone = 4;
   string newUserId = 5;
-  int64 entId = 6;
-  int64 entUserId = 7;
+  string entId = 6;
+  string entUserId = 7;
   bool intranetBool = 8;
   int64 workStatus = 9;
+  string accountId =10;
+  string positionType =11;
+  string positionId =12;
 }
 
 //工作桌面-返回数据
@@ -425,8 +428,12 @@ message WorkDesktopComprehensiveReq{
   string menuMode = 6;
   string menuIds = 7;
   string newUserId = 8;
-  int64 entId = 9;
-  int64 entUserId = 10;
+  string entId = 9;
+  string entUserId = 10;
+  string accountId =11;
+  string positionType =12;
+  string positionId =13;
+  bool intranetBool = 14;
 }
 //工作桌面 综合功能-返回数据
 message WorkDesktopComprehensiveResp{
@@ -441,6 +448,8 @@ message  WorkDesktopClearUserInfoReq{
   string platform = 3;
   string userIds = 4;
   string newUserId = 5;
+  string entId = 6;
+  string entUserId = 7;
 }
 //
 message IdentityReq{

+ 37 - 17
service/workDesktop.go

@@ -11,6 +11,7 @@ import (
 	"fmt"
 	"github.com/zeromicro/go-zero/core/logx"
 	"math/rand"
+	"strconv"
 	"strings"
 	"time"
 )
@@ -67,21 +68,30 @@ func RenewWorkDesktopMenuModeOrCommonly(in *WorkDesktopComprehensiveReq) (r *Wor
 			//会出现 用户设置常用功能,此功能下线,用户设置依然保存的有此功能  查询不能加 AND status = 0
 			var menuSql = fmt.Sprintf(`SELECT * from %s WHERE id IN (%s)  OR (parentid IN (%s)  AND status = 0)  ORDER BY FIELD(id , %s);`, entity.ConfigJson.WorkTableInside, strings.Join(pIds, ","), strings.Join(pIds, ","), strings.Join(pIds, ","))
 			//外网访问
-			if entity.ConfigJson.WorkTableInside != entity.ConfigJson.WorkTableOut {
+			if entity.ConfigJson.WorkTableInside != entity.ConfigJson.WorkTableOut || in.IntranetBool {
 				menuSql = fmt.Sprintf(`SELECT * from %s WHERE id IN (%s)  OR (parentid IN (%s)  AND status = 0)`, entity.ConfigJson.WorkTableOut, strings.Join(pIds, ","), strings.Join(pIds, ","))
 			}
 			menuData := entity.BaseMysql.SelectBySql(menuSql)
 			if menuData != nil && len(*menuData) > 0 {
 				var (
-					m = &entity.WorkDesktopMenu{
-						MenuTree:  []*entity.JYMenu{},
-						UserId:    in.UserId,
-						NewUserId: in.NewUserId,
-						AppId:     in.AppId,
-						Platform:  in.Platform,
-						EntId:     in.EntId,
-						EntUserId: in.EntUserId,
-						//IntranetBool: in.IntranetBool,
+					entId, _        = strconv.ParseInt(in.EntId, 10, 64)
+					newUserId, _    = strconv.ParseInt(in.NewUserId, 10, 64)
+					entUserId, _    = strconv.ParseInt(in.EntUserId, 10, 64)
+					accountId, _    = strconv.ParseInt(in.AccountId, 10, 64)
+					positionType, _ = strconv.ParseInt(in.PositionType, 10, 64)
+					positionId, _   = strconv.ParseInt(in.PositionId, 10, 64)
+					m               = &entity.WorkDesktopMenu{
+						MenuTree:     []*entity.JYMenu{},
+						UserId:       in.UserId,
+						NewUserId:    newUserId,
+						AppId:        in.AppId,
+						EntId:        entId,
+						EntUserId:    entUserId,
+						Platform:     in.Platform,
+						AccountId:    accountId,
+						PositionType: positionType,
+						PositionId:   positionId,
+						IntranetBool: in.IntranetBool,
 					}
 					childMenus = map[int][]*entity.JYMenu{}
 				)
@@ -208,13 +218,14 @@ func GetWorkDesktopMenuMode(in *WorkDesktopMenuInfoReq) (str string, err error)
 
 // GetWordDesktopMenuTree 获取工作桌面菜单树
 func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error) {
-	if in.EntId > 0 {
+	if in.EntId != "" {
 		//判断商机管理用户是否切换企业
 		userEntIdKey := fmt.Sprintf(entity.UserEntIdKey, in.AppId, time.Now().Day(), in.UserId)
-		redisEntid := redis.GetInt(entity.RedisCode, userEntIdKey)
-		if int64(redisEntid) >= 0 && int64(redisEntid) != in.EntId {
+		redisEntId := redis.GetInt(entity.RedisCode, userEntIdKey)
+		entId, err := strconv.Atoi(in.EntId)
+		if err == nil && int64(redisEntId) >= 0 && redisEntId != entId {
 			//商机管理用户切换企业---清除用户权限缓存&&清除用户菜单缓存
-			entity.ClearUserPowerFunc(in.UserId, in.AppId)
+			entity.ClearUserPowerFunc(in.UserId, in.AppId, in.EntId)
 		}
 	}
 	t1 := time.Now()
@@ -228,16 +239,25 @@ func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error)
 			return menuList, nil
 		}
 	}
+	entId, _ := strconv.ParseInt(in.EntId, 10, 64)
+	newUserId, _ := strconv.ParseInt(in.NewUserId, 10, 64)
+	entUserId, _ := strconv.ParseInt(in.EntUserId, 10, 64)
+	accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
+	positionType, _ := strconv.ParseInt(in.PositionType, 10, 64)
+	positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
 	wdm := &entity.WorkDesktopMenu{
 		MenuTree:     []*entity.JYMenu{},
 		UserId:       in.UserId,
-		NewUserId:    in.NewUserId,
+		NewUserId:    newUserId,
 		AppId:        in.AppId,
-		EntId:        in.EntId,
-		EntUserId:    in.EntUserId,
+		EntId:        entId,
+		EntUserId:    entUserId,
 		Platform:     in.Platform,
 		IntranetBool: in.IntranetBool,
 		WorkStatus:   in.WorkStatus,
+		AccountId:    accountId,
+		PositionType: positionType,
+		PositionId:   positionId,
 	}
 	//获取菜单树的数据
 	if err := wdm.GetMenuTreeData(); err != nil {