Răsfoiți Sursa

分支合并

lianbingjie 2 ani în urmă
părinte
comite
ba521fa380
66 a modificat fișierele cu 8608 adăugiri și 524 ștergeri
  1. 118 1
      jyBXCore/api/bxcore.api
  2. 0 1
      jyBXCore/api/etc/bxcore-api.yaml
  3. 2 3
      jyBXCore/api/init/db.go
  4. 28 0
      jyBXCore/api/internal/handler/participateActionHandler.go
  5. 28 0
      jyBXCore/api/internal/handler/participateContentHandler.go
  6. 28 0
      jyBXCore/api/internal/handler/participateInfoHandler.go
  7. 28 0
      jyBXCore/api/internal/handler/participateListHandler.go
  8. 28 0
      jyBXCore/api/internal/handler/participatePersonsHandler.go
  9. 28 0
      jyBXCore/api/internal/handler/participateRecordsHandler.go
  10. 28 0
      jyBXCore/api/internal/handler/participateSetUpInfoHandler.go
  11. 28 0
      jyBXCore/api/internal/handler/participateShowHandler.go
  12. 45 0
      jyBXCore/api/internal/handler/routes.go
  13. 28 0
      jyBXCore/api/internal/handler/updateBidStatusHandler.go
  14. 63 0
      jyBXCore/api/internal/logic/participateActionLogic.go
  15. 59 0
      jyBXCore/api/internal/logic/participateContentLogic.go
  16. 60 0
      jyBXCore/api/internal/logic/participateInfoLogic.go
  17. 71 0
      jyBXCore/api/internal/logic/participateListLogic.go
  18. 60 0
      jyBXCore/api/internal/logic/participatePersonsLogic.go
  19. 64 0
      jyBXCore/api/internal/logic/participateRecordsLogic.go
  20. 84 0
      jyBXCore/api/internal/logic/participateSetUpInfoLogic.go
  21. 60 0
      jyBXCore/api/internal/logic/participateShowLogic.go
  22. 3 2
      jyBXCore/api/internal/logic/searchListLogic.go
  23. 66 0
      jyBXCore/api/internal/logic/updateBidStatusLogic.go
  24. 98 0
      jyBXCore/api/internal/types/types.go
  25. 1 0
      jyBXCore/entity/db.go
  26. 7 1
      jyBXCore/go.mod
  27. 175 2
      jyBXCore/go.sum
  28. 3 4
      jyBXCore/rpc/bxcore.go
  29. 337 5
      jyBXCore/rpc/bxcore.proto
  30. 109 8
      jyBXCore/rpc/bxcore/bxcore.go
  31. 9 21
      jyBXCore/rpc/entity/search.go
  32. 6 3
      jyBXCore/rpc/etc/bxcore.yaml
  33. 11 4
      jyBXCore/rpc/etc/db.yaml
  34. 21 13
      jyBXCore/rpc/init/db.go
  35. 19 23
      jyBXCore/rpc/init/init.go
  36. 12 4
      jyBXCore/rpc/internal/config/config.go
  37. 5 4
      jyBXCore/rpc/internal/logic/getsearchlistlogic.go
  38. 41 0
      jyBXCore/rpc/internal/logic/participateactionlogic.go
  39. 71 0
      jyBXCore/rpc/internal/logic/participatecontentlogic.go
  40. 84 0
      jyBXCore/rpc/internal/logic/participateinfologic.go
  41. 29 0
      jyBXCore/rpc/internal/logic/participatelistlogic.go
  42. 39 0
      jyBXCore/rpc/internal/logic/participatepersonslogic.go
  43. 63 0
      jyBXCore/rpc/internal/logic/participaterecordslogic.go
  44. 38 0
      jyBXCore/rpc/internal/logic/participatesetupinfologic.go
  45. 68 0
      jyBXCore/rpc/internal/logic/participateshowlogic.go
  46. 82 0
      jyBXCore/rpc/internal/logic/updatebidstatuslogic.go
  47. 54 0
      jyBXCore/rpc/internal/server/bxcoreserver.go
  48. 5 3
      jyBXCore/rpc/model/es/es.go
  49. 102 0
      jyBXCore/rpc/model/es/project.go
  50. 3 3
      jyBXCore/rpc/model/es/search.go
  51. 1042 0
      jyBXCore/rpc/model/mysql/participateBid.go
  52. 264 0
      jyBXCore/rpc/service/participate.go
  53. 587 0
      jyBXCore/rpc/service/participateBid.go
  54. 4 4
      jyBXCore/rpc/service/search.go
  55. 2919 2
      jyBXCore/rpc/type/bxcore/bxcore.pb.go
  56. 343 1
      jyBXCore/rpc/type/bxcore/bxcore_grpc.pb.go
  57. 63 0
      jyBXCore/rpc/util/participate.go
  58. 42 2
      jyBXCore/rpc/util/search.go
  59. 0 49
      jyBXCore/rpc/util/userInfo.go
  60. 5 0
      jyBXCore/rpc/util/util.go
  61. 246 0
      jyBXCore/test.http
  62. 1 1
      jyBXSubscribe/go.mod
  63. 2 2
      jyBXSubscribe/go.sum
  64. 5 2
      jyBXSubscribe/rpc/bxsubscribe.proto
  65. 10 3
      jyBXSubscribe/rpc/internal/logic/getsublistlogic.go
  66. 576 353
      jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

+ 118 - 1
jyBXCore/api/bxcore.api

@@ -2,7 +2,7 @@ syntax = "v1"
 
 info (
 	title: "剑鱼核心模块" // TODO: add title
-	desc: "标讯搜索,标讯详情等"// TODO: add description
+	desc: "标讯搜索、标讯详情、参标逻辑等"// TODO: add description
 	author: "wangshan"
 	email: "wangshan@topnet.net.cn"
 )
@@ -57,10 +57,127 @@ type (
 		Percentage int64  `json:"percentage,optional"` //付费用户占比
 		SearchType string `path:"searchType"`          //get|update|
 	}
+	//参标项目
+	baseParam {
+		EntId        int64  `header:"entId,optional"`        // 企业id
+		EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
+		PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
+		PositionId   int64  `header:"positionId,optional"`   //职位id
+		AccountId    int64  `header:"accountId,optional"`    //账户id
+		MgoUserId    string `header:"mgoUserId,optional"`    //原userId
+		AppId        string `header:"appId,optional"`        //剑鱼10000
+		UserId       string `header:"userId,optional"`       //用户id
+		NewUserId    int64  `header:"newUserId,optional"`    //base_user_id
+		EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
+		Phone        string `header:"phone,optional"`
+	}
+	// 列表数据参标信息请求参数
+	participateShowReq {
+		Ids string `json:"ids"` // 标讯id 逗号分割
+		baseParam
+	}
+	// 详情页参标信息请求参数
+	participateInfoReq {
+		Sid string `json:"sid"` // 标讯id
+		baseParam
+	}
+	// 投标状态更新请求参数
+	updateBidStatusReq {
+		BidType       int64    `json:"bidType"`                // 投标类型 1-直接投标 2-渠道投标
+		BidStage      []string `json:"bidStage,optional"`      // 投标项目阶段 ["未报名","已报名"...]
+		IsWin         int64    `json:"isWin,optional"`         // 是否中标 0-未选择 1-是 2-否
+		ChannelName   string   `json:"channelName,optional"`   // 渠道名称
+		ChannelPerson string   `json:"channelPerson,optional"` // 联系人
+		ChannelPhone  string   `json:"channelPhone,optional"`  //联系电话
+		Winner        string   `json:"winner,optional"`        // 中标单位
+		Sid           string   `json:"sid"`                    // 标讯id
+		baseParam
+	}
+	// 获取投标状态信息
+	participateContentReq {
+		Sid string `json:"sid"` // 标讯id
+		baseParam
+	}
+	// 参标操作记录请求参数
+	participateRecordsReq {
+		Sid      string `json:"sid"`                  // 标讯id
+		PageNum  int64  `json:"pageNum,default=1"`    // 页码
+		PageSize int64  `json:"pageSize,default=100"` // 每页条数
+		baseParam
+	}
+	// 当前部门/企业下参标人员信息
+	participatePersonsReq {
+		baseParam
+		ProjectId string `json:"projectId,optional"` //项目id
+	}
+
+	//投标状态更新:投标类型-投标项目阶段
+	BidTypeReq {
+		Name    string   `json:"name,optional"`
+		Content []string `json:"content,optional"`
+	}
+	//消息提醒设置:
+	RemindRuleReq {
+		BidState  string `json:"bidState,optional"`  //投标规则类型;直接投标;渠道投标;
+		Remainder int64  `json:"remainder,optional"` //距离投标截止日期需要多久开始提醒 单位h
+		Node      string `json:"node,optional"`      //那个节点进行消息提醒;和投标项目阶段绑定
+	}
+	//参标设置信息接口
+	participateSetUpInfoReq {
+		baseParam
+		SetAction  string           `json:"setAction,optional"`  //默认空;U:更新
+		IsAllow    string           `json:"isAllow,optional"`    //是否允许多人同时参标 默认0;允许1
+		BidType    []*BidTypeReq    `json:"bidType,optional"`    //投标类型自定义内容
+		RemindRule []*RemindRuleReq `json:"remindRule,optional"` //消息提醒
+	}
+	//用户参标、终止参标及划转接口开发
+	participateActionReq {
+		baseParam
+		BidIds      string `json:"bidIds,optional"`                    //招标信息id ,已加密。多个,号隔开
+		ProjectIds  string `json:"projectIds,optional"`                //项目信息id,已加密。多个,号隔开
+		ToEntUserId string `json:"toEntUserId,optional"`               //划转对象的企业用户id
+		IsRetain    bool   `json:"isRetain,optional"`                  //是否保留原跟踪人
+		ActionType  string `path:"actionType,options=in|out|transfer"` //in:参标;out:终止参标;transfer:划转
+	}
+	//我的参标项目列表|企业参标项目列表
+	participateListReq {
+		baseParam
+		Area          string `json:"area,optional"`             //省份
+		City          string `json:"city,optional"`             //城市
+		BidTime       string `json:"bidTime,optional"`          //招标日期:开始时间-结束时间
+		BidEndTime    string `json:"bidEndTime,optional"`       //投标截止日期:格式同上
+		BidOpenTime   string `json:"bidOpenTime,optional"`      //开标时间:格式同上
+		BidEndStatus  int64  `json:"bidEndStatus,optional"`     //投标截止状态:1:未截止;2:已截止;3:终止参标
+		BidOpenStatus int64  `json:"bidOpenStatus,optional"`    //开标状态:1:未开标;2:已开标
+		Keywords      string `json:"keywords,optional"`         //查询项目名称 关键词;多个空格隔开
+		EntUserIds    string `json:"entUserIds,optional"`       //企业参标人企业用户id集合,多个,号隔开
+		PageSize      int64  `json:"pageSize,default=10"`       //每页数据量
+		PageNum       int64  `json:"pageNum,default=1"`         //当前页码
+		Identity      string `path:"identity,options=mine|ent"` //我的:mine;企业:ent
+		OrderNum      int64  `json:"orderNum,default=0"`        //排序:0:投标截止日期正序、1:开标时间正序、2:更新状态时间倒叙
+	}
 )
 service bxcore-api {
 	@handler searchList
 	post /jybx/core/:userType/searchList(searchReq) returns (commonResp)
 	@handler limitSearchContent
 	post /jybx/core/:searchType/searchLimit(searchLimitReq) returns (commonResp)
+	@handler participateShow  // 列表数据参标信息接口
+	post /jybx/core/participate/show(participateShowReq) returns (commonResp)
+	@handler ParticipateInfo  // 详情页参标信息接口
+	post /jybx/core/participate/info(participateInfoReq) returns (commonResp)
+	@handler updateBidStatus  // 投标状态更新
+	post /jybx/core/participate/updateBidStatus(updateBidStatusReq) returns (commonResp)
+	@handler ParticipateContent  // 获取投标状态信息
+	post /jybx/core/participate/content(participateContentReq) returns (commonResp)
+	@handler ParticipateRecords  // 参标操作记录
+	post /jybx/core/participate/records(participateRecordsReq) returns (commonResp)
+	@handler ParticipatePersons  // 当前部门/企业下参标人员信息
+	post /jybx/core/participate/persons(participatePersonsReq) returns (commonResp)
+	@handler participateSetUpInfo // 参标设置信息
+	post /jybx/core/participate/setUpInfo(participateSetUpInfoReq) returns (commonResp)
+	@handler participateAction //参标|终止参标|划转项目
+	post /jybx/core/participate/:actionType/info(participateActionReq) returns (commonResp)
+	@handler participateList //我的参标项目列表|企业参标项目列表
+	post /jybx/core/participate/:identity/list(participateListReq) returns (commonResp)
 }

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

@@ -17,7 +17,6 @@ Core:
 AppId: 10000
 MgoLogsName: jybxcore_logs
 MgoLogsCount: 500
-
 DetailMosaicTxt: 略
 SearchMosaic:
   budget: true

+ 2 - 3
jyBXCore/api/init/db.go

@@ -5,7 +5,7 @@ package init
 
 import (
 	"app.yhyue.com/moapp/jybase/mongodb"
-	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 	"jyBXCore/entity"
 )
 
@@ -13,11 +13,10 @@ var (
 	MgoLog mongodb.MongodbSim
 )
 
-//
 func MongoDBInit(em *entity.Mongo) {
 	//
 	if em.MgoLog.Address != "" {
-		logx.Info("--初始化 mongodb log--")
+		log.Println("--初始化 mongodb log--")
 		MgoLog = mongodb.MongodbSim{
 			MongodbAddr: em.MgoLog.Address,
 			Size:        em.MgoLog.Size,

+ 28 - 0
jyBXCore/api/internal/handler/participateActionHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateContentHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateInfoHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateListHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participatePersonsHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateRecordsHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateSetUpInfoHandler.go

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

+ 28 - 0
jyBXCore/api/internal/handler/participateShowHandler.go

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

+ 45 - 0
jyBXCore/api/internal/handler/routes.go

@@ -22,6 +22,51 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jybx/core/:searchType/searchLimit",
 				Handler: limitSearchContentHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/show",
+				Handler: participateShowHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/info",
+				Handler: ParticipateInfoHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/updateBidStatus",
+				Handler: updateBidStatusHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/content",
+				Handler: ParticipateContentHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/records",
+				Handler: ParticipateRecordsHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/persons",
+				Handler: ParticipatePersonsHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/setUpInfo",
+				Handler: participateSetUpInfoHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/:actionType/info",
+				Handler: participateActionHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/jybx/core/participate/:identity/list",
+				Handler: participateListHandler(serverCtx),
+			},
 		},
 	)
 }

+ 28 - 0
jyBXCore/api/internal/handler/updateBidStatusHandler.go

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

+ 63 - 0
jyBXCore/api/internal/logic/participateActionLogic.go

@@ -0,0 +1,63 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateActionLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateActionLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateActionLogic {
+	return &ParticipateActionLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateActionLogic) ParticipateAction(req *types.ParticipateActionReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateAction(l.ctx, &bxcore.ParticipateActionReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		MgoUserId:    req.MgoUserId,
+		AccountId:    req.AccountId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		ProjectIds:   req.ProjectIds,
+		BidIds:       req.BidIds,
+		ToEntUserId:  req.ToEntUserId,
+		IsRetain:     req.IsRetain,
+		ActionType:   req.ActionType,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "操作失败",
+			Data:     false,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 59 - 0
jyBXCore/api/internal/logic/participateContentLogic.go

@@ -0,0 +1,59 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateContentLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateContentLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateContentLogic {
+	return &ParticipateContentLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateContentLogic) ParticipateContent(req *types.ParticipateContentReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateContent(l.ctx, &bxcore.ParticipateContentReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		MgoUserId:    req.MgoUserId,
+		AccountId:    req.AccountId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		Sid:          req.Sid,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data:     map[string]interface{}{},
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 60 - 0
jyBXCore/api/internal/logic/participateInfoLogic.go

@@ -0,0 +1,60 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateInfoLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateInfoLogic {
+	return &ParticipateInfoLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateInfoLogic) ParticipateInfo(req *types.ParticipateInfoReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateInfo(l.ctx, &bxcore.ParticipateInfoReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		MgoUserId:    req.MgoUserId,
+		AccountId:    req.AccountId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		Sid:          req.Sid,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data:     map[string]interface{}{},
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+
+}

+ 71 - 0
jyBXCore/api/internal/logic/participateListLogic.go

@@ -0,0 +1,71 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateListLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateListLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateListLogic {
+	return &ParticipateListLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateListLogic) ParticipateList(req *types.ParticipateListReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateList(l.ctx, &bxcore.ParticipateListReq{
+		Identity:      req.Identity,
+		EntId:         req.EntId,
+		EntUserId:     req.EntUserId,
+		PositionId:    req.PositionId,
+		PositionType:  req.PositionType,
+		AppId:         req.AppId,
+		MgoUserId:     req.MgoUserId,
+		AccountId:     req.AccountId,
+		UserId:        req.UserId,
+		NewUserId:     req.NewUserId,
+		Area:          req.Area,
+		City:          req.City,
+		BidTime:       req.BidTime,
+		BidEndTime:    req.BidEndTime,
+		BidOpenTime:   req.BidOpenTime,
+		BidEndStatus:  req.BidEndStatus,
+		BidOpenStatus: req.BidOpenStatus,
+		Keywords:      req.Keywords,
+		EntUserIds:    req.EntUserIds,
+		PageSize:      req.PageSize,
+		PageNum:       req.PageNum,
+		OrderNum:      req.OrderNum,
+		EntAccountId:  req.EntAccountId,
+		Phone:         req.Phone,
+	})
+	if res != nil && (*res).Data != nil {
+		return &types.CommonResp{
+			Err_code: res.ErrCode,
+			Err_msg:  res.ErrMsg,
+			Data:     res.Data,
+		}, err
+	}
+	return &types.CommonResp{
+		Err_code: 0,
+		Err_msg:  "",
+		Data:     nil,
+	}, nil
+}

+ 60 - 0
jyBXCore/api/internal/logic/participatePersonsLogic.go

@@ -0,0 +1,60 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipatePersonsLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipatePersonsLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipatePersonsLogic {
+	return &ParticipatePersonsLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipatePersonsLogic) ParticipatePersons(req *types.ParticipatePersonsReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipatePersons(l.ctx, &bxcore.ParticipatePersonsReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		MgoUserId:    req.MgoUserId,
+		AppId:        req.AppId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		AccountId:    req.AccountId,
+		ProjectId:    req.ProjectId, //项目信息id 移动需要
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data:     map[string]interface{}{},
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+	return
+}

+ 64 - 0
jyBXCore/api/internal/logic/participateRecordsLogic.go

@@ -0,0 +1,64 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateRecordsLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateRecordsLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateRecordsLogic {
+	return &ParticipateRecordsLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateRecordsLogic) ParticipateRecords(req *types.ParticipateRecordsReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateRecords(l.ctx, &bxcore.ParticipateRecordsReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		MgoUserId:    req.MgoUserId,
+		AccountId:    req.AccountId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		Sid:          req.Sid,
+		PageSize:     req.PageSize,
+		Page:         req.PageNum,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data: map[string]interface{}{
+				"list":  []map[string]interface{}{},
+				"total": 0,
+			},
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 84 - 0
jyBXCore/api/internal/logic/participateSetUpInfoLogic.go

@@ -0,0 +1,84 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateSetUpInfoLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateSetUpInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateSetUpInfoLogic {
+	return &ParticipateSetUpInfoLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateSetUpInfoLogic) ParticipateSetUpInfo(req *types.ParticipateSetUpInfoReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	var (
+		bidType    []*bxcore.BidTypeReq
+		remindRule []*bxcore.RemindRuleReq
+	)
+	if req.SetAction != "" {
+		if len(req.BidType) > 0 {
+			for _, v := range req.BidType {
+				bidType = append(bidType, &bxcore.BidTypeReq{
+					Name:    v.Name,
+					Content: v.Content,
+				})
+			}
+		}
+		if len(req.RemindRule) > 0 {
+			for _, v := range req.RemindRule {
+				remindRule = append(remindRule, &bxcore.RemindRuleReq{
+					BidState:  v.BidState,
+					Remainder: v.Remainder,
+					Node:      v.Node,
+				})
+			}
+		}
+	}
+	res, err := l.svcCtx.BxCore.ParticipateSetUpInfo(l.ctx, &bxcore.ParticipateSetUpInfoReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		AccountId:    req.AccountId,
+		SetAction:    req.SetAction,
+		IsAllow:      req.IsAllow,
+		BidType:      bidType,
+		RemindRule:   remindRule,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "操作失败",
+			Data:     false,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 60 - 0
jyBXCore/api/internal/logic/participateShowLogic.go

@@ -0,0 +1,60 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateShowLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewParticipateShowLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *ParticipateShowLogic {
+	return &ParticipateShowLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *ParticipateShowLogic) ParticipateShow(req *types.ParticipateShowReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.ParticipateShow(l.ctx, &bxcore.ParticipateShowReq{
+		EntId:        req.EntId,
+		EntUserId:    req.EntUserId,
+		PositionId:   req.PositionId,
+		PositionType: req.PositionType,
+		AppId:        req.AppId,
+		MgoUserId:    req.MgoUserId,
+		AccountId:    req.AccountId,
+		UserId:       req.UserId,
+		NewUserId:    req.NewUserId,
+		Ids:          req.Ids,
+		EntAccountId: req.EntAccountId,
+		Phone:        req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data:     []map[string]interface{}{},
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+
+}

+ 3 - 2
jyBXCore/api/internal/logic/searchListLogic.go

@@ -3,6 +3,7 @@ package logic
 import (
 	"context"
 	"fmt"
+	"github.com/zeromicro/go-zero/core/logx"
 	IC "jyBXCore/api/init"
 	"jyBXCore/api/internal/svc"
 	"jyBXCore/api/internal/types"
@@ -14,7 +15,6 @@ import (
 	"time"
 
 	"app.yhyue.com/moapp/jybase/common"
-	"github.com/zeromicro/go-zero/core/logx"
 )
 
 type SearchListLogic struct {
@@ -36,6 +36,7 @@ func NewSearchListLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http
 }
 
 func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
 	t := time.Now()
 	limitFlag, isNew := util.GetFlag(l.r, l.w, req.UserId)
 	res, err := l.svcCtx.BxCore.GetSearchList(l.ctx, &bxcore.SearchReq{
@@ -144,7 +145,7 @@ func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonRe
 		"search_publishtime": req.PublishTime,
 	}
 	if logId := IC.MgoLog.Save("jy_search_log", data); logId == "" {
-		logx.Info(fmt.Sprintf("保存搜索日志异常 %s", req.UserId))
+		log.Println(fmt.Sprintf("保存搜索日志异常 %s", req.UserId))
 	}
 	return &types.CommonResp{
 		Err_code: res.ErrCode,

+ 66 - 0
jyBXCore/api/internal/logic/updateBidStatusLogic.go

@@ -0,0 +1,66 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/type/bxcore"
+	"net/http"
+
+	"jyBXCore/api/internal/svc"
+	"jyBXCore/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type UpdateBidStatusLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	r      *http.Request
+}
+
+func NewUpdateBidStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) *UpdateBidStatusLogic {
+	return &UpdateBidStatusLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		r:      r,
+	}
+}
+
+func (l *UpdateBidStatusLogic) UpdateBidStatus(req *types.UpdateBidStatusReq) (resp *types.CommonResp, err error) {
+	defer common.Catch()
+	res, err := l.svcCtx.BxCore.UpdateBidStatus(l.ctx, &bxcore.UpdateBidStatusReq{
+		EntId:         req.EntId,
+		EntUserId:     req.EntUserId,
+		PositionId:    req.PositionId,
+		PositionType:  req.PositionType,
+		AppId:         req.AppId,
+		MgoUserId:     req.MgoUserId,
+		AccountId:     req.AccountId,
+		UserId:        req.UserId,
+		NewUserId:     req.NewUserId,
+		BidType:       req.BidType,
+		BidStage:      req.BidStage,
+		ChannelName:   req.ChannelName,
+		ChannelPerson: req.ChannelPerson,
+		ChannelPhone:  req.ChannelPhone,
+		IsWin:         req.IsWin,
+		Winner:        req.Winner,
+		Sid:           req.Sid,
+		EntAccountId:  req.EntAccountId,
+		Phone:         req.Phone,
+	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "更新失败",
+			Data:     false,
+		}, nil
+	}
+	return &types.CommonResp{
+		Err_code: res.ErrCode,
+		Err_msg:  res.ErrMsg,
+		Data:     res.Data,
+	}, nil
+}

+ 98 - 0
jyBXCore/api/internal/types/types.go

@@ -50,3 +50,101 @@ type SearchLimitReq struct {
 	Percentage int64  `json:"percentage,optional"` //付费用户占比
 	SearchType string `path:"searchType"`          //get|update|
 }
+
+type BaseParam struct {
+	EntId        int64  `header:"entId,optional"`        // 企业id
+	EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
+	PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
+	PositionId   int64  `header:"positionId,optional"`   //职位id
+	AccountId    int64  `header:"accountId,optional"`    //账户id
+	MgoUserId    string `header:"mgoUserId,optional"`    //原userId
+	AppId        string `header:"appId,optional"`        //剑鱼10000
+	UserId       string `header:"userId,optional"`       //用户id
+	NewUserId    int64  `header:"newUserId,optional"`    //base_user_id
+	EntAccountId int64  `header:"entAccountId,optional"` //企业账户id
+	Phone        string `header:"phone,optional"`
+}
+
+type ParticipateShowReq struct {
+	Ids string `json:"ids"` // 标讯id 逗号分割
+	BaseParam
+}
+
+type ParticipateInfoReq struct {
+	Sid string `json:"sid"` // 标讯id
+	BaseParam
+}
+
+type UpdateBidStatusReq struct {
+	BidType       int64    `json:"bidType"`                // 投标类型 1-直接投标 2-渠道投标
+	BidStage      []string `json:"bidStage,optional"`      // 投标项目阶段 ["未报名","已报名"...]
+	IsWin         int64    `json:"isWin,optional"`         // 是否中标 0-未选择 1-是 2-否
+	ChannelName   string   `json:"channelName,optional"`   // 渠道名称
+	ChannelPerson string   `json:"channelPerson,optional"` // 联系人
+	ChannelPhone  string   `json:"channelPhone,optional"`  //联系电话
+	Winner        string   `json:"winner,optional"`        // 中标单位
+	Sid           string   `json:"sid"`                    // 标讯id
+	BaseParam
+}
+
+type ParticipateContentReq struct {
+	Sid string `json:"sid"` // 标讯id
+	BaseParam
+}
+
+type ParticipateRecordsReq struct {
+	Sid      string `json:"sid"`                  // 标讯id
+	PageNum  int64  `json:"pageNum,default=1"`    // 页码
+	PageSize int64  `json:"pageSize,default=100"` // 每页条数
+	BaseParam
+}
+
+type ParticipatePersonsReq struct {
+	BaseParam
+	ProjectId string `json:"projectId,optional"` //项目id
+}
+
+type BidTypeReq struct {
+	Name    string   `json:"name,optional"`
+	Content []string `json:"content,optional"`
+}
+
+type RemindRuleReq struct {
+	BidState  string `json:"bidState,optional"`  //投标规则类型;直接投标;渠道投标;
+	Remainder int64  `json:"remainder,optional"` //距离投标截止日期需要多久开始提醒 单位h
+	Node      string `json:"node,optional"`      //那个节点进行消息提醒;和投标项目阶段绑定
+}
+
+type ParticipateSetUpInfoReq struct {
+	BaseParam
+	SetAction  string           `json:"setAction,optional"`  //默认空;U:更新
+	IsAllow    string           `json:"isAllow,optional"`    //是否允许多人同时参标 默认0;允许1
+	BidType    []*BidTypeReq    `json:"bidType,optional"`    //投标类型自定义内容
+	RemindRule []*RemindRuleReq `json:"remindRule,optional"` //消息提醒
+}
+
+type ParticipateActionReq struct {
+	BaseParam
+	BidIds      string `json:"bidIds,optional"`                    //招标信息id ,已加密。多个,号隔开
+	ProjectIds  string `json:"projectIds,optional"`                //项目信息id,已加密。多个,号隔开
+	ToEntUserId string `json:"toEntUserId,optional"`               //划转对象的企业用户id
+	IsRetain    bool   `json:"isRetain,optional"`                  //是否保留原跟踪人
+	ActionType  string `path:"actionType,options=in|out|transfer"` //in:参标;out:终止参标;transfer:划转
+}
+
+type ParticipateListReq struct {
+	BaseParam
+	Area          string `json:"area,optional"`             //省份
+	City          string `json:"city,optional"`             //城市
+	BidTime       string `json:"bidTime,optional"`          //招标日期:开始时间-结束时间
+	BidEndTime    string `json:"bidEndTime,optional"`       //投标截止日期:格式同上
+	BidOpenTime   string `json:"bidOpenTime,optional"`      //开标时间:格式同上
+	BidEndStatus  int64  `json:"bidEndStatus,optional"`     //投标截止状态:1:未截止;2:已截止;3:终止参标
+	BidOpenStatus int64  `json:"bidOpenStatus,optional"`    //开标状态:1:未开标;2:已开标
+	Keywords      string `json:"keywords,optional"`         //查询项目名称 关键词;多个空格隔开
+	EntUserIds    string `json:"entUserIds,optional"`       //企业参标人企业用户id集合,多个,号隔开
+	PageSize      int64  `json:"pageSize,default=10"`       //每页数据量
+	PageNum       int64  `json:"pageNum,default=1"`         //当前页码
+	Identity      string `path:"identity,options=mine|ent"` //我的:mine;企业:ent
+	OrderNum      int64  `json:"orderNum,default=0"`        //排序:0:投标截止日期正序、1:开标时间正序、2:更新状态时间倒叙
+}

+ 1 - 0
jyBXCore/entity/db.go

@@ -22,6 +22,7 @@ type MongoStruct struct {
 //
 type Mysql struct {
 	Main *MysqlStruct `json:"main"`
+	Base *MysqlStruct `json:"base"`
 }
 
 //mysql

+ 7 - 1
jyBXCore/go.mod

@@ -5,9 +5,11 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230509102020-7c97492d5b78
 	app.yhyue.com/moapp/jylogx v0.0.0-20230522075659-ae6fbedb92bc
+	app.yhyue.com/moapp/jypkg v0.0.0-20230418065254-1767899b2936
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a
 	github.com/go-sql-driver/mysql v1.7.0
+	github.com/gogf/gf/v2 v2.0.6
 	github.com/zeromicro/go-zero v1.5.2
 	google.golang.org/grpc v1.54.0
 	google.golang.org/protobuf v1.30.0
@@ -15,7 +17,11 @@ require (
 
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
+	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 // indirect
+	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect

+ 175 - 2
jyBXCore/go.sum

@@ -1,28 +1,40 @@
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d h1:WPsYuuptAd3UEgN+jPzpnsDe/OvcshDUUtOTZPYGSJ8=
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d/go.mod h1:91/lSD/hS+ckMVP3WdidRzDhC60lLMdyce9QHy0cSMA=
+app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 h1:cCmWQW8DUBD2nuZNDz9aIe6MrlioxTbdaA2YiJhlzjY=
+app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547/go.mod h1:JvIs8uKjdT963+7JnZGIEcL4ctBiBjwkoz0kNyigE78=
 app.yhyue.com/moapp/jybase v0.0.0-20220415064050-37ce64b3e2d4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220418104200-46c3fff161c7/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220420032112-668025915ee4/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
+app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20230509102020-7c97492d5b78 h1:sXhW2zCfk0vSUiUgKkvCViDEhndC7KYRLFGfIzYJPrM=
 app.yhyue.com/moapp/jybase v0.0.0-20230509102020-7c97492d5b78/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
 app.yhyue.com/moapp/jylogx v0.0.0-20230522075659-ae6fbedb92bc h1:QEwc+V6ZTvk3VMFiMgPYJpsAVqRvTeIMupVfpO5PQYk=
 app.yhyue.com/moapp/jylogx v0.0.0-20230522075659-ae6fbedb92bc/go.mod h1:5xAagkwCYnqG5VEHnOV2AqD6DiR169qvOjYKaHMHecU=
+app.yhyue.com/moapp/jypkg v0.0.0-20230418065254-1767899b2936 h1:Dl4sbFr3lOrAY7TKN6rT5K3NOuwqVFtjoXN2EiE0mYU=
+app.yhyue.com/moapp/jypkg v0.0.0-20230418065254-1767899b2936/go.mod h1:cWnWKx0bOu5dHKAVAoYFRCDqEWDw2lOVWUAA5a0u+74=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
+bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
+bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
 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-20230222052351-9d6fad062447 h1:hrBqrsf2QHTrnoR9VTV4w7g2akDfbpQ+umNQvkkNs+Y=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/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-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 h1:aK3ya7aznINdAuEl7sKq9U2MvJidUfk6nxPGjjX+t3Y=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13/go.mod h1:vDEKni2rnCraKgKnnCEIwsFmO92GxnpfKmNQ+83wKP0=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
 cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
 cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
 cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
@@ -83,7 +95,9 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
 github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
 github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs=
+github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
 github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0=
 github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -97,6 +111,8 @@ github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODV
 github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
 github.com/alicebob/miniredis/v2 v2.30.2 h1:lc1UAUT9ZA7h4srlfBmBt2aorm5Yftk9nBjxz7EyY9I=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/antonlindstrom/pgstore v0.0.0-20200229204646-b08ebf1105e0/go.mod h1:2Ti6VUHVxpC0VSmTZzEvpzysnaGAfGBOoMIz5ykPyyw=
+github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
 github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
 github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
@@ -107,6 +123,10 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
+github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw=
+github.com/bos-hieu/mongostore v0.0.2/go.mod h1:8AbbVmDEb0yqJsBrWxZIAZOxIfv/tsP8CDtdHduZHGg=
+github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
+github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI=
 github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
 github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -131,20 +151,25 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
 github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
 github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
 github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
 github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/coscms/tagfast v0.0.0-20150925144250-2b69b2496250/go.mod h1:zX8vynptAghuV/KG8BOZlDeo4DsTKWfBQ154RWlkay0=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f h1:q/DpyjJjZs94bziQ7YkBmIlpqbVP7yw179rnzoNVX1M=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
+github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
@@ -152,6 +177,7 @@ github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZ
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
 github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY=
 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
 github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
@@ -192,6 +218,9 @@ github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM
 github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
 github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gin-contrib/sessions v0.0.5/go.mod h1:vYAuaUPqie3WUSsft6HUlCjlwwoJQs97miaG2+7neKY=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -229,10 +258,15 @@ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh
 github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
 github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
 github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
+github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
+github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
 github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
 github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
 github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
 github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
 github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
 github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
 github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
@@ -240,6 +274,8 @@ github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
 github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
+github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
+github.com/go-xorm/xorm v0.7.9/go.mod h1:XiVxrMMIhFkwSkh96BW7PACl7UhLtx2iJIHMdmjh5sQ=
 github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
 github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
 github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
@@ -265,9 +301,12 @@ github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGt
 github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
 github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
 github.com/gogf/gf/v2 v2.0.6 h1:2etb4FMpbQKWIJO+UjtIWrZUp01HUsFb6Po8pgizAWk=
 github.com/gogf/gf/v2 v2.0.6/go.mod h1:8uYzw7qNzuq8vrhVlWke1b1925FFqOJIgmyYW1sr/0M=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
@@ -308,6 +347,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
 github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
 github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
 github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
 github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -365,9 +405,12 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i
 github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU=
 github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA=
 github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
+github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
 github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
 github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
+github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
 github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
@@ -395,6 +438,51 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
 github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
 github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
+github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
+github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
+github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
+github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
+github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
+github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
+github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk=
+github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=
+github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=
+github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
+github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
+github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
+github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
+github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
+github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
+github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
+github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
+github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
+github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
+github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.0.7/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
+github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
+github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
+github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
+github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
+github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0=
+github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po=
+github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ=
+github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig=
+github.com/jackc/pgx v3.6.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
+github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
+github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
+github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
+github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA=
+github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o=
+github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg=
+github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA=
+github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
 github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
 github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
 github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
@@ -413,6 +501,7 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
 github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
 github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -424,6 +513,7 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8
 github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA=
 github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
 github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
+github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b/go.mod h1:g2nVr8KZVXJSS97Jo8pJ0jgq29P6H7dG0oplUA86MQw=
 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
@@ -441,10 +531,17 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
 github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
+github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
+github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/longbridgeapp/sqlparser v0.3.1 h1:iWOZWGIFgQrJRgobLXUNJdvqGRpbVXkyKUKUA5CNJBE=
@@ -458,10 +555,17 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
 github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
 github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
+github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
+github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
 github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
 github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
+github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
 github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
 github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
 github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
@@ -471,10 +575,14 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
 github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
 github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
+github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
 github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
+github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
 github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
@@ -509,6 +617,7 @@ github.com/olivere/elastic/v7 v7.0.22 h1:esBA6JJwvYgfms0EVlH7Z+9J4oQ/WUADF2y/nCN
 github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8=
 github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
@@ -518,6 +627,7 @@ github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042
 github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
 github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow=
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
 github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
@@ -526,6 +636,7 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl
 github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
 github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
 github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
 github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A=
@@ -550,6 +661,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
 github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
 github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
 github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
 github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
 github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
@@ -558,11 +670,13 @@ github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrb
 github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM=
 github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk=
 github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
 github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
+github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
@@ -571,25 +685,36 @@ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+
 github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
 github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
 github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
 github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
 github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
 github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
 github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
+github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg=
 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
 github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
 github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
+github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
+github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
 github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
 github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
+github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
+github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
+github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
 github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
@@ -645,7 +770,10 @@ github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
 github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
 github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
 github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
+github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
+github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
 github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
+github.com/wader/gormstore/v2 v2.0.0/go.mod h1:3BgNKFxRdVo2E4pq3e/eiim8qRDZzaveaIcIvu2T8r0=
 github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
 github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
 github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
@@ -668,10 +796,12 @@ github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJB
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
 github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
+github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
 github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
 github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
 github.com/zeromicro/go-zero v1.5.2 h1:vpMlZacCMtgdtYzKI3OMyhS6mZ9UQctiAh0J7gIq31I=
 github.com/zeromicro/go-zero v1.5.2/go.mod h1:ndCd1nMMAdEMZgPfdm1fpavHUdBW0ykB6ckCRaSG10w=
+github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
 go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
 go.etcd.io/etcd/api/v3 v3.5.8 h1:Zf44zJszoU7zRV0X/nStPenegNXoFDWcB/MwrJbA+L4=
@@ -685,9 +815,11 @@ go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/
 go.etcd.io/etcd/client/v3 v3.5.8 h1:B6ngTKZSWWowHEoaucOKHQR/AtZKaoHLiUpWxOLG4l4=
 go.etcd.io/etcd/client/v3 v3.5.8/go.mod h1:idZYIPVkttBJBiRigkB5EM0MmEyx8jcl18zCV3F5noc=
 go.mongodb.org/mongo-driver v1.5.0/go.mod h1:boiGPFqyBs5R0R5qf2ErokGRekMfwn+MqKaUyHs7wy0=
+go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
 go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
 go.mongodb.org/mongo-driver v1.11.4 h1:4ayjakA013OdpGyL2K3ZqylTac/rMjrJOMZ1EHizXas=
 go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
 go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
 go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
 go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@@ -730,6 +862,9 @@ go.opentelemetry.io/otel/trace v1.15.1/go.mod h1:IWdQG/5N1x7f6YUlmdLeJvH9yxtuJAf
 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
 go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
 go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
 go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
@@ -741,25 +876,36 @@ go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnw
 go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
 go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
 go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
 go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
 go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
 go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
 go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
 go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
 go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
 go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
 go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
 golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
 golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
 golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
@@ -808,6 +954,7 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@@ -818,6 +965,7 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -883,8 +1031,10 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -897,6 +1047,8 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -949,6 +1101,7 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -983,6 +1136,7 @@ golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
 golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -993,6 +1147,7 @@ golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3
 golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
 golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
@@ -1001,8 +1156,11 @@ golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgw
 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
 golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -1042,10 +1200,13 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
 google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
@@ -1068,6 +1229,7 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
 google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
@@ -1075,6 +1237,7 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6
 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
 google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
 google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
 google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
 google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -1117,6 +1280,7 @@ google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7/go.mod h1:kGP+zUP2
 google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To=
 google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197 h1:BwjeHhu4HS48EZmu1nS7flldBIDPC3qn+HqaSQ1K4x8=
 google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
 google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
 google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -1175,6 +1339,7 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
 gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
 gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
+gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
 gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
 gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
 gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
@@ -1197,10 +1362,16 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gorm.io/driver/mysql v1.0.4/go.mod h1:MEgp8tk2n60cSBCq5iTcPDw3ns8Gs+zOva9EUhkknTs=
 gorm.io/driver/mysql v1.0.5 h1:WAAmvLK2rG0tCOqrf5XcLi2QUwugd4rcVJ/W3aoon9o=
 gorm.io/driver/mysql v1.0.5/go.mod h1:N1OIhHAIhx5SunkMGqWbGFVeh4yTNWKmMo1GOAsohLI=
+gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg=
+gorm.io/driver/sqlite v1.1.4/go.mod h1:mJCeTFr7+crvS+TRnWc5Z3UvwxUN1BGBLMrf5LA9DYw=
+gorm.io/gorm v1.20.7/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
+gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
 gorm.io/gorm v1.21.3 h1:qDFi55ZOsjZTwk5eN+uhAmHi8GysJ/qCTichM/yO7ME=
 gorm.io/gorm v1.21.3/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1250,3 +1421,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
 sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
 sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
 sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
+xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU=
+xorm.io/core v0.7.2-0.20190928055935-90aeac8d08eb/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM=

+ 3 - 4
jyBXCore/rpc/bxcore.go

@@ -6,10 +6,6 @@ import (
 	logrusx "app.yhyue.com/moapp/jylogx/logx"
 	"fmt"
 	"github.com/zeromicro/go-zero/core/logx"
-	"jyBXCore/rpc/type/bxcore"
-	"jyBXCore/rpc/util"
-	"log"
-
 	"github.com/zeromicro/go-zero/core/service"
 	"github.com/zeromicro/go-zero/zrpc"
 	"google.golang.org/grpc"
@@ -17,6 +13,9 @@ import (
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/internal/server"
 	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+	"log"
 )
 
 func main() {

+ 337 - 5
jyBXCore/rpc/bxcore.proto

@@ -37,11 +37,11 @@ message SearchReq {
   string interceptOtherWords = 31;//关键词截取后 后面三个字
   string bidField = 32;//领域化标识
   string accountId = 33; //账户id
-  string positionType =34; //职位类型 0个人 1企业
+  string positionType = 34; //职位类型 0个人 1企业
   string positionId = 35;  //职位id
   string mgoUserId = 36;  //原userId
-  string limitFlag =37; //未登录用户生成一个随机id
-  bool isNew=38;//未登录用户首次请求
+  string limitFlag = 37; //未登录用户生成一个随机id
+  bool isNew = 38;//未登录用户首次请求
 }
 
 message SearchResp {
@@ -58,8 +58,8 @@ message SearchData {
   int64 total = 6;//查询总结果数量
   string remark = 7;//备注
   int64 interceptLimit = 8;//关键词截取长度
-  string interceptOtherWords= 9;//关键词截取剩余关键词
-  string interceptKeyWords= 10;//关键词截取后的关键词
+  string interceptOtherWords = 9;//关键词截取剩余关键词
+  string interceptKeyWords = 10;//关键词截取后的关键词
 }
 
 message  SearchList {
@@ -129,9 +129,341 @@ message SearchLimitResp {
   string err_msg = 2;
   string data = 3;
 }
+// 列表数据参标信息请求参数
+message ParticipateShowReq{
+  string ids = 1; // 标讯id  逗号分割
+  int64  entId = 2;//企业id
+  int64  entUserId = 3;// 企业下用户id
+  int64  positionId = 4; // 职位id
+  int64  positionType =5;// 职位类型 0个人 1企业
+  string mgoUserId = 6;  //原userId
+  string appId = 7;//剑鱼默认10000
+  string userId = 8;//用户id
+  int64 newUserId = 9;//base_user_id 新用户id
+  int64 accountId = 10; //账户id
+  int64 entAccountId = 11;//企业账户id
+  string phone = 12 ;// 手机号
+}
+
+// 列表数据参标信息返回值
+message ShowInfo{
+  string id = 1;// 标讯id
+  int64 value = 2; // 按钮显示值:0-参标   1- 已参标
+}
+message ParticipateShowRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  repeated ShowInfo data = 3;
+}
+// 详情页参标信息请求参数
+message ParticipateInfoReq{
+  string sid = 1; // 标讯id
+  int64  entId = 2;//企业id
+  int64  entUserId = 3;// 企业下用户id
+  int64  positionId = 4;// 职位id
+  int64  positionType =5;// 职位类型 0个人 1企业
+  string mgoUserId = 6;  //原userId
+  string appId = 7;//剑鱼默认10000
+  string userId = 8;//用户id
+  int64 newUserId = 9;//base_user_id 新用户id
+  int64 accountId = 10; //账户id
+  int64 entAccountId = 11;//企业账户id
+  string phone = 12 ;// 手机号
+
+}
+// 详情页参标信息返回值
+message ParticipateDetailInfo{
+  bool showParticipate = 1;// 是否显示参标按钮  true-显示  false-不显示
+  bool showStopParticipate = 2;//
+  bool showTransfer = 3;// 转给同事按钮是否展示:true-展示 false-不展示
+  string userName = 4;//参标人姓名 逗号分割
+  string projectId = 5;// 项目id
+  int64 bidEndTime = 6 ;// 投标截止时间
+  int64 currentTime = 7 ;// 服务器当前时间
+  bool  showUpdate   = 8;// 当前用户能否更新  true 显示更新模块
+
+}
+message ParticipateInfoRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  ParticipateDetailInfo data = 3;
+}
+// 投标状态更新请求参数
+message UpdateBidStatusReq{
+  int64  bidType = 1; // 投标类型 1-直接投标 2-渠道投标
+  repeated string bidStage = 2;// 投标项目阶段 ["未报名","已报名"...]
+  int64 isWin = 3;// 是否中标 0-未选择 1-是 2-否
+  string channelName = 4; // 渠道名称
+  string channelPerson = 5; // 联系人
+  string channelPhone = 6; //联系电话
+  string winner = 7;// 中标单位
+  string sid = 8;// 标讯id
+  int64  entId = 9;//企业id
+  int64  entUserId = 10;// 企业下用户id
+  int64  positionId = 11; // 职位id
+  int64  positionType =12;// 职位类型 0个人 1企业
+  string mgoUserId = 13;  //原userId
+  string appId = 14;//剑鱼默认10000
+  string  userId = 15;//用户id
+  int64  newUserId = 16;//base_user_id 新用户id
+  int64 accountId = 17; //账户id
+  int64 entAccountId = 18;//企业账户id
+  string phone = 19 ;// 手机号
+
+}
+// 投标状态更新返回值
+message UpdateBidStatusRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  bool data = 3;
+}
+
+// 获取投标状态信息
+message ParticipateContentReq{
+  string sid = 1; // 标讯id
+  int64  entId = 2; //企业id
+  int64  entUserId = 3; // 企业下用户id
+  int64  positionId = 4; // 职位id
+  int64  positionType =5;// 职位类型 0个人 1企业
+  string mgoUserId = 6;  //原userId
+  string appId = 7;//剑鱼默认10000
+  string  userId = 8;//用户id
+  int64  newUserId = 9;//base_user_id 新用户id
+  int64 accountId = 10; //账户id
+  int64 entAccountId = 11;//企业账户id
+  string phone = 12 ;// 手机号
+
+}
+
+// 获取投标状态信息结果
+message ParticipateContentData{
+  int64  bidType = 1; // 投标类型 1-直接投标 2-渠道投标
+  repeated string bidStage = 2;// 投标项目阶段 ["未报名","已报名"...]
+  int64 isWin = 3;// 是否中标 0-未选择 1-是 2-否
+  string channelName = 4; // 渠道名称
+  string channelPerson = 5; // 联系人
+  string channelPhone = 6; //联系电话
+  string winner = 7;// 中标单位
+}
+
+message ParticipateContentRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  ParticipateContentData data = 3;
+}
+// 参标操作记录请求参数
+message ParticipateRecordsReq{
+  int64  page = 1;// 页码
+  int64  pageSize = 2;// 每页条数
+  string sid = 3; // 标讯id
+  int64  entId = 4; //企业id
+  int64  entUserId = 5; // 企业下用户id
+  int64  positionId = 6; // 职位id
+  int64  positionType =7;// 职位类型 0个人 1企业
+  string mgoUserId = 8;  //原userId
+  string appId = 9;//剑鱼默认10000
+  string  userId = 10;//用户id
+  int64  newUserId = 11;//base_user_id 新用户id
+  int64  accountId = 12; //账户id
+  int64 entAccountId = 13;//企业账户id
+  string phone = 14 ;// 手机号
+
+}
+// 参标操作记录返回
+message ParticipateRecords{
+  string recordsData = 1; // 操作记录
+  string updateDate = 2;  // 更新时间
+  string updatePerson = 3; // 更新人
+  int64  recordType = 4;  // 操作记录类型 默认0:参标、划转、取消参标;1:投标状态更新存储
+}
+message ParticipateRecordsData {
+  repeated ParticipateRecords list = 1; // 操作记录
+  int64 total = 2 ;
+}
+message ParticipateRecordsRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  ParticipateRecordsData data = 3;
+}
+// 当前部门/企业下参标人员信息
+message ParticipatePersonsReq{
+  int64  entId = 1; //企业id
+  int64  entUserId = 2; // 企业下用户id
+  int64  positionId = 3; // 职位id
+  int64  positionType =4;// 职位类型 0个人 1企业
+  string mgoUserId = 5;  //原userId
+  string appId = 6;//剑鱼默认10000
+  string  userId = 7;//用户id
+  int64  newUserId = 8;//base_user_id 新用户id
+  int64 accountId = 9; //账户id
+  string projectId = 10; //项目id  移动端需要
+  int64 entAccountId = 11;//企业账户id
+  string phone = 12 ;// 手机号
+
+}
+
+message ParticipatePerson{
+  string id = 1;
+  string name = 2;//项目名称
+  int64  pid = 3;//父级id
+  int64  power = 4;//是否有权限
+  string phone = 5;//手机号
+  string role = 6;//角色
+  int64  isPart = 7;//当前项目是否参标
+  repeated ParticipatePerson users = 8;//人员
+}
+
+message ParticipatePersonsRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  repeated ParticipatePerson data = 3;
+}
+//
+message ParticipateSetUpInfoReq{
+  int64  entId = 1; //企业id
+  int64  entUserId = 2; // 企业下用户id
+  int64  positionId = 3; // 职位id
+  int64  positionType =4;// 职位类型 0个人 1企业
+  string mgoUserId = 5;  //原userId
+  string appId = 6;//剑鱼默认10000
+  string  userId = 7;//用户id
+  int64  newUserId = 8;//base_user_id 新用户id
+  int64 accountId = 9; //账户id
+  string  setAction = 10;//请求动作:U:更新,默认空
+  string  isAllow = 11;//是否允许多人参标
+  repeated BidTypeReq bidType = 12;
+  repeated RemindRuleReq remindRule = 13;
+  string  necessaryField = 14;//必填字段
+  int64 entAccountId = 15;//企业账户id
+  string phone = 16 ;// 手机号
+
+}
+
+message  BidTypeReq{
+  string name = 1;//直接投标;渠道投标
+  repeated string content = 2;//投标项目阶段内容
+}
+//消息提醒设置:
+message  RemindRuleReq{
+  string bidState = 1; //投标规则类型;0:直接投标;1:渠道投标;
+  int64 remainder = 2;//距离投标截止日期需要多久开始提醒 单位h
+  string node = 3;//那个节点进行消息提醒;和投标项目阶段绑定
+}
+//设置信息内容
+message ParticipateSetUpInfo{
+  int64  isAllow = 1;//是否允许多人参标  默认0 开启是1
+  repeated BidTypeReq bidType = 2;
+  repeated RemindRuleReq remindRule = 3;
+  string necessaryField = 4;//必填字段
+  int64 isShow = 5;//是否有权限展示 默认是-1;企业管理员有权限展示:1
+}
+//设置信息范围内容
+message ParticipateSetUpInfoRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  ParticipateSetUpInfo data = 3;
+}
+//
+message ParticipateActionReq{
+  int64  entId = 1; //企业id
+  int64  entUserId = 2; // 企业下用户id
+  int64  positionId = 3; // 职位id
+  int64  positionType =4;// 职位类型 0个人 1企业
+  string mgoUserId = 5;  //原userId
+  string appId = 6;//剑鱼默认10000
+  string  userId = 7;//用户id
+  int64  newUserId = 8;//base_user_id 新用户id
+  int64 accountId = 9; //账户id
+  string  bidIds = 10;//招标信息id
+  string  toEntUserId = 11;//划转对象的企业用户id
+  bool isRetain = 12;//是否保留原跟踪人
+  string actionType = 13;//in:参标;out:终止参标;transfer:划转
+  string projectIds = 14;//项目ids 多个,号隔开
+  int64 entAccountId = 15;//企业账户id
+  string phone = 16 ;// 手机号
+
+}
+//
+message ParticipateActionRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  bool data = 3;
+}
+message ParticipateListReq{
+  int64 entId = 1; //企业id
+  int64 entUserId = 2; // 企业下用户id
+  int64 positionId = 3; // 职位id
+  int64 positionType =4;// 职位类型 0个人 1企业
+  string identity = 5;//我的:mine;企业:ent
+  string area = 6; //省份
+  string city = 7; //城市
+  string bidTime = 8;//招标日期:开始时间-结束时间
+  string bidEndTime = 9;//投标截止日期:格式同上
+  string bidOpenTime = 10;//开标时间:格式同上
+  int64 bidEndStatus = 11;//投标截止状态:1:未截止;2:已截止;3:终止参标
+  int64 bidOpenStatus = 12;//开标状态:1:已开标;2:未开标
+  string keywords = 13;//查询项目名称 关键词;多个空格隔开
+  string entUserIds = 14;//企业参标人企业用户id集合,多个,号隔开
+  int64 pageSize = 15;//每页数据量
+  int64 pageNum =16;//当前页码
+  string mgoUserId = 17;  //原userId
+  string appId = 18;//剑鱼默认10000
+  string  userId = 19;//用户id
+  int64  newUserId = 20;//base_user_id 新用户id
+  int64 accountId = 21; //账户id
+  int64 orderNum = 22;//排序:0:投标截止日期正序、1:开标时间正序、2:更新状态时间倒叙
+  int64 entAccountId = 23;//企业账户id
+  string phone = 24 ;// 手机号
+
+}
+//参标列表
+message  ParticipateList{
+  string id = 1;//项目id
+  string projectName = 2;//项目名称
+  string buyer = 3;//采购单位
+  string budget = 4;//预算
+  string participants = 5;//参标人 多个,号隔开
+  int64 bidTime = 6;//招标日期
+  int64 bidEndTime = 7;//投标截止日期
+  int64 bidOpenTime = 8;//投标截止日期
+  int64 updateStatusTime = 9;//更新状态时间
+  string updateStatusCon = 10;//投标状态更新
+  int64 state = 11;//当前项目 针对 当前企业是否是终止参标状态;默认0:正在参标;-1:终止参标
+  bool beTransferred = 12;//当前项目是否能划转 默认false
+}
+message  ParticipateData{
+  int64 nowTime = 1;//当前系统时间
+  bool isAllow = 2;//是否允许多人参标
+  int64 count = 3;
+  repeated ParticipateList list = 4;
+}
+message ParticipateListRes{
+  int64 err_code = 1;
+  string err_msg = 2;
+  ParticipateData data = 3;
+}
+//
 service BxCore {
   //标讯搜索结果列表数据
   rpc GetSearchList(SearchReq) returns(SearchResp);
   //标讯搜索限制内容
   rpc SearchLimit(SearchLimitReq) returns(SearchLimitResp);
+  // 列表数据参标信息接口
+  rpc ParticipateShow(ParticipateShowReq) returns(ParticipateShowRes);
+  // 详情页参标信息接口
+  rpc ParticipateInfo(ParticipateInfoReq) returns(ParticipateInfoRes);
+  //  投标状态更新
+  rpc UpdateBidStatus(UpdateBidStatusReq) returns(UpdateBidStatusRes);
+  // 获取投标状态信息
+  rpc ParticipateContent(ParticipateContentReq) returns(ParticipateContentRes);
+  // 参标操作记录
+  rpc ParticipateRecords(ParticipateRecordsReq) returns (ParticipateRecordsRes);
+  // 当前部门/企业下参标人员信息
+  rpc ParticipatePersons(ParticipatePersonsReq) returns (ParticipatePersonsRes);
+  // 参标设置信息
+  rpc ParticipateSetUpInfo(ParticipateSetUpInfoReq) returns (ParticipateSetUpInfoRes);
+  // 项目参标 终止参标 划转等动作
+  rpc ParticipateAction(ParticipateActionReq) returns (ParticipateActionRes);
+  // 我的参标项目列表|企业参标项目列表
+  rpc ParticipateList(ParticipateListReq) returns (ParticipateListRes);
 }

+ 109 - 8
jyBXCore/rpc/bxcore/bxcore.go

@@ -13,20 +13,67 @@ import (
 )
 
 type (
-	PInfo           = bxcore.PInfo
-	SearchData      = bxcore.SearchData
-	SearchLimitReq  = bxcore.SearchLimitReq
-	SearchLimitResp = bxcore.SearchLimitResp
-	SearchList      = bxcore.SearchList
-	SearchReq       = bxcore.SearchReq
-	SearchResp      = bxcore.SearchResp
-	WinnerInfo      = bxcore.WinnerInfo
+	BidTypeReq              = bxcore.BidTypeReq
+	PInfo                   = bxcore.PInfo
+	ParticipateActionReq    = bxcore.ParticipateActionReq
+	ParticipateActionRes    = bxcore.ParticipateActionRes
+	ParticipateContentData  = bxcore.ParticipateContentData
+	ParticipateContentReq   = bxcore.ParticipateContentReq
+	ParticipateContentRes   = bxcore.ParticipateContentRes
+	ParticipateData         = bxcore.ParticipateData
+	ParticipateDetailInfo   = bxcore.ParticipateDetailInfo
+	ParticipateInfoReq      = bxcore.ParticipateInfoReq
+	ParticipateInfoRes      = bxcore.ParticipateInfoRes
+	ParticipateList         = bxcore.ParticipateList
+	ParticipateListReq      = bxcore.ParticipateListReq
+	ParticipateListRes      = bxcore.ParticipateListRes
+	ParticipatePerson       = bxcore.ParticipatePerson
+	ParticipatePersonsReq   = bxcore.ParticipatePersonsReq
+	ParticipatePersonsRes   = bxcore.ParticipatePersonsRes
+	ParticipateRecords      = bxcore.ParticipateRecords
+	ParticipateRecordsData  = bxcore.ParticipateRecordsData
+	ParticipateRecordsReq   = bxcore.ParticipateRecordsReq
+	ParticipateRecordsRes   = bxcore.ParticipateRecordsRes
+	ParticipateSetUpInfo    = bxcore.ParticipateSetUpInfo
+	ParticipateSetUpInfoReq = bxcore.ParticipateSetUpInfoReq
+	ParticipateSetUpInfoRes = bxcore.ParticipateSetUpInfoRes
+	ParticipateShowReq      = bxcore.ParticipateShowReq
+	ParticipateShowRes      = bxcore.ParticipateShowRes
+	RemindRuleReq           = bxcore.RemindRuleReq
+	SearchData              = bxcore.SearchData
+	SearchLimitReq          = bxcore.SearchLimitReq
+	SearchLimitResp         = bxcore.SearchLimitResp
+	SearchList              = bxcore.SearchList
+	SearchReq               = bxcore.SearchReq
+	SearchResp              = bxcore.SearchResp
+	ShowInfo                = bxcore.ShowInfo
+	UpdateBidStatusReq      = bxcore.UpdateBidStatusReq
+	UpdateBidStatusRes      = bxcore.UpdateBidStatusRes
+	WinnerInfo              = bxcore.WinnerInfo
 
 	BxCore interface {
 		// 标讯搜索结果列表数据
 		GetSearchList(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
 		// 标讯搜索限制内容
 		SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error)
+		//  列表数据参标信息接口
+		ParticipateShow(ctx context.Context, in *ParticipateShowReq, opts ...grpc.CallOption) (*ParticipateShowRes, error)
+		//  详情页参标信息接口
+		ParticipateInfo(ctx context.Context, in *ParticipateInfoReq, opts ...grpc.CallOption) (*ParticipateInfoRes, error)
+		//   投标状态更新
+		UpdateBidStatus(ctx context.Context, in *UpdateBidStatusReq, opts ...grpc.CallOption) (*UpdateBidStatusRes, error)
+		//  获取投标状态信息
+		ParticipateContent(ctx context.Context, in *ParticipateContentReq, opts ...grpc.CallOption) (*ParticipateContentRes, error)
+		//  参标操作记录
+		ParticipateRecords(ctx context.Context, in *ParticipateRecordsReq, opts ...grpc.CallOption) (*ParticipateRecordsRes, error)
+		//  当前部门/企业下参标人员信息
+		ParticipatePersons(ctx context.Context, in *ParticipatePersonsReq, opts ...grpc.CallOption) (*ParticipatePersonsRes, error)
+		//  参标设置信息
+		ParticipateSetUpInfo(ctx context.Context, in *ParticipateSetUpInfoReq, opts ...grpc.CallOption) (*ParticipateSetUpInfoRes, error)
+		//  项目参标 终止参标 划转等动作
+		ParticipateAction(ctx context.Context, in *ParticipateActionReq, opts ...grpc.CallOption) (*ParticipateActionRes, error)
+		//  我的参标项目列表|企业参标项目列表
+		ParticipateList(ctx context.Context, in *ParticipateListReq, opts ...grpc.CallOption) (*ParticipateListRes, error)
 	}
 
 	defaultBxCore struct {
@@ -51,3 +98,57 @@ func (m *defaultBxCore) SearchLimit(ctx context.Context, in *SearchLimitReq, opt
 	client := bxcore.NewBxCoreClient(m.cli.Conn())
 	return client.SearchLimit(ctx, in, opts...)
 }
+
+//  列表数据参标信息接口
+func (m *defaultBxCore) ParticipateShow(ctx context.Context, in *ParticipateShowReq, opts ...grpc.CallOption) (*ParticipateShowRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateShow(ctx, in, opts...)
+}
+
+//  详情页参标信息接口
+func (m *defaultBxCore) ParticipateInfo(ctx context.Context, in *ParticipateInfoReq, opts ...grpc.CallOption) (*ParticipateInfoRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateInfo(ctx, in, opts...)
+}
+
+//   投标状态更新
+func (m *defaultBxCore) UpdateBidStatus(ctx context.Context, in *UpdateBidStatusReq, opts ...grpc.CallOption) (*UpdateBidStatusRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.UpdateBidStatus(ctx, in, opts...)
+}
+
+//  获取投标状态信息
+func (m *defaultBxCore) ParticipateContent(ctx context.Context, in *ParticipateContentReq, opts ...grpc.CallOption) (*ParticipateContentRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateContent(ctx, in, opts...)
+}
+
+//  参标操作记录
+func (m *defaultBxCore) ParticipateRecords(ctx context.Context, in *ParticipateRecordsReq, opts ...grpc.CallOption) (*ParticipateRecordsRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateRecords(ctx, in, opts...)
+}
+
+//  当前部门/企业下参标人员信息
+func (m *defaultBxCore) ParticipatePersons(ctx context.Context, in *ParticipatePersonsReq, opts ...grpc.CallOption) (*ParticipatePersonsRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipatePersons(ctx, in, opts...)
+}
+
+//  参标设置信息
+func (m *defaultBxCore) ParticipateSetUpInfo(ctx context.Context, in *ParticipateSetUpInfoReq, opts ...grpc.CallOption) (*ParticipateSetUpInfoRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateSetUpInfo(ctx, in, opts...)
+}
+
+//  项目参标 终止参标 划转等动作
+func (m *defaultBxCore) ParticipateAction(ctx context.Context, in *ParticipateActionReq, opts ...grpc.CallOption) (*ParticipateActionRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateAction(ctx, in, opts...)
+}
+
+//  我的参标项目列表|企业参标项目列表
+func (m *defaultBxCore) ParticipateList(ctx context.Context, in *ParticipateListReq, opts ...grpc.CallOption) (*ParticipateListRes, error) {
+	client := bxcore.NewBxCoreClient(m.cli.Conn())
+	return client.ParticipateList(ctx, in, opts...)
+}

+ 9 - 21
jyBXCore/rpc/entity/search.go

@@ -5,11 +5,10 @@ import (
 	"app.yhyue.com/moapp/jybase/redis"
 	"encoding/json"
 	"fmt"
-	"github.com/zeromicro/go-zero/core/logx"
-	"jyBXCore/entity"
-	"jyBXCore/rpc/bxcore"
+	"log"
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/type/bxcore"
 	"jyBXCore/rpc/util"
 	"strconv"
 	"strings"
@@ -48,14 +47,14 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 		//缓存数据: SearchGroup-全部;招标信息;超前项目信息;kws.PageNum-当前页 免费用户 or 付费用户
 		redisDataKey := fmt.Sprintf(SearchCacheKey, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string), in.Platform)
 		sCache, err := redis.GetNewBytes(util.RedisNameNew, redisDataKey)
-		logx.Info("-------------------------redisDataKey--------------------------------:", redisDataKey)
+		log.Println("-------------------------redisDataKey--------------------------------:", redisDataKey)
 		if err == nil {
 			if sCache != nil && len(*sCache) > 0 {
 				err = json.Unmarshal(*sCache, &list)
 				if err == nil {
 					return
 				} else {
-					logx.Info("缓存序列化异常")
+					log.Println("缓存序列化异常")
 				}
 			}
 		}
@@ -71,10 +70,10 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 			if err == nil {
 				redis.PutBytes(util.RedisNameNew, redisDataKey, &b, MC.If(IC.C.DefaultSearchCacheTime > 0, IC.C.DefaultSearchCacheTime*60*60, 24*60*60).(int))
 			} else {
-				logx.Info("默认搜索查询结果保存redis缓存异常")
+				log.Println("默认搜索查询结果保存redis缓存异常")
 			}
 		} else {
-			logx.Info("默认搜索 暂无数据")
+			log.Println("默认搜索 暂无数据")
 		}
 		return
 	}(in)
@@ -114,7 +113,7 @@ func (kws *KeyWordsSearch) SaveKeyWordsToHistory(in *bxcore.SearchReq) {
 		keys := util.SearchHistory(history, in.KeyWords, in.AdditionalWords)
 		if len(keys) > 0 {
 			if b := redis.Put("other", "s_"+in.UserId, strings.Join(keys, ","), -1); !b {
-				logx.Info("保存搜索记录异常,用户id:", in.UserId)
+				log.Println("保存搜索记录异常,用户id:", in.UserId)
 			}
 		}
 	}
@@ -162,26 +161,15 @@ func (kws *KeyWordsSearch) SearchParamsHandle(in *bxcore.SearchReq) []string {
 	accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
 	positionType, _ := strconv.ParseInt(in.PositionType, 10, 64)
 	positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
-	userInfoRpc := entity.UserInfoRpc{
-		AppId:        in.AppId,
-		UserId:       in.UserId,
-		BaseUserId:   baseUserId,
-		EntId:        in.EntId,
-		EntUserId:    in.EntUserId,
-		AccountId:    accountId,
-		PositionType: positionType,
-		PositionId:   positionId,
-		MgoUserId:    in.MgoUserId,
-	}
 	//判断用户身份
-	userInfo := userInfoRpc.GetUserPowers()
+	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, baseUserId, accountId, in.EntId, positionType, positionId)
 	//是否是付费用户
 	in.IsPay = !userInfo.Free.IsFree
 	//默认搜索范围
 	if in.SelectType == "" {
 		in.SelectType = "title,content"
 	}
-	queryItems := userInfoRpc.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit, userInfo.Free.Registedate, in.IsPay)
+	queryItems := util.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit, userInfo.Free.Registedate, in.IsPay)
 	in.SelectType = strings.Join(queryItems, ",")
 	// in.SearchGroup 搜索分组 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
 	//	详情页判断是否能使用超前项目  老版超级订阅、大会员、商机管理有权限

+ 6 - 3
jyBXCore/rpc/etc/bxcore.yaml

@@ -42,8 +42,11 @@ DefaultTopTypes:
   - 拟建,采购意向
 JYKeyMark: " "
 ContextOldVipLimit: 1664553600
-PowersEtcdConf:
+Middleground:
   Etcd:
     Hosts:
-      - 192.168.3.206:2379
-    Key: powercheck.rpc
+      - 192.168.3.149:2379
+  PowerCheckCenterKey: powercheck.rpc #权益校验中台
+  UserCenterKey: usercenter.rpc #用户中台rpc
+  ResourceCenterKey: resource.rpc #资源中台rpc
+ResourceCode: "cb_zy_code"

+ 11 - 4
jyBXCore/rpc/etc/db.yaml

@@ -1,17 +1,24 @@
 mysql:
     main:
         dbName: jianyu
-        address: 192.168.3.11:3366
+        address: 192.168.3.149:3306
         userName: root
         password: Topnet123
         maxOpenConns: 5
         maxIdleConns: 5
+    base:
+        dbName: base_service
+        address: 192.168.3.217:4000
+        userName: root
+        password: =PDT49#80Z!RVv52_z
+        maxOpenConns: 5
+        maxIdleConns: 5
 redis:
     addr:
-        - other=192.168.3.206:1712
-        - newother=192.168.3.206:1712
+        - other=192.168.3.149:1712
+        - newother=192.168.3.149:1712
 es:
-    addr: http://192.168.3.206:9800
+    addr: http://192.168.3.242:9100
     size: 50
     version: v7
     userName: ""

+ 21 - 13
jyBXCore/rpc/init/db.go

@@ -4,11 +4,9 @@
 package init
 
 import (
-	"strings"
-
-	"github.com/zeromicro/go-zero/core/logx"
-
 	"jyBXCore/entity"
+	"log"
+	"strings"
 
 	. "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/mongodb"
@@ -18,15 +16,15 @@ import (
 
 var (
 	MainMysql  *mysql.Mysql
+	BaseMysql  *mysql.Mysql
 	Mgo        mongodb.MongodbSim
 	MgoBidding mongodb.MongodbSim //标讯详情等(第一版没用)
 )
 
-//
 func MongoDBInit(em *entity.Mongo) {
 	//初始化 mongodb
 	if em.Main.Address != "" {
-		logx.Info("--初始化 mongodb--")
+		log.Println("--初始化 mongodb--")
 		Mgo = mongodb.MongodbSim{
 			MongodbAddr: em.Main.Address,
 			Size:        em.Main.Size,
@@ -36,7 +34,7 @@ func MongoDBInit(em *entity.Mongo) {
 	}
 	//
 	if em.Bidding.Address != "" {
-		logx.Info("--初始化 mongodb bidding--")
+		log.Println("--初始化 mongodb bidding--")
 		MgoBidding = mongodb.MongodbSim{
 			MongodbAddr: em.Bidding.Address,
 			Size:        em.Bidding.Size,
@@ -48,11 +46,10 @@ func MongoDBInit(em *entity.Mongo) {
 	}
 }
 
-//
 func MysqlInit(mm *entity.Mysql) {
 	//初始化 mysql-main
 	if mm.Main.Address != "" {
-		logx.Info("--初始化 mysql--")
+		log.Println("--初始化 mysql--")
 		MainMysql = &mysql.Mysql{
 			Address:      mm.Main.Address,
 			UserName:     mm.Main.UserName,
@@ -63,22 +60,33 @@ func MysqlInit(mm *entity.Mysql) {
 		}
 		MainMysql.Init()
 	}
+	//初始化 mysql-base
+	if mm.Base.Address != "" {
+		log.Println("--初始化 tidb--")
+		BaseMysql = &mysql.Mysql{
+			Address:      mm.Base.Address,
+			UserName:     mm.Base.UserName,
+			PassWord:     mm.Base.Password,
+			DBName:       mm.Base.DbName,
+			MaxOpenConns: mm.Base.MaxOpenConns,
+			MaxIdleConns: mm.Base.MaxIdleConns,
+		}
+		BaseMysql.Init()
+	}
 }
 
-//
 func RedisInit(rm *entity.RedisStuct) {
 	//初始化 redis
 	if len(rm.Addr) > 0 {
-		logx.Info("--初始化 redis--")
+		log.Println("--初始化 redis--")
 		redis.InitRedisBySize(strings.Join(rm.Addr, ","), 100, 30, 300)
 	}
 }
 
-//
 func EsInit(es *entity.EsStruct) {
 	//初始化 elasticsearch
 	if es.Addr != "" {
-		logx.Info("--初始化 elasticsearch--")
+		log.Println("--初始化 elasticsearch--")
 		NewEs(es.Version, es.Addr, es.Size, es.UserName, es.Password)
 	}
 }

+ 19 - 23
jyBXCore/rpc/init/init.go

@@ -1,27 +1,26 @@
 package init
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/powercheck"
 	"flag"
 	"fmt"
-	_ "github.com/go-sql-driver/mysql"
-	"github.com/zeromicro/go-zero/core/conf"
-	"github.com/zeromicro/go-zero/core/discov"
-	"github.com/zeromicro/go-zero/zrpc"
 	"jyBXCore/entity"
 	"jyBXCore/rpc/internal/config"
-)
-
-var configFile = flag.String("cf", "etc/bxcore.yaml", "the config file")
-var C config.Config
-var err error
 
-var dbFile = flag.String("df", "etc/db.yaml", "the db file")
-var DB config.Db
+	"app.yhyue.com/moapp/jypkg/middleground"
+	_ "github.com/go-sql-driver/mysql"
+	"github.com/zeromicro/go-zero/core/conf"
+)
 
-// 全文或附件搜索限制
-var SearchLimitKey = "jy_limitSearchText_new"
-var SearchLimitFlag = "jy_limitSearchText_%s"
+var (
+	configFile     = flag.String("cf", "etc/bxcore.yaml", "the config file")
+	C              config.Config
+	dbFile         = flag.String("df", "etc/db.yaml", "the db file")
+	DB             config.Db
+	logFile        = flag.String("lf", "etc/logs.yaml", "the logs file")
+	logc           entity.Logc
+	SearchLimitKey = "jy_limitSearchText_new" // 全文或附件搜索限制
+	Middleground   *middleground.Middleground
+)
 
 func init() {
 	//基本配置
@@ -41,12 +40,9 @@ func init() {
 	LabelInit()
 	//
 	SearchLimitKey = fmt.Sprintf(C.LimitSearchText.LimitKey, "jy_limitSearchText")
-	//初始化权益中台相关
-	powersClient := zrpc.MustNewClient(zrpc.RpcClientConf{
-		Etcd: discov.EtcdConf{
-			Hosts: C.PowersEtcdConf.Etcd.Hosts,
-			Key:   C.PowersEtcdConf.Etcd.Key,
-		},
-	})
-	entity.PowerCheck = powercheck.NewPowerCheck(powersClient)
+	//初始化中台相关
+	Middleground = middleground.NewMiddleground(C.Middleground.Etcd.Hosts).
+		RegUserCenter(C.Middleground.UserCenterKey).
+		RegPowerCheckCenter(C.Middleground.PowerCheckCenterKey).
+		RegResourceCenter(C.Middleground.ResourceCenterKey)
 }

+ 12 - 4
jyBXCore/rpc/internal/config/config.go

@@ -41,10 +41,18 @@ type Config struct {
 		Count    int
 		PayCount int
 	} //招标信息初始化
-	DefaultTopTypes    []string           //信息类型初始值
-	JYKeyMark          string             //关键词分组标识
-	ContextOldVipLimit int64              //老版超级订阅 超前项目权限
-	PowersEtcdConf     zrpc.RpcClientConf //权益中台
+	DefaultTopTypes    []string //信息类型初始值
+	JYKeyMark          string   //关键词分组标识
+	ContextOldVipLimit int64    //老版超级订阅 超前项目权限
+	Middleground       struct { //中台
+		Etcd struct {
+			Hosts []string
+		}
+		PowerCheckCenterKey string
+		UserCenterKey       string
+		ResourceCenterKey   string
+	}
+	ResourceCode string
 }
 
 type Db struct {

+ 5 - 4
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -9,10 +9,11 @@ import (
 	"strings"
 	"time"
 
+	"github.com/zeromicro/go-zero/core/logx"
 	"jyBXCore/rpc/internal/svc"
 	"jyBXCore/rpc/type/bxcore"
 
-	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 )
 
 type GetSearchListLogic struct {
@@ -81,20 +82,20 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 		if b := util.IsOptimize(IC.C, in); b {
 			t1 := time.Now()
 			res.Count, res.Total, res.List = ks.GetBidSearchList(in) // util.GetBidSearchData(in)
-			logx.Info("1查询耗时:", time.Since(t1))
+			log.Println("1查询耗时:", time.Since(t1))
 		}
 		//如果优化查询数据量太少,和配置数据量作比较,不够的话走原始查询
 		if res.Count < IC.C.PaySearchLimit.PageSize {
 			t2 := time.Now()
 			in.PublishTime = publishTime
 			res.Count, res.Total, res.List = ks.GetBidSearchList(in) //util.GetBidSearchData(in)
-			logx.Info("2查询耗时:", time.Since(t2))
+			log.Println("2查询耗时:", time.Since(t2))
 		}
 		res.KeyWords = strings.Join(heightWords, " ")
 		res.InterceptOtherWords = in.InterceptOtherWords
 		res.InterceptKeyWords = in.InterceptKeyWords
 	}
-	logx.Info("关键词 -全部- 查询耗时:", time.Since(t).Seconds())
+	log.Println("关键词 -全部- 查询耗时:", time.Since(t).Seconds())
 	return &bxcore.SearchResp{
 		Data:    res,
 		ErrMsg:  "",

+ 41 - 0
jyBXCore/rpc/internal/logic/participateactionlogic.go

@@ -0,0 +1,41 @@
+package logic
+
+import (
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+)
+
+type ParticipateActionLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateActionLogic {
+	return &ParticipateActionLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 项目参标 终止参标 划转等动作 in:参标;out:终止参标;transfer:划转
+func (l *ParticipateActionLogic) ParticipateAction(in *bxcore.ParticipateActionReq) (*bxcore.ParticipateActionRes, error) {
+	var res = &bxcore.ParticipateActionRes{
+		Data: true,
+	}
+	if msg := util.IsAllowedAccess(in.ActionType); msg != "" {
+		res.ErrCode = -1
+		res.ErrMsg = msg
+		res.Data = false
+	} else if err := service.ParticipateDo(in); err != nil {
+		res.ErrCode = -1
+		res.ErrMsg = err.Error()
+		res.Data = false
+	}
+	return res, nil
+}

+ 71 - 0
jyBXCore/rpc/internal/logic/participatecontentlogic.go

@@ -0,0 +1,71 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/util"
+
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateContentLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateContentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateContentLogic {
+	return &ParticipateContentLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 获取投标状态信息
+func (l *ParticipateContentLogic) ParticipateContent(in *bxcore.ParticipateContentReq) (*bxcore.ParticipateContentRes, error) {
+	// 验证权限
+	result := &bxcore.ParticipateContentRes{}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		result.ErrMsg = "暂无权限"
+		return result, nil
+	}
+	participateService := service.NewParticipateBid(in.EntId, in.EntUserId, in.PositionType, in.PositionId)
+	participateService.EntRoleId = entRoleId
+	// 信息id解密
+	infoList, _ := service.DecodeId(in.Sid)
+	if len(infoList) == 0 {
+		result.ErrCode = -1
+		result.ErrMsg = "信息id无效"
+		return result, nil
+	}
+	// 根据标讯id 查询项目信息
+	projectInfos := es.GetProjectByInfoId(infoList)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		return result, nil
+	}
+	// 验证身份
+	projectId := common.ObjToString((*projectInfos)[0]["_id"])
+	if !participateService.CheckBidPower(projectId, false) {
+		result.ErrMsg = "没有查看权限"
+		return result, nil
+	}
+	//  查询
+	data, err := participateService.GetLastBidStatus(projectId)
+	if err == nil {
+		formatData := participateService.ParticipateContentFormat(data)
+		return &bxcore.ParticipateContentRes{
+			Data: &formatData,
+		}, nil
+	}
+	return &bxcore.ParticipateContentRes{
+		ErrCode: 0,
+		ErrMsg:  err.Error(),
+	}, nil
+}

+ 84 - 0
jyBXCore/rpc/internal/logic/participateinfologic.go

@@ -0,0 +1,84 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"context"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/model/mysql"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/util"
+	"time"
+
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateInfoLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateInfoLogic {
+	return &ParticipateInfoLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 详情页参标信息接口
+func (l *ParticipateInfoLogic) ParticipateInfo(in *bxcore.ParticipateInfoReq) (*bxcore.ParticipateInfoRes, error) {
+	format := &bxcore.ParticipateDetailInfo{}
+	result := bxcore.ParticipateInfoRes{
+		Data: format,
+	}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		result.ErrMsg = "暂无权限"
+		return &result, nil
+	}
+	participateService := service.NewParticipateBid(in.EntId, in.EntUserId, in.PositionType, in.PositionId)
+	participateService.EntRoleId = entRoleId
+	// 信息id解密
+	infoList, infoSet := service.DecodeId(in.Sid)
+	if len(infoList) == 0 {
+		result.ErrCode = -1
+		result.ErrMsg = "信息id无效"
+		return &result, nil
+	}
+	// 2. 根据标讯id 查询项目信息
+	projectInfos := es.GetProjectByInfoId(infoList)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		result.ErrMsg = "未查到此项目信息"
+		return &result, nil
+	}
+	// 判断是否已经过了投标截止时间
+	isValid := true
+	bidendtime := common.Int64All((*projectInfos)[0]["bidendtime"])
+	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
+	now := time.Now().Unix()
+	if (now > bidopentime && bidopentime != 0) || (now > bidendtime && bidendtime != 0) {
+		isValid = false
+	}
+	//   获取项目id
+	_, projectIds := service.HandlerProjectId(*projectInfos, infoSet)
+	//区分个人和企业
+	var formatData *bxcore.ParticipateDetailInfo
+	switch int(in.PositionType) {
+	case service.PositionTypePersonal:
+		existList := participateService.PersonalExistProject(projectIds)
+		formatData = participateService.DetailPersonalFormat(existList, isValid, bidendtime)
+	case service.PositionTypeEnt:
+		isAllow := mysql.IsALLow(in.EntId)
+		existList := participateService.EntExistProject(projectIds)                              // 查询出已经存在的
+		formatData = participateService.DetailEntFormat(existList, isValid, isAllow, bidendtime) // 格式化数据
+	}
+	formatData.ProjectId = encrypt.EncodeArticleId2ByCheck(projectIds[0])
+	result.Data = formatData
+	return &result, nil
+
+}

+ 29 - 0
jyBXCore/rpc/internal/logic/participatelistlogic.go

@@ -0,0 +1,29 @@
+package logic
+
+import (
+	"context"
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateListLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateListLogic {
+	return &ParticipateListLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 我的参标项目列表|企业参标项目列表
+func (l *ParticipateListLogic) ParticipateList(in *bxcore.ParticipateListReq) (*bxcore.ParticipateListRes, error) {
+	return service.ParticipateList(in)
+}

+ 39 - 0
jyBXCore/rpc/internal/logic/participatepersonslogic.go

@@ -0,0 +1,39 @@
+package logic
+
+import (
+	"context"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/util"
+
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipatePersonsLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipatePersonsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipatePersonsLogic {
+	return &ParticipatePersonsLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 当前部门/企业下参标人员信息
+func (l *ParticipatePersonsLogic) ParticipatePersons(in *bxcore.ParticipatePersonsReq) (*bxcore.ParticipatePersonsRes, error) {
+	b, _ := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		return &bxcore.ParticipatePersonsRes{
+			ErrCode: -1,
+			ErrMsg:  "没有权限",
+			Data:    nil,
+		}, nil
+	}
+	return service.GetParticipatePersonInfo(in), nil
+}

+ 63 - 0
jyBXCore/rpc/internal/logic/participaterecordslogic.go

@@ -0,0 +1,63 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateRecordsLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateRecordsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateRecordsLogic {
+	return &ParticipateRecordsLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 参标操作记录
+func (l *ParticipateRecordsLogic) ParticipateRecords(in *bxcore.ParticipateRecordsReq) (*bxcore.ParticipateRecordsRes, error) {
+	// 验证权限
+	result := &bxcore.ParticipateRecordsRes{}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		result.ErrMsg = "没有权限"
+		return result, nil
+	}
+	participateService := service.NewParticipateBid(in.EntId, in.EntUserId, in.PositionType, in.PositionId)
+	participateService.EntRoleId = entRoleId
+	// 信息id解密
+	infoList, _ := service.DecodeId(in.Sid)
+	if len(infoList) == 0 {
+		result.ErrCode = -1
+		result.ErrMsg = "无效的信息id"
+		return result, nil
+	}
+	// 根据标讯id 查询项目信息
+	projectInfos := es.GetProjectByInfoId(infoList)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		return result, nil
+	}
+	// 验证身份
+	projectId := common.ObjToString((*projectInfos)[0]["_id"])
+	if !participateService.CheckBidPower(projectId, false) {
+		result.ErrMsg = "没有查看权限"
+		return result, nil
+	}
+	//  查询
+	data := participateService.GetBidRecords(projectId, in.Page, in.PageSize)
+	return &bxcore.ParticipateRecordsRes{
+		Data: data,
+	}, nil
+}

+ 38 - 0
jyBXCore/rpc/internal/logic/participatesetupinfologic.go

@@ -0,0 +1,38 @@
+package logic
+
+import (
+	"context"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/util"
+
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ParticipateSetUpInfoLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateSetUpInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateSetUpInfoLogic {
+	return &ParticipateSetUpInfoLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 参标设置信息
+func (l *ParticipateSetUpInfoLogic) ParticipateSetUpInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.ParticipateSetUpInfoRes, error) {
+	if msg := util.IsAllowedAccess("setup"); msg != "" {
+		return &bxcore.ParticipateSetUpInfoRes{
+			ErrCode: -1,
+			ErrMsg:  msg,
+			Data:    nil,
+		}, nil
+	}
+	return service.GetParticipateSetInfo(in)
+}

+ 68 - 0
jyBXCore/rpc/internal/logic/participateshowlogic.go

@@ -0,0 +1,68 @@
+package logic
+
+import (
+	"context"
+	"github.com/zeromicro/go-zero/core/logx"
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/model/mysql"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+)
+
+type ParticipateShowLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewParticipateShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ParticipateShowLogic {
+	return &ParticipateShowLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 列表数据参标信息接口
+func (l *ParticipateShowLogic) ParticipateShow(in *bxcore.ParticipateShowReq) (*bxcore.ParticipateShowRes, error) {
+	result := bxcore.ParticipateShowRes{
+		Data: []*bxcore.ShowInfo{},
+	}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		result.ErrMsg = "没有权限"
+		return &result, nil
+	}
+	participateService := service.NewParticipateBid(in.EntId, in.EntUserId, in.PositionType, in.PositionId)
+	participateService.EntRoleId = entRoleId
+	// 2. 根据标讯id 查询项目信息 拿到有效的项目id (无项目信息或者已经过开标时间  则不展示按钮  在开标时间内或者没有开标时间字段需要展示)
+	// 信息id解密
+	infoList, infoSet := service.DecodeId(in.Ids)
+	if len(infoList) == 0 {
+		result.ErrCode = -1
+		result.ErrMsg = "信息id无效"
+		return &result, nil
+	}
+	// 查有效项目id信息
+	projectInfos := es.GetValidProjectByInfoId(infoList)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		return &result, nil
+	}
+	// 记录信息id和项目id的映射  用于最后处理返回数据
+	infoM, projectIds := service.HandlerProjectId(*projectInfos, infoSet)
+	// 3. 查询参标信息 处理按钮 区分个人和企业
+	var formatList []*bxcore.ShowInfo
+	switch int(in.PositionType) {
+	case service.PositionTypePersonal:
+		existList := participateService.PersonalExistProject(projectIds)
+		formatList = participateService.ListPersonalFormat(existList, infoM)
+	case service.PositionTypeEnt:
+		isAllow := mysql.IsALLow(in.EntId)
+		existList := participateService.EntExistProject(projectIds)              // 查询出已经存在的
+		formatList = participateService.ListEntFormat(existList, infoM, isAllow) // 格式化数据
+	}
+	result.Data = formatList
+	return &result, nil
+}

+ 82 - 0
jyBXCore/rpc/internal/logic/updatebidstatuslogic.go

@@ -0,0 +1,82 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"context"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/service"
+	"jyBXCore/rpc/util"
+	"time"
+
+	"jyBXCore/rpc/internal/svc"
+	"jyBXCore/rpc/type/bxcore"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type UpdateBidStatusLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewUpdateBidStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateBidStatusLogic {
+	return &UpdateBidStatusLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+// 投标状态更新
+func (l *UpdateBidStatusLogic) UpdateBidStatus(in *bxcore.UpdateBidStatusReq) (*bxcore.UpdateBidStatusRes, error) {
+	result := &bxcore.UpdateBidStatusRes{
+		ErrCode: -1,
+	}
+	if msg := util.IsAllowedAccess("updatebidstatus"); msg != "" {
+		result.ErrMsg = msg
+		return result, nil
+	}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	// 不是超级订阅 也不是大会员
+	if !b {
+		result.ErrMsg = "没有权限"
+		return result, nil
+	}
+	participateService := service.NewParticipateBid(in.EntId, in.EntUserId, in.PositionType, in.PositionId)
+	participateService.EntRoleId = entRoleId
+	// 信息id解密
+	infoList, _ := service.DecodeId(in.Sid)
+	if len(infoList) == 0 {
+		result.ErrMsg = "信息id无效"
+		return result, nil
+	}
+	// 根据标讯id 查询项目信息
+	projectInfos := es.GetProjectByInfoId(infoList)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		result.ErrMsg = "未查询到项目信息"
+		return result, nil
+	}
+	// 判断是否已经过了投标截止时间
+	bidendtime := common.Int64All((*projectInfos)[0]["bidendtime"])
+	bidopentime := common.Int64All((*projectInfos)[0]["bidopentime"])
+	projectId := common.ObjToString((*projectInfos)[0]["_id"])
+	now := time.Now().Unix()
+	if (now > bidopentime && bidopentime != 0) || (now > bidendtime && bidendtime != 0) {
+		result.ErrMsg = "已经过投标截止时间,无法更新"
+		return result, nil
+	}
+	// 验证身份
+	if !participateService.CheckUpdateBidPower(projectId, true) {
+		result.ErrMsg = "没有更新权限"
+		return result, nil
+	}
+	// 2. 更新
+	if err := participateService.UpdateBidStatus(in, projectId); err != nil {
+		result.ErrMsg = err.Error()
+	} else {
+		result.Data = true
+		result.ErrCode = 0
+	}
+	return result, nil
+}

+ 54 - 0
jyBXCore/rpc/internal/server/bxcoreserver.go

@@ -33,3 +33,57 @@ func (s *BxCoreServer) SearchLimit(ctx context.Context, in *bxcore.SearchLimitRe
 	l := logic.NewSearchLimitLogic(ctx, s.svcCtx)
 	return l.SearchLimit(in)
 }
+
+//  列表数据参标信息接口
+func (s *BxCoreServer) ParticipateShow(ctx context.Context, in *bxcore.ParticipateShowReq) (*bxcore.ParticipateShowRes, error) {
+	l := logic.NewParticipateShowLogic(ctx, s.svcCtx)
+	return l.ParticipateShow(in)
+}
+
+//  详情页参标信息接口
+func (s *BxCoreServer) ParticipateInfo(ctx context.Context, in *bxcore.ParticipateInfoReq) (*bxcore.ParticipateInfoRes, error) {
+	l := logic.NewParticipateInfoLogic(ctx, s.svcCtx)
+	return l.ParticipateInfo(in)
+}
+
+//   投标状态更新
+func (s *BxCoreServer) UpdateBidStatus(ctx context.Context, in *bxcore.UpdateBidStatusReq) (*bxcore.UpdateBidStatusRes, error) {
+	l := logic.NewUpdateBidStatusLogic(ctx, s.svcCtx)
+	return l.UpdateBidStatus(in)
+}
+
+//  获取投标状态信息
+func (s *BxCoreServer) ParticipateContent(ctx context.Context, in *bxcore.ParticipateContentReq) (*bxcore.ParticipateContentRes, error) {
+	l := logic.NewParticipateContentLogic(ctx, s.svcCtx)
+	return l.ParticipateContent(in)
+}
+
+//  参标操作记录
+func (s *BxCoreServer) ParticipateRecords(ctx context.Context, in *bxcore.ParticipateRecordsReq) (*bxcore.ParticipateRecordsRes, error) {
+	l := logic.NewParticipateRecordsLogic(ctx, s.svcCtx)
+	return l.ParticipateRecords(in)
+}
+
+//  当前部门/企业下参标人员信息
+func (s *BxCoreServer) ParticipatePersons(ctx context.Context, in *bxcore.ParticipatePersonsReq) (*bxcore.ParticipatePersonsRes, error) {
+	l := logic.NewParticipatePersonsLogic(ctx, s.svcCtx)
+	return l.ParticipatePersons(in)
+}
+
+//  参标设置信息
+func (s *BxCoreServer) ParticipateSetUpInfo(ctx context.Context, in *bxcore.ParticipateSetUpInfoReq) (*bxcore.ParticipateSetUpInfoRes, error) {
+	l := logic.NewParticipateSetUpInfoLogic(ctx, s.svcCtx)
+	return l.ParticipateSetUpInfo(in)
+}
+
+//  项目参标 终止参标 划转等动作
+func (s *BxCoreServer) ParticipateAction(ctx context.Context, in *bxcore.ParticipateActionReq) (*bxcore.ParticipateActionRes, error) {
+	l := logic.NewParticipateActionLogic(ctx, s.svcCtx)
+	return l.ParticipateAction(in)
+}
+
+//  我的参标项目列表|企业参标项目列表
+func (s *BxCoreServer) ParticipateList(ctx context.Context, in *bxcore.ParticipateListReq) (*bxcore.ParticipateListRes, error) {
+	l := logic.NewParticipateListLogic(ctx, s.svcCtx)
+	return l.ParticipateList(in)
+}

+ 5 - 3
jyBXCore/rpc/model/es/es.go

@@ -6,7 +6,7 @@ import (
 	"strings"
 
 	elastic "app.yhyue.com/moapp/jybase/es"
-	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 )
 
 const (
@@ -29,7 +29,9 @@ const (
 	BidSearchFieldOfVip     = BidSearchFieldBase + `,"buyertel","buyerperson","agency","agencytel","agencyperson","s_winner","winnertel","winnerperson","signendtime","bidendtime","projectinfo","entidlist"`            //付费列表字段
 	BidSearchFieldFile      = `,"isValidFile"`                                                                                                                                                                           //根据配置开关 选择是否显示 是否有附件提示,IC.C.FileSignBool
 	BidSearchDomainField    = BidSearchFieldOfVip + `,"purchasing"`                                                                                                                                                      //领域数据字段基本字段
-	//DefaultFields       = `"title"`                                                                                                                                                                                                      //最新招标信息
+	//DefaultFields       = `"title"`
+	IndexProjectSet = "projectset" // 项目信息es index
+	TypeProjectSet  = "projectset" // 项目信息es type                                                                                                                                                                                                  //最新招标信息
 )
 
 var (
@@ -78,7 +80,7 @@ func (e *SearchByES) GetAllByNgramWithCount() (int64, *[]map[string]interface{})
 		if e.Start > -1 {
 			queryStr = queryStr[:len(queryStr)-1] + `,"from":` + strconv.Itoa(e.Start) + `,"size":` + strconv.Itoa(e.Limit) + "}"
 		}
-		logx.Info("queryStr:", queryStr)
+		log.Println("queryStr:", queryStr)
 		return elastic.GetWithCount(e.Index, e.IType, e.Query, queryStr)
 	} else {
 		return 0, nil

+ 102 - 0
jyBXCore/rpc/model/es/project.go

@@ -0,0 +1,102 @@
+package es
+
+import (
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"fmt"
+	"strings"
+	"time"
+)
+
+// 项目信息 项目id
+func GetProjectInfo(id string) map[string]interface{} {
+	projectInfos := elastic.GetById(IndexProjectSet, TypeProjectSet, id)
+	if projectInfos != nil && len(*projectInfos) > 0 {
+		return (*projectInfos)[0]
+	}
+	return nil
+}
+
+// 招标信息 招标信息id
+func GetBiddingInfo(id string) map[string]interface{} {
+	biddingInfos := elastic.GetById(INDEX, TYPE, id)
+	if biddingInfos != nil && len(*biddingInfos) > 0 {
+		return (*biddingInfos)[0]
+	}
+	return nil
+}
+
+// GetValidProjectByInfoId 根据查询有效的参标项目id(未到开标时间及开标时间不存在的)
+func GetValidProjectByInfoId(infoIds []string) *[]map[string]interface{} {
+	if len(infoIds) == 0 {
+		return nil
+	}
+	nowTime := time.Now().Unix()
+	query := `{"_source":["_id","list.infoid"],"query": {"bool": {"must": [{"terms": {"list.infoid": ["` + strings.Join(infoIds, "\",\"") + `"]}},
+                {"bool": {"should": [{"range": {"bidopentime": {"gte": ` + fmt.Sprint(nowTime) + `}}},
+               {"bool": {"must_not": [{"constant_score": {"filter": {"exists": {"field": "bidopentime"
+                        }
+                    }
+                }
+            }
+]}}] }},
+{"bool": {"should": [{"range": {"bidendtime": {"gte": ` + fmt.Sprint(nowTime) + `}}},
+        {
+    "bool": {
+        "must_not": [
+            {
+                "constant_score": {
+                    "filter": {
+                        "exists": {
+                            "field": "bidendtime"
+                        }
+                    }
+                }
+            }
+        ]
+    }
+}
+] }}]}},
+"size": 500
+}`
+
+	projectResult := elastic.Get(IndexProjectSet, TypeProjectSet, query)
+	return projectResult
+
+}
+
+// GetProjectByInfoId 根据信息id查询项目id
+func GetProjectByInfoId(infoIds []string) *[]map[string]interface{} {
+	if len(infoIds) == 0 {
+		return nil
+	}
+	query := `{"_source":["_id","list.infoid","ids","bidopentime","bidendtime"],"query":{"bool":{"must":[{"terms":{"list.infoid":["` + strings.Join(infoIds, "\",\"") + `"]}}]}}}`
+
+	projectResult := elastic.Get(IndexProjectSet, TypeProjectSet, query)
+	return projectResult
+
+}
+
+// GetBidInfoByPId 根据项目id查询招标信息id
+func GetBidInfoByPId(infoId string) *[]map[string]interface{} {
+	query := `{
+				  "query": {
+					"bool": {
+					  "must": [
+						{
+						  "term": {
+							"projectset.id": "` + infoId + `"
+						  }
+						}
+					  ]
+					}
+				  },
+				  "from": 0,
+				  "size": 1,
+				  "sort": [],
+				  "facets": {}
+				}`
+
+	projectResult := elastic.Get(IndexProjectSet, TypeProjectSet, query)
+	return projectResult
+
+}

+ 3 - 3
jyBXCore/rpc/model/es/search.go

@@ -10,7 +10,7 @@ import (
 
 	MC "app.yhyue.com/moapp/jybase/common"
 	elastic "app.yhyue.com/moapp/jybase/es"
-	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 )
 
 // GetSearchQuery  整理关键词等查询条件
@@ -202,7 +202,7 @@ func GetSearchQuery(in *bxcore.SearchReq, mustQuery string) (qstr string) {
 		musts = append(musts, fmt.Sprintf(queryBoolMustTermDomain, in.BidField))
 	}
 	qstr = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(mustNot, ","))
-	logx.Info("qstr:", qstr)
+	log.Println("qstr:", qstr)
 	return
 }
 
@@ -287,7 +287,7 @@ func GetBidSearchQuery(in *bxcore.SearchReq) string {
 		allType += `]}}`
 	}
 	//信息类型  一级分类
-	logx.Info("topType:", topType)
+	log.Println("topType:", topType)
 	if len(topType) > 0 {
 		if allType != "" {
 			allType += ","

+ 1042 - 0
jyBXCore/rpc/model/mysql/participateBid.go

@@ -0,0 +1,1042 @@
+package mysql
+
+import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"database/sql"
+	"encoding/json"
+	"fmt"
+	IC "jyBXCore/rpc/init"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/type/bxcore"
+	"log"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// 投标状态更新内容
+type PartStatusContent struct {
+	BidStage      []string `json:"bidStage"`      //投标项目阶段
+	BidType       int64    `json:"bidType"`       //投标类型1:直接投标;2:渠道投标
+	ChannelName   string   `json:"channelName"`   //渠道名称
+	ChannelPerson string   `json:"channelPerson"` //联系人
+	ChannelPhone  string   `json:"channelPhone"`  //联系电话
+	IsWin         int64    `json:"isWin"`         //渠道是否中标
+	Winner        string   `json:"winner"`        //中标单位
+}
+
+// 参标
+type RecordsContent struct {
+	After       PartStatusContent `json:"after"`       //更新前
+	Before      PartStatusContent `json:"before"`      //更新后
+	ChangeField []string          `json:"changeField"` //更新字段
+	Content     string            `json:"content"`     //更新内容
+}
+
+var (
+	PartTable                  = "participate"
+	ParticipateBidRecordsTable = "participate_bid_records"
+	ParticipateUserTable       = "participate_user" // 参标用户表
+	EntnicheUserTable          = "entniche_user"    // 企业用户表
+)
+
+// 划转参标信息
+func TransferParticipateInfo(projectId string, in *bxcore.ParticipateActionReq) error {
+	defer MC.Catch()
+	//保存或更新新跟踪人
+	if !IC.BaseMysql.ExecTx("划转参标信息", func(tx *sql.Tx) bool {
+		var (
+			b1                                             = true
+			b2, b3                                         bool
+			now                                            = time.Now()
+			content                                        = "从%s名下划转给%s%s"
+			lastNotes                                      = ",保留原参标人"
+			fromEntUserNames, toEntUserNames, toEntUserIds []string
+			ids                                            []int
+		)
+		partInfo := IC.BaseMysql.SelectBySqlByTx(tx, "SELECT id,position_id FROM "+ParticipateUserTable+" WHERE  project_id = ?  AND ent_id = ? AND state > -1", projectId, in.EntId)
+		if partInfo == nil || len(*partInfo) == 0 {
+			log.Println("当前项目不满足划转条件")
+			return false
+		} else {
+			for _, v := range *partInfo {
+				ids = append(ids, MC.IntAll(v["id"]))
+				positionId := MC.Int64All(v["position_id"])
+				userInfo := IC.Middleground.UserCenter.IdentityByPositionId(positionId)
+				if userInfo.EntUserName != "" {
+					fromEntUserNames = append(fromEntUserNames, userInfo.EntUserName)
+				}
+			}
+		}
+		if len(fromEntUserNames) == 0 {
+			log.Println("原参标人信息查询有误")
+			return false
+		}
+		//是否保留原参标人
+		if !in.IsRetain {
+			lastNotes = ""
+			//不保留 原参标人,获取把原参标人信息
+			//当前项目有参标人 更新参标人状态
+			b1 = IC.BaseMysql.UpdateByTx(tx, ParticipateUserTable, map[string]interface{}{
+				"ent_id":     in.EntId,
+				"project_id": projectId,
+			}, map[string]interface{}{
+				"state":       -1,
+				"mark":        -2, //0:参标;1:被划入;-1:终止参标;-2:被划走
+				"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+			})
+		}
+		//移动端 划转对象是多选
+		//划转对象entuserid 解密
+		for _, toEntUserId := range strings.Split(in.ToEntUserId, ",") {
+			toEntUserId = encrypt.SE.Decode4HexByCheck(toEntUserId)
+			if toEntUserId == "" {
+				log.Println("划转对象不能为空", in.ProjectIds, in.EntId)
+				continue
+			}
+			//查询划转人信息
+			entUserId, _ := strconv.ParseInt(toEntUserId, 10, 64)
+			userInfo := IC.Middleground.UserCenter.IdentityByEntUserId(entUserId)
+			positionId := userInfo.PositionId
+			//保存参标--participate_user
+			//查看是否参标过当前项目
+			if c := IC.BaseMysql.CountBySql("SELECT count(id) FROM "+ParticipateUserTable+" WHERE position_id = ? AND project_id = ?  AND ent_id = ?", positionId, projectId, in.EntId); c > 0 {
+				//更新
+				b3 = IC.BaseMysql.UpdateByTx(tx, ParticipateUserTable, map[string]interface{}{
+					"position_id": positionId,
+					"project_id":  projectId,
+					"ent_id":      in.EntId,
+				}, map[string]interface{}{
+					"state":       0,
+					"mark":        1, //0:参标;1:被划入;-1:终止参标;-2:被划走
+					"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+				})
+			} else {
+				//保存
+				b3 = IC.BaseMysql.InsertByTx(tx, ParticipateUserTable, map[string]interface{}{
+					"ent_id":      in.EntId,
+					"ent_user_id": entUserId,
+					"position_id": positionId,
+					"project_id":  projectId,
+					"user_id":     in.MgoUserId,
+					"state":       0,
+					"mark":        1, //0:参标;1:被划入;-1:终止参标;-2:被划走
+					"create_date": date.FormatDate(&now, date.Date_Full_Layout),
+					"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+				}) > 0
+			}
+			if b3 {
+				toEntUserIds = append(toEntUserIds, toEntUserId)
+				toEntUserNames = append(toEntUserNames, userInfo.EntUserName)
+			}
+		}
+		//保存多个用户时  如果个别用户划转参标项目异常,直接跳过此用户,保存其他用户信息
+		//防止最后一个用户保存异常
+		if len(toEntUserIds) > 0 {
+			b3 = true
+		}
+		//移动端单个项目划转给多个用户,划转记录保存一份,当前企业下参过标的或当前正在参标的人都能看到次记录
+		//企业下 根据企业id 和项目id查询划转记录
+		//个人版 根据职位id 和项目id查询划转记录
+		//划转记录
+		b2 = IC.BaseMysql.InsertByTx(tx, ParticipateBidRecordsTable, map[string]interface{}{
+			"ent_id":               in.EntId,
+			"ent_user_id":          in.EntUserId,
+			"position_id":          in.PositionId,
+			"project_id":           projectId,
+			"record_type":          0,
+			"transfer_ent_user_id": strings.Join(toEntUserIds, ","),
+			"record_content":       fmt.Sprintf(content, strings.Join(fromEntUserNames, "、"), strings.Join(toEntUserNames, "、"), lastNotes),
+			"create_date":          date.FormatDate(&now, date.Date_Full_Layout),
+		}) > 0
+		log.Println(b1, "--", b2, "--", b3)
+		return b1 && b2 && b3
+	}) {
+		log.Println(in.PositionId, "---终止---", projectId)
+		return fmt.Errorf("终止参标更新信息出错")
+	}
+	return nil
+}
+
+// 终止参标
+func CancelParticipateInfo(in *bxcore.ParticipateActionReq, roleId int64) error {
+	defer MC.Catch()
+	if !IC.BaseMysql.ExecTx("终止参标", func(tx *sql.Tx) bool {
+		var (
+			b1, b2 bool
+			now    = time.Now()
+			tip    = "终止参标"
+		)
+		//管理员终止:当前项目 其他参标人也被终止
+		query := map[string]interface{}{
+			"project_id": in.ProjectIds,
+			"ent_id":     in.EntId,
+		}
+		//个人终止:仅仅终止本人参标项目
+		if roleId == 0 {
+			query["position_id"] = in.PositionId
+			tip = "终止参标"
+		}
+		insert := map[string]interface{}{
+			"state":       -1,
+			"mark":        -1, //0:参标;1:被划入;-1:终止参标;-2:被划走
+			"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+		}
+		//更新参标participate_user
+		b1 = IC.BaseMysql.UpdateByTx(tx, ParticipateUserTable, query, insert)
+		//保存参标记录--participate_bid_records
+		b2 = IC.BaseMysql.InsertByTx(tx, ParticipateBidRecordsTable, map[string]interface{}{
+			"ent_id":         in.EntId,
+			"ent_user_id":    in.EntUserId,
+			"position_id":    in.PositionId,
+			"project_id":     in.ProjectIds,
+			"record_type":    0,
+			"record_content": tip,
+			"create_date":    date.FormatDate(&now, date.Date_Full_Layout),
+		}) > 0
+		return b1 && b2
+	}) {
+		log.Println(in.PositionId, "---终止---", in.ProjectIds)
+		return fmt.Errorf("终止参标更新信息出错")
+	}
+	return nil
+}
+
+// 保存参标信息
+func SaveParticipateInfo(in *bxcore.ParticipateActionReq) error {
+	defer MC.Catch()
+	if !IC.BaseMysql.ExecTx("保存|更新参标信息及保存参标记录", func(tx *sql.Tx) bool {
+		var (
+			b1, b2, b3 bool
+			now        = time.Now()
+		)
+		//保存参标--participate_user
+		//查看是否参标过当前项目
+		if c := IC.BaseMysql.CountBySql("SELECT count(id) FROM "+ParticipateUserTable+" WHERE position_id = ? AND project_id = ?  AND ent_id = ?", in.PositionId, in.ProjectIds, in.EntId); c > 0 {
+			//更新
+			b1 = IC.BaseMysql.UpdateByTx(tx, ParticipateUserTable, map[string]interface{}{
+				"position_id": in.PositionId,
+				"ent_id":      in.EntId,
+				"project_id":  in.ProjectIds,
+			}, map[string]interface{}{
+				"state":       0,
+				"mark":        0,
+				"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+			})
+		} else {
+			//保存
+			b1 = IC.BaseMysql.InsertByTx(tx, ParticipateUserTable, map[string]interface{}{
+				"ent_id":      in.EntId,
+				"ent_user_id": in.EntUserId,
+				"position_id": in.PositionId,
+				"project_id":  in.ProjectIds,
+				"user_id":     in.MgoUserId,
+				"state":       0,
+				"mark":        0,
+				"create_date": date.FormatDate(&now, date.Date_Full_Layout),
+				"update_date": date.FormatDate(&now, date.Date_Full_Layout),
+			}) > 0
+		}
+		if !b1 {
+			return false
+		}
+		//保存参标记录participate_bid_records
+		b2 = IC.BaseMysql.InsertByTx(tx, ParticipateBidRecordsTable, map[string]interface{}{
+			"ent_id":         in.EntId,
+			"ent_user_id":    in.EntUserId,
+			"position_id":    in.PositionId,
+			"project_id":     in.ProjectIds,
+			"record_type":    0,
+			"record_content": "参标",
+			"create_date":    date.FormatDate(&now, date.Date_Full_Layout),
+		}) > 0
+		if !b2 {
+			return false
+		}
+		//保存或更新项目信息
+		//有问题 其他回滚,项目信息不用回滚
+		b3 = UpdateProjectInfo(in.ProjectIds, es.GetProjectInfo(in.ProjectIds)) == nil
+		return b1 && b2 && b3
+	}) {
+		log.Println(in.PositionId, "---保存---", in.ProjectIds)
+		return fmt.Errorf("保存参标信息出错")
+	}
+	return nil
+}
+
+// 查询当前招标信息是否已被参标
+func IsParticipatedByBidId(in *bxcore.ParticipateActionReq) (entUserName string) {
+	defer MC.Catch()
+	//如果不允许多人参标 当前项目是否已经有企业其他人员参标
+	query := fmt.Sprintf(`SELECT ent_id,ent_user_id FROM `+ParticipateUserTable+` WHERE %s AND project_id = '%s' AND state >-1`, "%s", in.ProjectIds)
+	if in.PositionType > 0 { //企业版
+		query = fmt.Sprintf(query, fmt.Sprintf("ent_id = %d", in.EntId))
+	} else { //个人版
+		query = fmt.Sprintf(query, fmt.Sprintf("position_id = %d", in.PositionId))
+	}
+	data := IC.BaseMysql.SelectBySql(query)
+	if data != nil && len(*data) > 0 {
+		partInfo := (*data)[0]
+		if entUserId := MC.Int64All(partInfo["ent_user_id"]); entUserId > 0 {
+			userInfo := IC.Middleground.UserCenter.IdentityByEntUserId(entUserId)
+			entUserName = userInfo.EntUserName
+		}
+	}
+	return
+}
+
+// 获取参标权限
+func GetParticipateIsAllow(query map[string]interface{}) (b bool) {
+	defer MC.Catch()
+	if info, ok := IC.Mgo.FindOne(PartTable, query); ok {
+		if info != nil {
+			if (*info)["i_isallow"] != nil {
+				b = MC.IntAll((*info)["i_isallow"]) > 0
+			}
+		}
+	}
+	return
+}
+
+// 更新设置信息
+func UpdateParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) error {
+	defer MC.Catch()
+	query := map[string]interface{}{
+		"i_positionid": in.PositionId,
+	}
+	if in.PositionType > 0 {
+		query = map[string]interface{}{
+			"i_entid": in.EntId,
+		}
+	}
+	upsert := map[string]interface{}{
+		"i_entid":      in.EntId,
+		"i_entuserid":  in.EntUserId,
+		"i_positionid": in.PositionId,
+		"l_createtime": time.Now().Unix(),
+	}
+	if in.IsAllow != "" {
+		if in.IsAllow == "0" { //修改为允许单人参标
+			//判断是否有多人参标的项目
+			//pSql := `SELECT project_id,COUNT(id) AS c FROM ` + ParticipateUserTable + ` WHERE ent_id = ?  AND state =0 GROUP BY project_id ORDER BY c DESC;`
+			pSql := `SELECT pu.project_id,COUNT(pu.id) AS c,p.bid_end_time,p.bid_open_time FROM ` + ParticipateUserTable + ` pu LEFT JOIN project p ON pu.project_id = p.id WHERE pu.ent_id = ?  AND pu.state =0 AND ((p.bid_open_time  > ?  or p.bid_open_time is null) and (p.bid_end_time IS NULL  or p.bid_end_time > ?)) GROUP BY pu.project_id ORDER BY c DESC`
+			data := IC.BaseMysql.SelectBySql(pSql, in.EntId, time.Now().Format(date.Date_Full_Layout), time.Now().Format(date.Date_Full_Layout))
+			if data != nil && len(*data) > 0 {
+				if max := MC.IntAll((*data)[0]["c"]); max > 1 {
+					return fmt.Errorf("公司当前有项目多人参标的情况,请先确保项目都是单人参标的前提下再调整配置。\n前往”企业参标项目列表“查看具体情况。")
+				}
+			}
+		}
+		isAllow, _ := strconv.Atoi(in.IsAllow)
+		upsert["i_isallow"] = isAllow
+	}
+	if len(in.BidType) > 0 {
+		upsert["o_bidtype"] = in.BidType
+	}
+	if len(in.RemindRule) > 0 {
+		upsert["o_remindrule"] = in.RemindRule
+	}
+	if in.NecessaryField != "" {
+		upsert["s_requiredField"] = in.NecessaryField
+	}
+	if ok := IC.Mgo.Update(PartTable, query, map[string]interface{}{
+		"$set": upsert,
+	}, true, false); ok {
+		return nil
+	}
+	return fmt.Errorf("更新失败")
+}
+
+// 查询企业|个人参标设置信息
+func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.ParticipateSetUpInfo, error) {
+	defer MC.Catch()
+	query := map[string]interface{}{
+		"i_positionid": in.PositionId,
+	}
+	if in.PositionType > 0 {
+		query = map[string]interface{}{
+			"i_entid": in.EntId,
+		}
+	}
+	if setInfo, ok := IC.Mgo.FindOne(PartTable, query); ok {
+		var (
+			isAllow    int64
+			isRequired string
+			bidType    []*bxcore.BidTypeReq
+			remindRule []*bxcore.RemindRuleReq
+		)
+		bidType = append(bidType, &bxcore.BidTypeReq{
+			Name:    "直接投标",
+			Content: []string{"未报名", "已报名", "投标决策", "编制投标文件", "递交投标文件", "中标公示", "签合同", "已结束"},
+		}, &bxcore.BidTypeReq{
+			Name:    "渠道投标",
+			Content: []string{"已报名", "签合同", "已结束"},
+		})
+		remindRule = append(remindRule, &bxcore.RemindRuleReq{
+			BidState:  "直接投标",
+			Remainder: 72,
+			Node:      "编制投标文件",
+		})
+		if setInfo != nil {
+			//必填字段
+			if (*setInfo)["s_requiredField"] != nil {
+				isRequired = MC.ObjToString((*setInfo)["s_requiredField"])
+			} else {
+				isRequired = "bidType"
+			}
+			isAllow = MC.Int64All((*setInfo)["i_isallow"])
+			if (*setInfo)["o_bidtype"] != nil {
+				if sbb, err := json.Marshal((*setInfo)["o_bidtype"]); err == nil {
+					if err := json.Unmarshal(sbb, &bidType); err != nil {
+						log.Println("bidType json un err:", err.Error())
+						return nil, err
+					}
+				} else {
+					log.Println("bidType json err:", err.Error())
+					return nil, err
+				}
+			}
+			if (*setInfo)["o_remindrule"] != nil {
+				if sbr, err := json.Marshal((*setInfo)["o_remindrule"]); err == nil {
+					if err := json.Unmarshal(sbr, &remindRule); err != nil {
+						log.Println("remindRule json un err:", err.Error())
+						return nil, err
+					}
+				} else {
+					log.Println("remindRule json err:", err.Error())
+					return nil, err
+				}
+			}
+		}
+		return &bxcore.ParticipateSetUpInfo{
+			NecessaryField: isRequired,
+			IsAllow:        isAllow,
+			BidType:        bidType,
+			RemindRule:     remindRule,
+		}, nil
+	}
+	return nil, nil
+}
+
+// 保存或更新tidb 项目信息
+func UpdateProjectInfo(id string, pInfo map[string]interface{}) error {
+	//id 项目id
+	//name 项目名称
+	//area  省份
+	//city 城市
+	//buyer 采购单位
+	//budget 预算
+	//bid_open_time  开标时间
+	//zbtime 招标时间
+	//bid_end_time 开标结束时间  bidding表 由 数据组 重新生索引到project表
+	//pici 批次 轮询更新数据
+	//
+	projectInfo := map[string]interface{}{
+		"id":     id,
+		"name":   MC.ObjToString(pInfo["projectname"]),
+		"area":   MC.ObjToString(pInfo["area"]),
+		"city":   MC.ObjToString(pInfo["city"]),
+		"buyer":  MC.ObjToString(pInfo["buyer"]),
+		"budget": MC.Int64All(pInfo["budget"]),
+	}
+	if pInfo["bidopentime"] != nil {
+		openTime := pInfo["bidopentime"]
+		projectInfo["bid_open_time"] = date.FormatDateWithObj(&openTime, date.Date_Full_Layout)
+	}
+	if pInfo["pici"] != nil {
+		pici := pInfo["pici"]
+		projectInfo["pici"] = date.FormatDateWithObj(&pici, date.Date_Full_Layout)
+	}
+	// 项目表:zbtime 招标时间是 biding表:publishtime发布时间
+	if pInfo["zbtime"] != nil {
+		bidTime := pInfo["zbtime"]
+		projectInfo["bid_time"] = date.FormatDateWithObj(&bidTime, date.Date_Full_Layout)
+	}
+	if pInfo["bidendtime"] != nil {
+		bidEndTime := pInfo["bidendtime"]
+		projectInfo["bid_end_time"] = date.FormatDateWithObj(&bidEndTime, date.Date_Full_Layout)
+	}
+	if c := IC.BaseMysql.CountBySql(`SELECT COUNT(id) FROM project WHERE id = ?`, id); c > 0 {
+		if ok := IC.BaseMysql.Update("project", map[string]interface{}{
+			"id": id,
+		}, projectInfo); !ok {
+			return fmt.Errorf("项目信息更新异常", id)
+		}
+	} else {
+		if i := IC.BaseMysql.Insert("project", projectInfo); i < 0 {
+			return fmt.Errorf("项目信息插入异常", id)
+		}
+	}
+	return nil
+}
+
+// 参标列表其他条件
+func ParticipateListSql(in *bxcore.ParticipateListReq) string {
+	//b  project表
+	//a  participate_user表
+	now := time.Now()
+	nowDate := date.FormatDate(&now, date.Date_Full_Layout)
+	//查询tidb  base_service.project
+	conditionSql := ` `
+	//地区
+	if in.Area != "" {
+		conditionSql += fmt.Sprintf(" AND pt.area IN ('%s') ", strings.ReplaceAll(in.Area, ",", "','"))
+	}
+	//城市
+	if in.City != "" {
+		conditionSql += fmt.Sprintf(" AND pt.city IN ('%s') ", strings.ReplaceAll(in.City, ",", "','"))
+	}
+	//关键词
+	if in.Keywords != "" {
+		kSql := ` AND (`
+		for kk, kv := range strings.Split(in.Keywords, " ") {
+			log.Println(kk, "----", kv)
+			if kk > 0 {
+				kSql += " OR "
+			}
+			kSql += " pt.name like '%" + kv + "%'"
+		}
+		kSql += `)`
+		conditionSql += kSql
+	}
+	//招标日期
+	if in.BidTime != "" && strings.Contains(in.BidTime, "-") {
+		startTime := strings.Split(in.BidTime, "-")[0]
+		entTime := strings.Split(in.BidTime, "-")[1]
+		if startTime != "" {
+			startTimeInt, _ := strconv.ParseInt(startTime, 10, 64)
+			conditionSql += ` AND pt.bid_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
+		}
+		if entTime != "" {
+			entTimeInt, _ := strconv.ParseInt(entTime, 10, 64)
+			conditionSql += ` AND pt.bid_time < '` + date.FormatDateByInt64(&entTimeInt, date.Date_Full_Layout) + `'`
+		}
+	}
+	//招标截止日期
+	if in.BidEndTime != "" {
+		//投标截止日期规则:
+		//1、开始时间小于当前时间 ,结束时间大于当前时间,投标截止状态按钮未截止和已截止可用;
+		//2、结束时间小于当前时间|开始时间大于当前时间,投标截止状态按钮未截止和已截止不可用;
+		//3、需要前端做成连动
+		startTime := strings.Split(in.BidEndTime, "-")[0]
+		endTime := strings.Split(in.BidEndTime, "-")[1]
+		startTimeInt, _ := strconv.ParseInt(startTime, 10, 64)
+		endTimeInt, _ := strconv.ParseInt(endTime, 10, 64)
+		bidEndTimeSql := ``
+		if startTimeInt > 0 && endTimeInt > 0 && startTimeInt > endTimeInt {
+			log.Println(fmt.Sprintf("投标截止日期 %d 开始时间 大于 结束时间%d!!!", startTimeInt, endTimeInt))
+		} else {
+			if startTimeInt > 0 {
+				bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
+			}
+			if endTimeInt > 0 {
+				bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
+			}
+			switch in.BidEndStatus {
+			case 1: //投标截止状态:1:未截止;2:已截止;3:终止参标
+				bidEndTimeSql = ``
+				//未截止:
+				var (
+					endBool = true
+				)
+				//如果结束时间存在且小于当前时间,投标截止日期 范围都是已截止 不会存在未截止的数据
+				if endTimeInt > 0 {
+					bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
+					endBool = endTimeInt > now.Unix()
+				}
+				//开始时间小于 当前时间
+				if endBool && now.Unix() > startTimeInt {
+					startTimeInt = now.Unix()
+				}
+				//存在开始时间为0的情况
+				if startTimeInt > 0 {
+					bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
+				}
+			case 2: //投标截止状态:1:未截止;2:已截止;3:终止参标
+				//如果开始时间存在且大于当前时间,投标截止日期 范围都是未截止 不会存在已截止的数据
+				var (
+					startBool = true
+				)
+				bidEndTimeSql = ``
+				if startTimeInt > 0 {
+					bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
+					startBool = startTimeInt < now.Unix()
+				}
+				if startBool && (endTimeInt == 0 || now.Unix() < endTimeInt) {
+					endTimeInt = now.Unix()
+				}
+				//存在结束时间为0的情况
+				if endTimeInt > 0 {
+					bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
+				}
+			case 3:
+				bidEndTimeSql += ` AND pug.state < 0 `
+			}
+		}
+		if bidEndTimeSql != "" {
+			conditionSql += bidEndTimeSql
+		}
+	} else if in.BidEndStatus > 0 { //投标截止状态1:未截止;2:已截止;3:终止参标
+		switch in.BidEndStatus {
+		case 1:
+			conditionSql += ` AND pt.bid_end_time > '` + nowDate + `'`
+		case 2:
+			conditionSql += ` AND pt.bid_end_time < '` + nowDate + `'`
+		case 3:
+			conditionSql += ` AND pug.state < 0 `
+		}
+	}
+	//开标时间
+	if in.BidOpenTime != "" {
+		startTime := strings.Split(in.BidOpenTime, "-")[0]
+		entTime := strings.Split(in.BidOpenTime, "-")[1]
+		if startTime != "" {
+			startTimeInt, _ := strconv.ParseInt(startTime, 10, 64)
+			conditionSql += ` AND pt.bid_open_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
+		}
+		if entTime != "" {
+			entTimeInt, _ := strconv.ParseInt(entTime, 10, 64)
+			conditionSql += ` AND pt.bid_open_time < '` + date.FormatDateByInt64(&entTimeInt, date.Date_Full_Layout) + `'`
+		}
+	}
+	//开标状态1:未开标;2:已开标
+	if in.BidOpenStatus > 0 {
+		switch in.BidOpenStatus {
+		case 1:
+			conditionSql += ` AND pt.bid_open_time > '` + nowDate + `'`
+		case 2:
+			conditionSql += ` AND pt.bid_open_time < '` + nowDate + `'`
+		}
+	}
+	//参标人  管理员权限
+	if in.EntUserIds != "" && in.PositionType > 0 {
+		var entUserIdsSql = ""
+		for k, v := range strings.Split(in.EntUserIds, ",") {
+			v = encrypt.SE.Decode4HexByCheck(v)
+			if v == "" {
+				continue
+			}
+			if k > 0 && entUserIdsSql != "" {
+				entUserIdsSql += " OR "
+			}
+			entUserIdsSql += ` FIND_IN_SET(` + v + ` , pug.ent_user_id) `
+		}
+		if entUserIdsSql != "" {
+			conditionSql += ` AND  (` + entUserIdsSql + `)`
+		}
+	}
+	//默认按照投标截止日期正序排列、1:开标时间正序、2:更新状态时间倒序
+	//投标结束时间和开标时间 很多项目数据没有这两个字段值
+	switch in.OrderNum {
+	case 1:
+		conditionSql += ` ORDER BY (pt.bid_open_time IS NULL),pt.bid_open_time ASC,(pt.bid_end_time IS NULL),pt.bid_end_time ASC,pbr.create_date DESC`
+	case 2:
+		conditionSql += ` ORDER BY pbr.create_date DESC`
+	default:
+		conditionSql += ` ORDER BY (pt.bid_end_time IS NULL),pt.bid_end_time ASC,(pt.bid_open_time IS NULL),pt.bid_open_time ASC,pbr.create_date DESC`
+	}
+	log.Println(conditionSql)
+	return conditionSql
+}
+
+// 个人或员工查询参标列表
+func SingleParticipateList(in *bxcore.ParticipateListReq, conditionSql string) (data *bxcore.ParticipateData, err error) {
+	defer MC.Catch()
+	data = &bxcore.ParticipateData{
+		NowTime: time.Now().Unix(),
+		Count:   0,
+		List:    []*bxcore.ParticipateList{},
+	}
+	//员工|个人列表
+	singlePersonSql := `SELECT %s FROM ` + ParticipateUserTable + ` pug LEFT JOIN project pt ON pug.project_id = pt.id LEFT JOIN (SELECT project_id,position_id,MAX(create_date) AS create_date FROM participate_bid_records GROUP BY project_id,position_id) pbr ON pbr.project_id = pug.project_id AND pbr.position_id = pug.position_id WHERE pug.position_id = ? `
+	//singlePersonSql += conditionSql
+	countSql := fmt.Sprintf(singlePersonSql, " COUNT(pt.id) ") + conditionSql
+	count := IC.BaseMysql.CountBySql(countSql, in.PositionId)
+	log.Println(countSql, "---", count)
+	if count > 0 {
+		data.Count = count
+		listSql := fmt.Sprintf(singlePersonSql, " pt.*,pbr.create_date,pug.state ") + conditionSql
+		//分页
+		listSql += fmt.Sprintf(` LIMIT %d,%d`, in.PageNum, in.PageSize)
+		log.Println("listSql:", listSql)
+		list := IC.BaseMysql.SelectBySql(listSql, in.PositionId)
+		if list != nil && len(*list) > 0 {
+			for _, v := range *list {
+				bidTimeStr := MC.ObjToString(v["bid_time"])
+				bidEndTimeStr := MC.ObjToString(v["bid_end_time"])
+				bidOpenTimeStr := MC.ObjToString(v["bid_open_time"])
+				updateStatusTimeStr := MC.ObjToString(v["create_date"])
+				beTransferred := true
+				//已终止参标
+				stateInt64 := MC.Int64All(v["state"])
+				if stateInt64 < 0 {
+					beTransferred = false
+				}
+				var bidTime, bidEndTime, bidOpenTime, updateStatusTime int64
+				if bidTimeStr != "" {
+					bidTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidTimeStr, time.Local)
+					bidTime = bidTime_.Unix()
+				}
+				if bidEndTimeStr != "" {
+					bidEndTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidEndTimeStr, time.Local)
+					bidEndTime = bidEndTime_.Unix()
+					//招标结束时间小于当前时间
+					if beTransferred && bidEndTime > 0 && bidEndTime < time.Now().Unix() {
+						beTransferred = false
+					}
+				}
+				if bidOpenTimeStr != "" {
+					bidOpenTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidOpenTimeStr, time.Local)
+					bidOpenTime = bidOpenTime_.Unix()
+					//招标开始时间小于当前时间
+					if beTransferred && bidOpenTime > 0 && bidOpenTime < time.Now().Unix() {
+						beTransferred = false
+					}
+				}
+				if updateStatusTimeStr != "" {
+					updateStatusTime_, _ := time.ParseInLocation(date.Date_Full_Layout, updateStatusTimeStr, time.Local)
+					updateStatusTime = updateStatusTime_.Unix()
+				}
+				data.List = append(data.List, &bxcore.ParticipateList{
+					Id:               encrypt.EncodeArticleId2ByCheck(MC.ObjToString(v["id"])),
+					ProjectName:      MC.ObjToString(v["name"]),
+					Buyer:            MC.ObjToString(v["buyer"]),
+					Budget:           MC.ObjToString(v["budget"]),
+					BidTime:          bidTime,
+					BidEndTime:       bidEndTime,
+					BidOpenTime:      bidOpenTime,
+					UpdateStatusTime: updateStatusTime,
+					State:            stateInt64,
+					BeTransferred:    beTransferred, //是否能划转
+					//UpdateStatusCon:  GetParticipateContent("s", in.PositionId, MC.ObjToString(v["id"])), //查询最后一次 投标状态更新,
+				})
+			}
+			return data, nil
+		}
+		return nil, fmt.Errorf("数据异常")
+	}
+	return data, nil
+}
+
+// 管理员获取参标列表数据
+func AdminParticipateList(in *bxcore.ParticipateListReq, conditionSql string) (data *bxcore.ParticipateData, err error) {
+	defer MC.Catch()
+	data = &bxcore.ParticipateData{
+		IsAllow: IsALLow(in.EntId),
+		NowTime: time.Now().Unix(),
+		Count:   0,
+		List:    []*bxcore.ParticipateList{},
+	}
+	adminSql := `SELECT %s FROM (SELECT pu.ent_id, pu.project_id, GROUP_CONCAT(pu.ent_user_id SEPARATOR ',') ent_user_id,MAX(pu.state) state FROM ` + ParticipateUserTable + ` pu WHERE pu.ent_id = ? AND NOT EXISTS ( SELECT 1 FROM ` + ParticipateUserTable + ` ppu WHERE ppu.project_id = pu.project_id AND ppu.ent_id = pu.ent_id AND ppu.state > pu.state ) GROUP BY pu.project_id ) pug LEFT JOIN project pt ON pug.project_id = pt.id LEFT JOIN (SELECT project_id,ent_id,MAX(create_date) AS create_date FROM participate_bid_records GROUP BY project_id,ent_id) pbr ON pbr.project_id = pug.project_id AND pbr.ent_id = pug.ent_id  WHERE 1=1 `
+	//maxStateSql := ``
+	//stateSql := ``
+	//if in.EntUserIds == "" {
+	//	//maxStateSql = `,MAX(pu.state) state`
+	//	stateSql = ``
+	//}
+	//adminSql = fmt.Sprintf(adminSql, "%s", stateSql)
+	adminCountSql := fmt.Sprintf(adminSql, "COUNT(pt.id)") + conditionSql
+	log.Println(adminCountSql)
+	count := IC.BaseMysql.CountBySql(adminCountSql, in.EntId)
+	if count > 0 {
+		data.Count = count
+		adminListSql := fmt.Sprintf(adminSql, " pt.*, pug.ent_user_id,pbr.create_date,pug.state ") + conditionSql + fmt.Sprintf(" LIMIT %d,%d", in.PageNum, in.PageSize)
+		list := IC.BaseMysql.SelectBySql(adminListSql, in.EntId)
+		if list != nil && len(*list) > 0 {
+			for _, v := range *list {
+				bidTimeStr := MC.ObjToString(v["bid_time"])
+				bidEndTimeStr := MC.ObjToString(v["bid_end_time"])
+				bidOpenTimeStr := MC.ObjToString(v["bid_open_time"])
+				updateStatusTimeStr := MC.ObjToString(v["create_date"])
+				beTransferred := true
+				//已终止参标
+				stateInt64 := MC.Int64All(v["state"])
+				if stateInt64 < 0 {
+					beTransferred = false
+				}
+				var bidTime, bidEndTime, bidOpenTime, updateStatusTime int64
+				if bidTimeStr != "" {
+					bidTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidTimeStr, time.Local)
+					bidTime = bidTime_.Unix()
+				}
+				if bidEndTimeStr != "" {
+					bidEndTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidEndTimeStr, time.Local)
+					bidEndTime = bidEndTime_.Unix()
+					//招标结束时间小于当前时间
+					if beTransferred && bidEndTime > 0 && bidEndTime < time.Now().Unix() {
+						beTransferred = false
+					}
+				}
+				if bidOpenTimeStr != "" {
+					bidOpenTime_, _ := time.ParseInLocation(date.Date_Full_Layout, bidOpenTimeStr, time.Local)
+					bidOpenTime = bidOpenTime_.Unix()
+					//招标开始时间小于当前时间
+					if beTransferred && bidOpenTime > 0 && bidOpenTime < time.Now().Unix() {
+						beTransferred = false
+					}
+				}
+				if updateStatusTimeStr != "" {
+					updateStatusTime_, _ := time.ParseInLocation(date.Date_Full_Layout, updateStatusTimeStr, time.Local)
+					updateStatusTime = updateStatusTime_.Unix()
+				}
+
+				data.List = append(data.List, &bxcore.ParticipateList{
+					Id:               encrypt.EncodeArticleId2ByCheck(MC.ObjToString(v["id"])),
+					ProjectName:      MC.ObjToString(v["name"]),
+					Buyer:            MC.ObjToString(v["buyer"]),
+					Budget:           MC.ObjToString(v["budget"]),
+					BidTime:          bidTime,
+					BidEndTime:       bidEndTime,
+					BidOpenTime:      bidOpenTime,
+					UpdateStatusTime: updateStatusTime,
+					State:            stateInt64,
+					BeTransferred:    beTransferred, //是否能划转
+					//UpdateStatusCon:  GetParticipateContent("e", in.EntId, MC.ObjToString(v["id"])), //查询最后一次 投标状态更新
+					Participants: GetParticipateUserName(MC.ObjToString(v["id"]), MC.ObjToString(v["ent_user_id"]), in.EntUserIds != ""), //参标人信息
+				})
+			}
+			return data, nil
+		}
+		return nil, fmt.Errorf("数据异常")
+	}
+	return data, nil
+}
+
+// 获取最新参标 更新内容
+func GetParticipateContent(s string, id int64, projectId string) string {
+	identitySql := `ent_id = ?`
+	if s == "s" {
+		identitySql = `position_id = ?`
+	}
+	recordsSql := `SELECT record_content,record_type FROM ` + ParticipateBidRecordsTable + ` WHERE ` + identitySql + ` AND project_id = ? ORDER BY create_date DESC LIMIT 1;`
+	records := IC.BaseMysql.SelectBySql(recordsSql, id, projectId)
+	if records != nil && len(*records) > 0 {
+		rec := (*records)[0]
+		switch MC.IntAll(rec["record_type"]) {
+		case 0:
+			return MC.ObjToString(rec["record_content"])
+		case 1:
+			recordContent := *MC.ObjToMap(rec["record_content"])
+			rb, err := json.Marshal(recordContent)
+			if err != nil {
+				log.Println(err.Error())
+				return ""
+			}
+			var rc = RecordsContent{
+				After:  PartStatusContent{},
+				Before: PartStatusContent{},
+			}
+			err1 := json.Unmarshal(rb, &rc)
+			if err1 == nil {
+				return rc.Content
+			}
+		}
+	}
+	return ""
+}
+
+// 根据ent_user_id 获取参标人昵称,企业管理员现在都是“我”
+func GetParticipateUserName(projectId, entUserIdsFromData string, b bool) string {
+	if entUserIdsFromData != "" {
+		var userNames []string
+		for _, v := range strings.Split(entUserIdsFromData, ",") {
+			if b {
+				//已终止参标
+				if c := IC.BaseMysql.CountBySql(`SELECT count(id) FROM `+ParticipateUserTable+` WHERE project_id = ? AND ent_user_id = ? AND state <0`, projectId, v); c > 0 {
+					continue
+				}
+			}
+			entUserInfos := IC.MainMysql.SelectBySql(`SELECT * FROM entniche_user WHERE id = ?`, v)
+			if entUserInfos != nil && len(*entUserInfos) > 0 {
+				entUserInfo := (*entUserInfos)[0]
+				if entUserInfo["name"] != nil {
+					if userName := MC.ObjToString(entUserInfo["name"]); userName != "" {
+						userNames = append(userNames, userName)
+					}
+				}
+			}
+		}
+		return strings.Join(userNames, ",")
+	}
+	return ""
+}
+
+// GetBidContentEnt 企业版 获取投标状态更新内容
+func GetBidContentEnt(projectId string, entId int64) *[]map[string]interface{} {
+	// record_type '默认0:参标、划转、取消参标;1:投标状态更新存储'
+	query := "SELECT * FROM " + ParticipateBidRecordsTable + " where project_id=? and ent_id=? and record_type=1 order by create_date desc limit 1; "
+	return IC.BaseMysql.SelectBySql(query, projectId, entId)
+}
+
+// GetBidContentPersonal 个人版 获取投标状态更新内容
+func GetBidContentPersonal(projectId string, positionId int64) *[]map[string]interface{} {
+	query := "SELECT * FROM " + ParticipateBidRecordsTable + " where project_id=? and position_id=? and  record_type=1  order by create_date desc limit 1;"
+	return IC.BaseMysql.SelectBySql(query, projectId, positionId)
+}
+
+// UpdateBidContent 更新投标状态信息以及操作记录
+func UpdateBidContent(recordData map[string]interface{}) (flag bool) {
+	r2 := IC.BaseMysql.Insert(ParticipateBidRecordsTable, recordData)
+	return r2 > 0
+}
+
+// InsertBidContent 新增投标状态信息及操作记录
+func InsertBidContent(recordData map[string]interface{}) (flag bool) {
+	r2 := IC.BaseMysql.Insert(ParticipateBidRecordsTable, recordData)
+	return r2 > 0
+}
+
+// GetBidRecordsEnt 获取操作记录列表企业
+func GetBidRecordsEnt(projectId string, entId, page, pageSize int64) (rs *[]map[string]interface{}, total int64) {
+	query := "SELECT * FROM " + ParticipateBidRecordsTable + " where project_id=? and ent_id=?   order by create_date desc limit ?,?"
+	countQuery := "SELECT count(id) FROM " + ParticipateBidRecordsTable + " where project_id=? and ent_id=? ;"
+	rs = IC.BaseMysql.SelectBySql(query, projectId, entId, (page-1)*pageSize, pageSize)
+	total = IC.BaseMysql.CountBySql(countQuery, projectId, entId)
+	return rs, total
+}
+
+// GetBidRecordsPersonal 获取操作记录列表个人
+func GetBidRecordsPersonal(projectId string, positionId, page, pageSize int64) (rs *[]map[string]interface{}, total int64) {
+	query := "SELECT * FROM " + ParticipateBidRecordsTable + " where project_id=? and position_id=?   order by create_date desc limit ?,?;"
+	countQuery := "SELECT count(id) FROM " + ParticipateBidRecordsTable + " where project_id=? and position_id=? ;"
+	rs = IC.BaseMysql.SelectBySql(query, projectId, positionId, (page-1)*pageSize, pageSize)
+	total = IC.BaseMysql.CountBySql(countQuery, projectId, positionId)
+	return rs, total
+}
+
+// GetUserMap 查询用户id的姓名
+func GetUserMap(userIds string) (rs *[]map[string]interface{}) {
+	query := fmt.Sprintf("select id,name from entniche_user where id in (%s)", userIds)
+	rs = IC.MainMysql.SelectBySql(query)
+	return rs
+}
+
+// CheckParticipateManager 验证项目id是否是该管理员企业下的参标项目
+func CheckParticipateManager(projectId string, entId int64, valid bool) (flag bool) {
+	stateStr := "" // 是否需要验证是正在参标
+	if valid {
+		stateStr = " and state=0"
+	}
+	query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_id=?" + stateStr
+	return IC.BaseMysql.CountBySql(query, projectId, entId) > 0
+}
+
+// CheckParticipateEntUser 验证项目id是否是该企业用户参标的项目
+func CheckParticipateEntUser(projectId string, entUserId int64, valid bool) (flag bool) {
+	stateStr := "" // 是否需要验证是正在参标
+	if valid {
+		stateStr = " and state=0"
+	}
+	query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_user_id=?" + stateStr
+	return IC.BaseMysql.CountBySql(query, projectId, entUserId) > 0
+
+}
+
+// CheckParticipatePersonal 查询项目id是否是该用户参标项目
+func CheckParticipatePersonal(projectId string, positionId int64, valid bool) (flag bool) {
+	stateStr := "" // 是否需要验证是正在参标 终止参标的用户还能查看记录,但是不能更新状态
+	if valid {
+		stateStr = " and state=0"
+	}
+	query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and position_id=?" + stateStr
+	return IC.BaseMysql.CountBySql(query, projectId, positionId) > 0
+}
+
+// GetNameByUserIds 获取用户名字符串
+//
+//	参数:逗号分割的用户id "11,22,333..."
+//	返回: "张三,李四,王五..."
+func GetNameByUserIds(ids string) *[]map[string]interface{} {
+	query := "select  group_concat(name) as name  from " + EntnicheUserTable + " where id in (" + ids + ") "
+	rs := IC.MainMysql.SelectBySql(query)
+	return rs
+}
+
+// ParticipateProjectPersonal 查询给定项目id中已经参标的项目id
+func ParticipateProjectPersonal(positionId int64, projectId []string) *[]map[string]interface{} {
+	// 1. 查询出已经参标的
+	var arg []string
+	var value []interface{}
+	value = append(value, positionId)
+	for i := 0; i < len(projectId); i++ {
+		arg = append(arg, "?")
+		value = append(value, projectId[i])
+	}
+	argStr := strings.Join(arg, ",")
+	query := "select project_id from " + ParticipateUserTable + " where position_id = ? and project_id in (%s)  and state=0"
+	rs := IC.BaseMysql.SelectBySql(fmt.Sprintf(query, argStr), value...)
+	return rs
+}
+
+// ParticipateProjectEnt 查询给定项目id中已经参标的项目id
+func ParticipateProjectEnt(entId int64, projectId []string) *[]map[string]interface{} {
+	// 1. 查询出已经参标的
+	var arg []string
+	var value []interface{}
+	value = append(value, entId)
+	for i := 0; i < len(projectId); i++ {
+		arg = append(arg, "?")
+		value = append(value, projectId[i])
+	}
+	argStr := strings.Join(arg, ",")
+	query := "select GROUP_CONCAT(ent_user_id) as personIds ,project_id from " + ParticipateUserTable + " where ent_id=? and  project_id in (%s) and state=0  group by project_id "
+	rs := IC.BaseMysql.SelectBySql(fmt.Sprintf(query, argStr), value...)
+	return rs
+}
+
+// 查询企业人员信息
+func GetPersonInfo(entId, entUserId int64, participateMap map[int64]bool) []*bxcore.ParticipatePerson {
+	r := IC.MainMysql.SelectBySql(`SELECT a.id,a.pid,a.name,c.id as user_id,c.name as user_name,c.phone as user_phone,c.power as user_power,e.name as role from entniche_department a 
+			INNER JOIN entniche_department_user b on (a.ent_id=? and a.id=b.dept_id) 
+			INNER JOIN entniche_user c on (b.user_id=c.id) 
+			LEFT JOIN entniche_user_role d on (c.id=d.user_id) 
+			LEFT JOIN entniche_role e on (d.role_id=e.id) 
+			order by a.id,convert(c.name using gbk) COLLATE gbk_chinese_ci asc`, entId)
+	var (
+		list   []*bxcore.ParticipatePerson
+		prevId int64 = 0
+	)
+	for _, v := range *r {
+		//if entUserId == MC.Int64All(v["user_id"]) {
+		//	continue
+		//}
+		id := MC.Int64All(v["id"])
+		userId := strconv.FormatInt(MC.Int64All(v["user_id"]), 10)
+		user := &bxcore.ParticipatePerson{
+			Id:    encrypt.SE.Encode2HexByCheck(userId),
+			Power: MC.Int64All(v["user_power"]),
+			Name:  MC.ObjToString(v["user_name"]),
+			Phone: MC.ObjToString(v["user_phone"]),
+			Role:  MC.ObjToString(v["role"]),
+		}
+		if participateMap != nil {
+			if participateMap[MC.Int64All(v["user_id"])] {
+				user.IsPart = 1
+			}
+		}
+		if prevId == id {
+			users := list[len(list)-1].Users
+			users = append(users, user)
+			list[len(list)-1].Users = users
+		} else {
+			seId := strconv.FormatInt(id, 10)
+			list = append(list, &bxcore.ParticipatePerson{
+				Id:    encrypt.SE.Encode2HexByCheck(seId),
+				Name:  MC.ObjToString(v["name"]),
+				Pid:   MC.Int64All(v["pid"]),
+				Users: []*bxcore.ParticipatePerson{user},
+			})
+		}
+		prevId = id
+	}
+	return list
+}
+
+// 是否允许多人参标
+func IsALLow(entId int64) bool {
+	return GetParticipateIsAllow(map[string]interface{}{
+		"i_entid": entId,
+	})
+}

+ 264 - 0
jyBXCore/rpc/service/participate.go

@@ -0,0 +1,264 @@
+package service
+
+import (
+	MC "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"fmt"
+	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/model/mysql"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+	"log"
+	"strconv"
+	"strings"
+	"time"
+)
+
+// 我的参标项目|企业参标项目 列表
+func ParticipateList(in *bxcore.ParticipateListReq) (*bxcore.ParticipateListRes, error) {
+	defer MC.Catch()
+	res := &bxcore.ParticipateListRes{Data: &bxcore.ParticipateData{}}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b || (in.Identity == "ent" && entRoleId == 0) {
+		res.ErrCode = 0
+		res.ErrMsg = "没有权限"
+		return res, nil
+	}
+	if in.PositionType > 0 {
+		if entRoleId == 0 {
+			in.EntUserIds = ""
+		}
+	}
+	if in.PageNum < 1 {
+		in.PageNum = 1
+	}
+	in.PageNum = (in.PageNum - 1) * in.PageSize
+	if in.PageSize < 1 {
+		in.PageSize = 10
+	}
+	log.Println(in.PageNum, "------", in.PageSize)
+	switch in.Identity {
+	case "mine": //员工|个人列表
+		r, e := mysql.SingleParticipateList(in, mysql.ParticipateListSql(in))
+		if e != nil {
+			res.ErrCode = -1
+			res.ErrMsg = e.Error()
+			return res, nil
+		}
+		res.Data = r
+	case "ent": //企业管理员
+		r, e := mysql.AdminParticipateList(in, mysql.ParticipateListSql(in))
+		if e != nil {
+			res.ErrCode = -1
+			res.ErrMsg = e.Error()
+			return res, nil
+		}
+		res.Data = r
+	}
+	return res, nil
+}
+
+/*
+已过投标截止日期项目
+(1)	不显示终止投标倒计时
+(2)	显示参标人信息
+(3)	无终止参标操作入口
+(4)	不能划转
+(5)	不能参标
+*/
+
+// 参标动作:参标、终止参标、划转:in:参标;out:终止参标;transfer:划转
+func ParticipateDo(in *bxcore.ParticipateActionReq) error {
+	defer MC.Catch()
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		return fmt.Errorf("暂无权限")
+	}
+	//企业版 判断是否是管理员
+	//判断用户身份
+	switch in.ActionType {
+	case "in": //参标针对单个招标信息 或者 项目
+		if in.BidIds == "" && in.ProjectIds == "" {
+			return fmt.Errorf("缺少参数")
+		}
+		if err := GetProjectInfoByES(in); err != nil {
+			return err
+		}
+		//是否允许多人参标
+		if isAllow := mysql.IsALLow(in.EntId); !isAllow {
+			if entUserName := mysql.IsParticipatedByBidId(in); entUserName != "" {
+				return fmt.Errorf(fmt.Sprintf("该项目已被 %s 参标", entUserName))
+			}
+		}
+		//保存参标信息  更新当前企业参标项目记录
+		if err := mysql.SaveParticipateInfo(in); err != nil {
+			return err
+		}
+	case "out": //终止参标
+		if in.BidIds == "" && in.ProjectIds == "" {
+			return fmt.Errorf("缺少参数")
+		}
+		if err := GetProjectInfoByES(in); err != nil {
+			return err
+		}
+		if err := mysql.CancelParticipateInfo(in, entRoleId); err != nil {
+			return err
+		}
+	case "transfer":
+		//PC端 多个项目-》一个人
+		//移动端  一个项目-》多个人
+		if in.ProjectIds == "" {
+			return fmt.Errorf("项目信息有误")
+		}
+		//个人版
+		if in.PositionType == 0 {
+			return fmt.Errorf("当前企业身份有误")
+		}
+		//非管理员
+		if entRoleId == 0 { //1:企业管理员;2:部门管理员
+			return fmt.Errorf("当前企业身份无权限")
+		}
+		//判断划转人
+		if in.ToEntUserId == "" {
+			return fmt.Errorf("划转对象不能为空")
+		}
+		//是否保留原跟踪人?
+		isAllow := mysql.IsALLow(in.EntId)
+		if (in.IsRetain || len(strings.Split(in.ToEntUserId, ",")) > 1) && !isAllow {
+			//不允许多人参标,但是前端参数又是保留原参标人 互相矛盾
+			return fmt.Errorf("当前项目只允许一人参标")
+		}
+		//in.ProjectIds //项目id
+		projectIds := strings.Split(in.ProjectIds, ",")
+		projectNum := 0
+		for _, v := range projectIds {
+			projectId := encrypt.DecodeArticleId2ByCheck(v)[0]
+			if projectId == "" {
+				continue
+			}
+			if err := mysql.TransferParticipateInfo(projectId, in); err != nil {
+				log.Println(fmt.Sprintf("是否允许多人参标:%v, 项目id:%s,企业id:%d,划转对象entuserid:%s,划转异常:", isAllow, projectId, in.EntId, in.ToEntUserId))
+				continue
+			}
+			projectNum += 1
+		}
+		if projectNum == 0 { //!= len(projectIds)
+			return fmt.Errorf("划转失败")
+		}
+	}
+	return nil
+}
+
+// 参标设置更新及设置内容
+func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.ParticipateSetUpInfoRes, error) {
+	defer MC.Catch()
+	res := &bxcore.ParticipateSetUpInfoRes{Data: &bxcore.ParticipateSetUpInfo{
+		IsAllow:    0,
+		BidType:    nil,
+		RemindRule: nil,
+	}}
+	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
+	if !b {
+		res.ErrMsg = "没有权限"
+		res.Data = nil
+		res.ErrCode = 0
+	} else {
+		switch in.SetAction {
+		case "U": //update 更新设置信息
+			res.Data = nil
+			if entRoleId == 0 || entRoleId == 2 { //只有企业管理员有权限
+				res.ErrCode = -1
+				res.ErrMsg = "当前企业身份无权限"
+			}
+			if err := mysql.UpdateParticipateSetInfo(in); err != nil {
+				res.ErrCode = -1
+				res.ErrMsg = err.Error()
+			}
+		default: //默认查询对应设置信息
+			//查询对应用户设置信息
+			//未设置过 返回默认配置
+			if info, err := mysql.GetParticipateSetInfo(in); err == nil {
+				info.IsShow = MC.If(entRoleId == 1, entRoleId, int64(-1)).(int64)
+				res.Data = info
+			} else {
+				res.ErrCode = -1
+				res.ErrMsg = err.Error()
+			}
+		}
+	}
+	return res, nil
+}
+
+// 参标企业人员信息
+func GetParticipatePersonInfo(in *bxcore.ParticipatePersonsReq) *bxcore.ParticipatePersonsRes {
+	var (
+		participateMap = map[int64]bool{}
+	)
+	if in.ProjectId != "" {
+		in.ProjectId = encrypt.DecodeArticleId2ByCheck(in.ProjectId)[0]
+		if in.ProjectId != "" {
+			participateInfos := mysql.ParticipateProjectEnt(in.EntId, strings.Split(in.ProjectId, ","))
+			if participateInfos != nil && len(*participateInfos) > 0 {
+				participateInfo := (*participateInfos)[0]
+				personIds := MC.ObjToString(participateInfo["personIds"])
+				if personIds != "" {
+					for _, p := range strings.Split(personIds, ",") {
+						personId, _ := strconv.ParseInt(p, 10, 64)
+						participateMap[personId] = true
+					}
+				}
+			}
+		}
+	}
+	//查询企业人员信息
+	personInfos := mysql.GetPersonInfo(in.EntId, in.EntUserId, participateMap)
+	return &bxcore.ParticipatePersonsRes{
+		Data: personInfos,
+	}
+}
+
+// 获取项目信息
+func GetProjectInfoByES(in *bxcore.ParticipateActionReq) error {
+	//参标和终止参标 单个项目;不进行批量操作
+	in.ProjectIds = MC.If(in.ProjectIds != "", in.ProjectIds, in.BidIds).(string)
+	var (
+		tip = "参标"
+	)
+	switch in.ActionType {
+	case "out":
+		tip = "终止参标"
+		//case "transfer":
+		//	tip = "划转"
+	}
+	in.ProjectIds = strings.Split(in.ProjectIds, ",")[0]
+	in.ProjectIds = encrypt.DecodeArticleId2ByCheck(in.ProjectIds)[0]
+	if in.ProjectIds == "" {
+		return fmt.Errorf("当前招标信息有误")
+	}
+	//当前项目是否符合参标条件
+	//根据项目id查询project
+	projectInfos := es.GetBidInfoByPId(in.ProjectIds)
+	if projectInfos == nil || len(*projectInfos) == 0 {
+		//当前项目是否符合参标条件
+		//根据招标信息id 查询bidding
+		projectInfos = es.GetProjectByInfoId(strings.Split(in.ProjectIds, ","))
+		if projectInfos == nil || len(*projectInfos) == 0 {
+			return fmt.Errorf(fmt.Sprintf("当前项目信息不满足%s条件", tip))
+		}
+	}
+	if projectInfos != nil && len(*projectInfos) > 0 {
+		//符合参标项目id
+		projectInfo := (*projectInfos)[0]
+		if projectInfo["_id"] != nil && MC.ObjToString(projectInfo["_id"]) != "" {
+			bidEndTime := MC.Int64All(projectInfo["bidendtime"])           //1292126400:2010.12.12
+			if bidEndTime > 1292126400 && bidEndTime < time.Now().Unix() { //招标结束时间已到期
+				return fmt.Errorf("招标时间已结束")
+			}
+			//项目信息id
+			in.ProjectIds = MC.ObjToString(projectInfo["_id"])
+		} else {
+			return fmt.Errorf("当前项目信息有误")
+		}
+	}
+	return nil
+}

+ 587 - 0
jyBXCore/rpc/service/participateBid.go

@@ -0,0 +1,587 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	"encoding/json"
+	"fmt"
+	"github.com/gogf/gf/v2/container/gset"
+	"jyBXCore/rpc/model/mysql"
+	"jyBXCore/rpc/type/bxcore"
+	"jyBXCore/rpc/util"
+	"log"
+	"strings"
+	"time"
+)
+
+const (
+	PositionTypeEnt      = 1 // 职位类型企业
+	PositionTypePersonal = 0 // 职位类型个人
+
+	ButtonValueParticipate  = 0 // 参标按钮 显示值 0-参标
+	ButtonValueParticipated = 1 // 按钮显示值 列表页面 1-已参标
+
+	RoleEntManager    = 1 //  企业管理员角色
+	RoleDepartManager = 2 //  部门管理员角色
+
+	BidTypeDirect = 1 //  直接投标
+	BidTypeChanel = 2 //  渠道投标
+
+	RecordTypeBidStatus = 1 //  存储类型 1:投标状态更新
+
+)
+
+type ParticipateBid struct {
+	EntId        int64
+	EntUserId    int64
+	PositionType int64
+	PositionId   int64
+	EntRoleId    int64 // 角色
+}
+
+func NewParticipateBid(entId, entUserId, positionType, positionId int64) ParticipateBid {
+	return ParticipateBid{
+		EntId:        entId,
+		EntUserId:    entUserId,
+		PositionType: positionType,
+		PositionId:   positionId,
+	}
+}
+
+// PersonalExistProject 个人版要展示的参标按钮  查询出已经参标的项目信息 用于后边格式化数据
+func (p *ParticipateBid) PersonalExistProject(projectId []string) map[string]struct{} {
+	rs := mysql.ParticipateProjectPersonal(p.PositionId, projectId)
+	existProjectSet := map[string]struct{}{}
+	if rs != nil && len(*rs) > 0 { // 如果查到了  说明已经参标 这部分应该显示已参标
+		// 处理成map
+		for i := 0; i < len(*rs); i++ {
+			existId := common.ObjToString((*rs)[i]["project_id"])
+			existProjectSet[existId] = struct{}{}
+		}
+	}
+	return existProjectSet
+}
+
+// ListPersonalFormat 列表页个人版 参标按钮 格式化数据
+func (p *ParticipateBid) ListPersonalFormat(existProjectSet map[string]struct{}, infoM map[string]string) []*bxcore.ShowInfo {
+	// 处理成 要返回的返回数据
+	var formatList []*bxcore.ShowInfo
+	for k, v := range infoM {
+		buttonValue := ButtonValueParticipate // 不存在应该显示参标
+		if _, ok := existProjectSet[v]; ok {  // 存在说明应该显示已参标
+			buttonValue = ButtonValueParticipated
+		}
+		formatList = append(formatList, &bxcore.ShowInfo{
+			Id:    encrypt.EncodeArticleId2ByCheck(k),
+			Value: int64(buttonValue),
+		})
+	}
+	return formatList
+}
+
+// EntExistProject 企业版 查出来企业下已经参标的这个项目的以及参标人信息  用于后边格式化数据判断有没有自己
+func (p *ParticipateBid) EntExistProject(projectId []string) map[string]string {
+	rs := mysql.ParticipateProjectEnt(p.EntId, projectId)
+	existProjectMap := map[string]string{}
+	if rs != nil && len(*rs) > 0 { // 如果查到了  说明这个项目公司里面已经参标 处理一下信息用于后边判断是否是自己参标
+		// 处理成map
+		for i := 0; i < len(*rs); i++ {
+			existId := common.ObjToString((*rs)[i]["project_id"])
+			personIds := common.ObjToString((*rs)[i]["personIds"])
+			existProjectMap[existId] = personIds
+		}
+	}
+	return existProjectMap
+}
+
+// ListEntFormat 企业版 列表页数据格式化
+func (p *ParticipateBid) ListEntFormat(existProjectMap, infoM map[string]string, isAllow bool) []*bxcore.ShowInfo {
+	// 处理成 要返回的返回数据
+	var formatList []*bxcore.ShowInfo
+	for k, v := range infoM {
+		buttonValue := ButtonValueParticipate      // 不存在时-显示参标
+		if userIds, ok := existProjectMap[v]; ok { // 存在时 说明项目在企业下已经参标 需要进一步判断
+			// 判断已经存在的参标人中是否包含自己  包含时 显示成已参标
+			if ContainId(userIds, common.InterfaceToStr(p.EntUserId)) {
+				buttonValue = ButtonValueParticipated
+			} else if isAllow { // 不包含自己时需要 进一步判断公司设置是否允许多人参标
+				// 允许时显示成 参标
+				buttonValue = ButtonValueParticipate
+			} else { // 不允许时 跳过该条信息
+				continue
+			}
+
+		}
+		formatList = append(formatList, &bxcore.ShowInfo{
+			Id:    encrypt.EncodeArticleId2ByCheck(k),
+			Value: int64(buttonValue),
+		})
+	}
+	return formatList
+
+}
+
+// DetailEntFormat 企业版 详情页数据格式化  返回数据 参标按钮 终止参标按钮 转给同事按钮 参标人姓名
+func (p *ParticipateBid) DetailEntFormat(existProjectMap map[string]string, isValid, isAllow bool, bidEndTime int64) (formatData *bxcore.ParticipateDetailInfo) {
+	// 处理成 要返回的返回数据
+	formatData = &bxcore.ParticipateDetailInfo{}
+	if len(existProjectMap) == 0 && isValid {
+		//  无参标人   展示参标按钮   其余按钮不显示
+		formatData.ShowParticipate = true
+		return
+	}
+	persons := ""
+	for _, v := range existProjectMap { // 这是为了取参标人id信息 列表页是多条数据 详情页这里 map里面只会有一条数据
+		persons = v
+		break
+	}
+	// 参标人信息 处理成姓名
+	nameRs := mysql.GetNameByUserIds(persons)
+	if nameRs != nil && len(*nameRs) > 0 {
+		formatData.UserName = common.ObjToString((*nameRs)[0]["name"])
+	}
+	if !isValid {
+		return
+	}
+	formatData.CurrentTime = time.Now().Unix()
+	formatData.BidEndTime = bidEndTime
+	// 如果是管理员 显示 终止参标按钮、转给同事按钮
+	if p.EntRoleId == RoleEntManager || p.EntRoleId == RoleDepartManager {
+		formatData.ShowStopParticipate = true
+		formatData.ShowTransfer = true
+	}
+	// 如果包含自己 显示终止参标按钮
+	if ContainId(persons, common.InterfaceToStr(p.EntUserId)) {
+		formatData.ShowStopParticipate = true
+		formatData.ShowUpdate = true
+	} else if isAllow { // 如果允许多人 显示参标按钮
+		formatData.ShowParticipate = true
+	}
+	return
+
+}
+
+// DetailPersonalFormat 详情页个人版 按钮格式化数据
+func (p *ParticipateBid) DetailPersonalFormat(existProjectSet map[string]struct{}, isValid bool, bidEndTime int64) (formatData *bxcore.ParticipateDetailInfo) {
+	// 处理成 要返回的返回数据
+	formatData = &bxcore.ParticipateDetailInfo{}
+	if !isValid {
+		return
+	}
+	// 存在在说明已经参标  显示终止参标
+	if len(existProjectSet) > 0 {
+		formatData.CurrentTime = time.Now().Unix()
+		formatData.BidEndTime = bidEndTime
+		formatData.ShowStopParticipate = true
+		formatData.ShowUpdate = true
+	} else {
+		// 不存在则说明 未参标 参标按钮展示
+		formatData.ShowParticipate = true
+	}
+	return
+}
+
+// HandlerProjectId 返回信息的映射集合,项目id列表
+func HandlerProjectId(projectInfos []map[string]interface{}, infoIds map[string]struct{}) (map[string]string, []string) {
+	result := map[string]string{}
+	projectIdList := []string{}
+	//  记录infoid 和项目id 对应关系  用于最后处理返回的数据
+	for i := 0; i < len(projectInfos); i++ {
+		_id := common.ObjToString(projectInfos[i]["_id"])
+		projectIdList = append(projectIdList, _id)
+		list, b := projectInfos[i]["list"].([]interface{})
+		if !b {
+			continue
+		}
+		for j := 0; j < len(list); j++ {
+			infoidMap := common.ObjToMap(list[j])
+			if infoidMap == nil {
+				continue
+			}
+			infoid := common.ObjToString((*infoidMap)["infoid"])
+			if _, ok := infoIds[infoid]; ok && infoid != "" {
+				result[infoid] = _id
+			}
+		}
+	}
+	return result, projectIdList
+
+}
+
+// DecodeId  解密标讯id 返回一个信息id的列表 和 集合
+func DecodeId(ids string) (result []string, resultSet map[string]struct{}) {
+	idList := strings.Split(ids, ",")
+	resultSet = map[string]struct{}{}
+	for i := 0; i < len(idList); i++ {
+		decodeArray := encrypt.DecodeArticleId2ByCheck(idList[i])
+		if len(decodeArray) == 1 && decodeArray[0] != "" {
+			result = append(result, decodeArray[0])
+			resultSet[decodeArray[0]] = struct{}{}
+		}
+	}
+	return
+}
+
+// ContainId 用于判断给定的逗号分割的字符串中是否包含 目标的字符串
+func ContainId(ids string, objId string) bool {
+	list := strings.Split(ids, ",")
+	for i := 0; i < len(list); i++ {
+		if list[i] == objId {
+			return true
+		}
+	}
+	return false
+}
+
+// CheckBidPower 查看记录 验证权限(参标人或者是该企业下的管理员)
+func (p *ParticipateBid) CheckBidPower(projectId string, valid bool) (b bool) {
+	switch p.PositionType {
+	case PositionTypePersonal:
+		// 查个人id
+		b = mysql.CheckParticipatePersonal(projectId, p.PositionId, valid)
+	case PositionTypeEnt:
+		// 查企业
+		if p.EntRoleId == RoleEntManager || p.EntRoleId == RoleDepartManager {
+			b = mysql.CheckParticipateManager(projectId, p.EntId, valid)
+		} else {
+			// 查参标人
+			b = mysql.CheckParticipateEntUser(projectId, p.EntUserId, valid)
+		}
+	}
+	return
+}
+
+// CheckUpdateBidPower 验证投标状态更新权限
+func (p *ParticipateBid) CheckUpdateBidPower(projectId string, valid bool) (b bool) {
+	switch p.PositionType {
+	case PositionTypePersonal:
+		// 查个人id
+		b = mysql.CheckParticipatePersonal(projectId, p.PositionId, valid)
+	case PositionTypeEnt:
+		// 查参标人
+		b = mysql.CheckParticipateEntUser(projectId, p.EntUserId, valid)
+	}
+	return
+}
+
+// UpdateBidStatus 更新投标状态
+func (p *ParticipateBid) UpdateBidStatus(in *bxcore.UpdateBidStatusReq, projectId string) error {
+	if p.PositionType == PositionTypeEnt {
+		pLock := util.GetParticipateLock(fmt.Sprintf("%d_%s", p.EntId, projectId))
+		pLock.Lock()
+		defer pLock.Unlock()
+	}
+	// 如果查出来旧的 那么就需要做新旧对比
+	oldMap, _ := p.GetLastBidStatus(projectId) // 查询出最新的招标状态信息
+	// 新的
+	if in.BidStage == nil {
+		in.BidStage = []string{}
+	}
+	newMap := map[string]interface{}{
+		"bidType":       in.BidType,
+		"bidStage":      in.BidStage,
+		"isWin":         in.IsWin,
+		"channelName":   in.ChannelName,
+		"channelPerson": in.ChannelPerson,
+		"channelPhone":  in.ChannelPhone,
+		"winner":        in.Winner,
+	}
+	// 新旧对比 处理成要保存的字段
+	recordContent, err := processRecordStr(oldMap, newMap)
+	if err != nil {
+		return err
+	}
+	// 保存
+	recordData := map[string]interface{}{
+		"ent_id":         p.EntId,
+		"ent_user_id":    p.EntUserId,
+		"position_id":    p.PositionId,
+		"project_id":     projectId,
+		"record_content": recordContent,
+		"record_type":    RecordTypeBidStatus,
+		"create_date":    date.NowFormat(date.Date_Full_Layout),
+	}
+	if flag := mysql.InsertBidContent(recordData); !flag {
+		return fmt.Errorf("更新失败")
+	}
+	return nil
+
+}
+
+// GetLastBidStatus 获取投标状态信息
+func (p *ParticipateBid) GetLastBidStatus(projectId string) (map[string]interface{}, error) {
+	var (
+		rs = map[string]interface{}{}
+		// 查询项目投标信息 区分企业和个人
+		result *[]map[string]interface{}
+	)
+	switch p.PositionType {
+	case PositionTypeEnt:
+		result = mysql.GetBidContentEnt(projectId, p.EntId)
+	case PositionTypePersonal:
+		result = mysql.GetBidContentPersonal(projectId, p.PositionId)
+	}
+	if rs != nil && len(*result) > 0 {
+		content := common.ObjToMap((*result)[0]["record_content"])
+		if content != nil {
+			bidStatus := common.ObjToMap((*content)["after"])
+			if bidStatus != nil {
+				rs = *bidStatus
+			}
+		}
+	}
+	return rs, nil
+
+}
+func (p ParticipateBid) ParticipateContentFormat(data map[string]interface{}) (rs bxcore.ParticipateContentData) {
+	if len(data) == 0 {
+		return
+	}
+	rs.BidType = common.Int64All(data["bidType"])
+	rs.ChannelPhone = common.ObjToString(data["channelPhone"])
+	rs.ChannelPerson = common.ObjToString(data["channelPerson"])
+	rs.ChannelName = common.ObjToString(data["channelName"])
+	rs.IsWin = common.Int64All(data["isWin"])
+	rs.Winner = common.ObjToString(data["winner"])
+	tmp := data["bidStage"].([]interface{})
+	rs.BidStage = common.ObjArrToStringArr(tmp)
+
+	return rs
+}
+
+// GetBidRecords 获取操作记录
+func (p *ParticipateBid) GetBidRecords(projectId string, page, pageSize int64) *bxcore.ParticipateRecordsData {
+	data := bxcore.ParticipateRecordsData{}
+	var rs *[]map[string]interface{}
+	var total int64
+	switch p.PositionType {
+	case PositionTypeEnt:
+		// 1. 查询出操作记录
+		rs, total = mysql.GetBidRecordsEnt(projectId, p.EntId, page, pageSize)
+	case PositionTypePersonal:
+		//  个人版不展示姓名
+		rs, total = mysql.GetBidRecordsPersonal(projectId, p.PositionId, page, pageSize)
+
+	}
+	if rs == nil || len(*rs) == 0 {
+		return &data
+	}
+	data.Total = total
+	data.List = p.BidRecordsFormat(*rs)
+	return &data
+}
+
+// BidRecordsFormat 获取操作记录格式化
+func (p ParticipateBid) BidRecordsFormat(data []map[string]interface{}) []*bxcore.ParticipateRecords {
+	records := []*bxcore.ParticipateRecords{}
+	switch p.PositionType {
+	case PositionTypeEnt:
+		// 用户id
+		// 拿到所有的用户id
+		userIdArr := []string{}
+		userIdMap := map[int64]string{}
+		for i := 0; i < len(data); i++ {
+			userId := common.Int64All(data[i]["ent_user_id"])
+			if _, ok := userIdMap[userId]; !ok {
+				userIdMap[userId] = ""
+				userIdArr = append(userIdArr, fmt.Sprint(userId))
+			}
+		}
+		// 根据id查询出姓名{id:name}
+		userIdMap = getUserIdName(userIdArr)
+		// 遍历数据  换成姓名
+		for i := 0; i < len(data); i++ {
+			id := common.Int64All(data[i]["ent_user_id"])
+			person := ""
+			if name, ok := userIdMap[id]; ok {
+				person = name
+			}
+			tmp := bxcore.ParticipateRecords{
+				RecordsData:  common.ObjToString(data[i]["record_content"]),
+				UpdateDate:   common.ObjToString(data[i]["create_date"]),
+				UpdatePerson: person,
+				RecordType:   common.Int64All(data[i]["record_type"]),
+			}
+			records = append(records, &tmp)
+		}
+	case PositionTypePersonal:
+		// 遍历数据
+		for i := 0; i < len(data); i++ {
+			tmp := bxcore.ParticipateRecords{
+				RecordsData: common.ObjToString(data[i]["record_content"]),
+				UpdateDate:  common.ObjToString(data[i]["create_date"]),
+				RecordType:  common.Int64All(data[i]["record_type"]),
+			}
+			records = append(records, &tmp)
+		}
+	}
+	return records
+}
+
+// 获取id和姓名的对应关系
+func getUserIdName(userIdArr []string) map[int64]string {
+	rs := map[int64]string{}
+	if len(userIdArr) > 0 {
+		userIdStr := strings.Join(userIdArr, ",")
+		userRs := mysql.GetUserMap(userIdStr)
+		if userRs == nil || len(*userRs) == 0 {
+			return rs
+		}
+		for i := 0; i < len(*userRs); i++ {
+			user := (*userRs)[i]
+			id := common.Int64All(user["id"])
+			name := common.ObjToString(user["name"])
+			rs[id] = name
+		}
+	}
+	return rs
+}
+
+// 处理操作动作
+var (
+	ParticipateBidContentKey = map[string]string{
+		"bidType":       "投标类型",
+		"bidStage":      "投标项目阶段",
+		"isWin":         "是否中标",
+		"channelName":   "渠道名称",
+		"channelPerson": "联系人",
+		"channelPhone":  "联系电话",
+		"winner":        "中标单位",
+	}
+	BidTypeMap = map[int]string{
+		BidTypeDirect: "直接投标",
+		BidTypeChanel: "渠道投标",
+	}
+	WinMap = map[int]string{
+		1: "是",
+		2: "否",
+		0: "未选择",
+	}
+)
+
+// 处理操作记录
+func processRecordStr(oldMap, newMap map[string]interface{}) (recordContent string, err error) {
+	var (
+		actonStr    = "%s%s%s"
+		changeField = []string{}
+		result      = []string{}
+		afterMap    = map[string]interface{}{}
+	)
+	for k, fieldName := range ParticipateBidContentKey {
+		var (
+			value             interface{}
+			status, changeStr string
+		)
+		switch k {
+		case "bidType":
+			oldv := common.IntAll(oldMap[k])
+			newv := common.IntAll(newMap[k])
+			newBidType := BidTypeMap[newv]
+			if newBidType == "" {
+				newBidType = "未选择"
+			}
+			value = newBidType
+			if oldv == newv { // 没有改变
+				afterMap[k] = map[string]interface{}{
+					"status": status,
+					"value":  value,
+				}
+				continue
+			}
+			value = newBidType
+			if oldv == 0 && newv != 0 { // 说明是新增
+				status = "新增"
+				changeStr = fmt.Sprintf(actonStr, fieldName, ": (新增)", newBidType)
+			} else { // 调整
+				status = "调整"
+				changeStr = fmt.Sprintf(actonStr, fieldName, "(调整):", newBidType)
+			}
+		case "isWin":
+			oldV := common.IntAll(oldMap[k])
+			newV := common.IntAll(newMap[k])
+			value = WinMap[newV]
+			if oldV == newV { // 没有改变
+				afterMap[k] = map[string]interface{}{
+					"status": status,
+					"value":  value,
+				}
+				continue
+			}
+			status = "调整"
+			//fieldName := fieldName
+			if common.IntAll(newMap["bidType"]) == BidTypeChanel {
+				fieldName = fmt.Sprintf("%s%s", "渠道", fieldName)
+			}
+			changeStr = fmt.Sprintf(actonStr, fieldName, "(调整) 为", WinMap[newV])
+		case "bidStage":
+			bidAction := "%s%s"
+			bidChangeArr := []string{}
+			oldSet := gset.NewFrom(oldMap[k])
+			newSet := gset.NewFrom(newMap[k])
+			value = newMap[k]
+			// 判断相等
+			if oldSet.Equal(newSet) {
+				afterMap[k] = map[string]interface{}{
+					"status": status,
+					"value":  value,
+				}
+				continue
+			}
+			status = "调整"
+			// 差集计算
+			// 取消勾选的
+			cancleSet := oldSet.Diff(newSet)
+			cancleSet.Iterator(func(v interface{}) bool {
+				bidChangeArr = append(bidChangeArr, fmt.Sprintf(bidAction, "(取消勾选)", v))
+				return true
+			})
+			// 新增的
+			addSet := newSet.Diff(oldSet)
+			addSet.Iterator(func(v interface{}) bool {
+				bidChangeArr = append(bidChangeArr, fmt.Sprintf(bidAction, "(新增)", v))
+				return true
+			})
+			tmpStr := strings.Join(bidChangeArr, " ")
+			changeStr = fmt.Sprintf(actonStr, fieldName, " :", tmpStr)
+		default:
+			oldV := common.ObjToString(oldMap[k])
+			newV := common.ObjToString(newMap[k])
+			value = newV
+			if oldV == newV { // 没有变化
+				afterMap[k] = map[string]interface{}{
+					"status": status,
+					"value":  value,
+				}
+				continue
+			}
+			changeStr = fmt.Sprintf(actonStr, fieldName, "(调整)为", fmt.Sprintf("\"%s\"", newV))
+			status = "调整"
+		}
+		result = append(result, changeStr)
+		changeField = append(changeField, k)
+		afterMap[k] = map[string]interface{}{
+			"status": status,
+			"value":  value,
+		}
+	}
+	b, _ := json.Marshal(afterMap)
+	recordMap := map[string]interface{}{
+		"content":     strings.Join(result, ";"), // 变更内容 文字描述
+		"before":      oldMap,                    // 变更前
+		"after":       newMap,                    // 变更后
+		"changeField": changeField,               // 涉及变更的字段
+		"afterMap":    string(b),                 // 涉及变更内容
+	}
+
+	tmp, err := json.Marshal(recordMap)
+	if err != nil {
+		log.Println("序列化操作记录失败:", err)
+		return "", err
+	}
+	if len(result) == 0 {
+		log.Println("没有更新的内容:", recordContent)
+		err = fmt.Errorf("没有变更的内容,不用更新")
+	}
+	return string(tmp), err
+}

+ 4 - 4
jyBXCore/rpc/service/search.go

@@ -2,11 +2,11 @@ package service
 
 import (
 	MC "app.yhyue.com/moapp/jybase/common"
-	"github.com/zeromicro/go-zero/core/logx"
-	"jyBXCore/rpc/bxcore"
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/type/bxcore"
 	"jyBXCore/rpc/util"
+	"log"
 	"strings"
 	"time"
 )
@@ -45,9 +45,9 @@ func GetBidSearchData(in *bxcore.SearchReq, isCache bool) (count int64, list []*
 			//格式化查询结果
 			list = util.SearchListFormat(in.UserId, in.Industry, repl, strings.Contains(in.SelectType, "detail"))
 		} else {
-			logx.Info("查询数据异常")
+			log.Println("查询数据异常")
 		}
-		logx.Info(in.KeyWords, "关键词 -1- 查询耗时:", time.Since(t).Seconds())
+		log.Println(in.KeyWords, "关键词 -1- 查询耗时:", time.Since(t).Seconds())
 	}
 	return
 }

Fișier diff suprimat deoarece este prea mare
+ 2919 - 2
jyBXCore/rpc/type/bxcore/bxcore.pb.go


+ 343 - 1
jyBXCore/rpc/type/bxcore/bxcore_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: bxcore.proto
 
 package bxcore
@@ -26,6 +26,24 @@ type BxCoreClient interface {
 	GetSearchList(ctx context.Context, in *SearchReq, opts ...grpc.CallOption) (*SearchResp, error)
 	//标讯搜索限制内容
 	SearchLimit(ctx context.Context, in *SearchLimitReq, opts ...grpc.CallOption) (*SearchLimitResp, error)
+	// 列表数据参标信息接口
+	ParticipateShow(ctx context.Context, in *ParticipateShowReq, opts ...grpc.CallOption) (*ParticipateShowRes, error)
+	// 详情页参标信息接口
+	ParticipateInfo(ctx context.Context, in *ParticipateInfoReq, opts ...grpc.CallOption) (*ParticipateInfoRes, error)
+	//  投标状态更新
+	UpdateBidStatus(ctx context.Context, in *UpdateBidStatusReq, opts ...grpc.CallOption) (*UpdateBidStatusRes, error)
+	// 获取投标状态信息
+	ParticipateContent(ctx context.Context, in *ParticipateContentReq, opts ...grpc.CallOption) (*ParticipateContentRes, error)
+	// 参标操作记录
+	ParticipateRecords(ctx context.Context, in *ParticipateRecordsReq, opts ...grpc.CallOption) (*ParticipateRecordsRes, error)
+	// 当前部门/企业下参标人员信息
+	ParticipatePersons(ctx context.Context, in *ParticipatePersonsReq, opts ...grpc.CallOption) (*ParticipatePersonsRes, error)
+	// 参标设置信息
+	ParticipateSetUpInfo(ctx context.Context, in *ParticipateSetUpInfoReq, opts ...grpc.CallOption) (*ParticipateSetUpInfoRes, error)
+	// 项目参标 终止参标 划转等动作
+	ParticipateAction(ctx context.Context, in *ParticipateActionReq, opts ...grpc.CallOption) (*ParticipateActionRes, error)
+	// 我的参标项目列表|企业参标项目列表
+	ParticipateList(ctx context.Context, in *ParticipateListReq, opts ...grpc.CallOption) (*ParticipateListRes, error)
 }
 
 type bxCoreClient struct {
@@ -54,6 +72,87 @@ func (c *bxCoreClient) SearchLimit(ctx context.Context, in *SearchLimitReq, opts
 	return out, nil
 }
 
+func (c *bxCoreClient) ParticipateShow(ctx context.Context, in *ParticipateShowReq, opts ...grpc.CallOption) (*ParticipateShowRes, error) {
+	out := new(ParticipateShowRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateShow", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateInfo(ctx context.Context, in *ParticipateInfoReq, opts ...grpc.CallOption) (*ParticipateInfoRes, error) {
+	out := new(ParticipateInfoRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) UpdateBidStatus(ctx context.Context, in *UpdateBidStatusReq, opts ...grpc.CallOption) (*UpdateBidStatusRes, error) {
+	out := new(UpdateBidStatusRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/UpdateBidStatus", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateContent(ctx context.Context, in *ParticipateContentReq, opts ...grpc.CallOption) (*ParticipateContentRes, error) {
+	out := new(ParticipateContentRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateContent", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateRecords(ctx context.Context, in *ParticipateRecordsReq, opts ...grpc.CallOption) (*ParticipateRecordsRes, error) {
+	out := new(ParticipateRecordsRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateRecords", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipatePersons(ctx context.Context, in *ParticipatePersonsReq, opts ...grpc.CallOption) (*ParticipatePersonsRes, error) {
+	out := new(ParticipatePersonsRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipatePersons", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateSetUpInfo(ctx context.Context, in *ParticipateSetUpInfoReq, opts ...grpc.CallOption) (*ParticipateSetUpInfoRes, error) {
+	out := new(ParticipateSetUpInfoRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateSetUpInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateAction(ctx context.Context, in *ParticipateActionReq, opts ...grpc.CallOption) (*ParticipateActionRes, error) {
+	out := new(ParticipateActionRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateAction", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *bxCoreClient) ParticipateList(ctx context.Context, in *ParticipateListReq, opts ...grpc.CallOption) (*ParticipateListRes, error) {
+	out := new(ParticipateListRes)
+	err := c.cc.Invoke(ctx, "/bxcore.BxCore/ParticipateList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BxCoreServer is the server API for BxCore service.
 // All implementations must embed UnimplementedBxCoreServer
 // for forward compatibility
@@ -62,6 +161,24 @@ type BxCoreServer interface {
 	GetSearchList(context.Context, *SearchReq) (*SearchResp, error)
 	//标讯搜索限制内容
 	SearchLimit(context.Context, *SearchLimitReq) (*SearchLimitResp, error)
+	// 列表数据参标信息接口
+	ParticipateShow(context.Context, *ParticipateShowReq) (*ParticipateShowRes, error)
+	// 详情页参标信息接口
+	ParticipateInfo(context.Context, *ParticipateInfoReq) (*ParticipateInfoRes, error)
+	//  投标状态更新
+	UpdateBidStatus(context.Context, *UpdateBidStatusReq) (*UpdateBidStatusRes, error)
+	// 获取投标状态信息
+	ParticipateContent(context.Context, *ParticipateContentReq) (*ParticipateContentRes, error)
+	// 参标操作记录
+	ParticipateRecords(context.Context, *ParticipateRecordsReq) (*ParticipateRecordsRes, error)
+	// 当前部门/企业下参标人员信息
+	ParticipatePersons(context.Context, *ParticipatePersonsReq) (*ParticipatePersonsRes, error)
+	// 参标设置信息
+	ParticipateSetUpInfo(context.Context, *ParticipateSetUpInfoReq) (*ParticipateSetUpInfoRes, error)
+	// 项目参标 终止参标 划转等动作
+	ParticipateAction(context.Context, *ParticipateActionReq) (*ParticipateActionRes, error)
+	// 我的参标项目列表|企业参标项目列表
+	ParticipateList(context.Context, *ParticipateListReq) (*ParticipateListRes, error)
 	mustEmbedUnimplementedBxCoreServer()
 }
 
@@ -75,6 +192,33 @@ func (UnimplementedBxCoreServer) GetSearchList(context.Context, *SearchReq) (*Se
 func (UnimplementedBxCoreServer) SearchLimit(context.Context, *SearchLimitReq) (*SearchLimitResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SearchLimit not implemented")
 }
+func (UnimplementedBxCoreServer) ParticipateShow(context.Context, *ParticipateShowReq) (*ParticipateShowRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateShow not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateInfo(context.Context, *ParticipateInfoReq) (*ParticipateInfoRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateInfo not implemented")
+}
+func (UnimplementedBxCoreServer) UpdateBidStatus(context.Context, *UpdateBidStatusReq) (*UpdateBidStatusRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UpdateBidStatus not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateContent(context.Context, *ParticipateContentReq) (*ParticipateContentRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateContent not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateRecords(context.Context, *ParticipateRecordsReq) (*ParticipateRecordsRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateRecords not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipatePersons(context.Context, *ParticipatePersonsReq) (*ParticipatePersonsRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipatePersons not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateSetUpInfo(context.Context, *ParticipateSetUpInfoReq) (*ParticipateSetUpInfoRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateSetUpInfo not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateAction(context.Context, *ParticipateActionReq) (*ParticipateActionRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateAction not implemented")
+}
+func (UnimplementedBxCoreServer) ParticipateList(context.Context, *ParticipateListReq) (*ParticipateListRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ParticipateList not implemented")
+}
 func (UnimplementedBxCoreServer) mustEmbedUnimplementedBxCoreServer() {}
 
 // UnsafeBxCoreServer may be embedded to opt out of forward compatibility for this service.
@@ -124,6 +268,168 @@ func _BxCore_SearchLimit_Handler(srv interface{}, ctx context.Context, dec func(
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BxCore_ParticipateShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateShowReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateShow(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateShow",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateShow(ctx, req.(*ParticipateShowReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateInfoReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateInfo(ctx, req.(*ParticipateInfoReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_UpdateBidStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UpdateBidStatusReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).UpdateBidStatus(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/UpdateBidStatus",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).UpdateBidStatus(ctx, req.(*UpdateBidStatusReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateContentReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateContent(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateContent",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateContent(ctx, req.(*ParticipateContentReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateRecordsReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateRecords(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateRecords",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateRecords(ctx, req.(*ParticipateRecordsReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipatePersons_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipatePersonsReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipatePersons(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipatePersons",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipatePersons(ctx, req.(*ParticipatePersonsReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateSetUpInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateSetUpInfoReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateSetUpInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateSetUpInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateSetUpInfo(ctx, req.(*ParticipateSetUpInfoReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateActionReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateAction(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateAction",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateAction(ctx, req.(*ParticipateActionReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BxCore_ParticipateList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ParticipateListReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BxCoreServer).ParticipateList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/bxcore.BxCore/ParticipateList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BxCoreServer).ParticipateList(ctx, req.(*ParticipateListReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // BxCore_ServiceDesc is the grpc.ServiceDesc for BxCore service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -139,6 +445,42 @@ var BxCore_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "SearchLimit",
 			Handler:    _BxCore_SearchLimit_Handler,
 		},
+		{
+			MethodName: "ParticipateShow",
+			Handler:    _BxCore_ParticipateShow_Handler,
+		},
+		{
+			MethodName: "ParticipateInfo",
+			Handler:    _BxCore_ParticipateInfo_Handler,
+		},
+		{
+			MethodName: "UpdateBidStatus",
+			Handler:    _BxCore_UpdateBidStatus_Handler,
+		},
+		{
+			MethodName: "ParticipateContent",
+			Handler:    _BxCore_ParticipateContent_Handler,
+		},
+		{
+			MethodName: "ParticipateRecords",
+			Handler:    _BxCore_ParticipateRecords_Handler,
+		},
+		{
+			MethodName: "ParticipatePersons",
+			Handler:    _BxCore_ParticipatePersons_Handler,
+		},
+		{
+			MethodName: "ParticipateSetUpInfo",
+			Handler:    _BxCore_ParticipateSetUpInfo_Handler,
+		},
+		{
+			MethodName: "ParticipateAction",
+			Handler:    _BxCore_ParticipateAction_Handler,
+		},
+		{
+			MethodName: "ParticipateList",
+			Handler:    _BxCore_ParticipateList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "bxcore.proto",

+ 63 - 0
jyBXCore/rpc/util/participate.go

@@ -0,0 +1,63 @@
+package util
+
+import (
+	"app.yhyue.com/moapp/jybase/redis"
+	"fmt"
+	IC "jyBXCore/rpc/init"
+	"sync"
+)
+
+var (
+	PLock *ParticipateLock
+)
+
+type ParticipateLock struct {
+	sync.Mutex
+	UserLock map[string]*sync.Mutex
+}
+
+func NewParticipateLock() *ParticipateLock {
+	return &ParticipateLock{
+		UserLock: make(map[string]*sync.Mutex),
+	}
+}
+
+func GetParticipateLock(str string) *sync.Mutex {
+	PLock.Lock()
+	if PLock.UserLock[str] == nil {
+		PLock.UserLock[str] = &sync.Mutex{}
+	}
+	PLock.Unlock()
+	return PLock.UserLock[str]
+}
+
+// 参标权限判断
+func IsAllowedParticipate(appId, userId string, newUserId, accountId, entAccountId, entId, entUserId, positionId, positionType int64) (b bool, role int64) {
+	powerCheck := IC.Middleground.PowerCheckCenter.Check(appId, userId, newUserId, accountId, entId, positionType, positionId)
+	//不是超级订阅 也不是大会员
+	if powerCheck.Vip.Status <= 0 && powerCheck.Member.Status <= 0 {
+		return
+	}
+	role = powerCheck.Ent.EntRoleId
+	resource := IC.Middleground.ResourceCenter.Haspowers(accountId, entAccountId, entId, entUserId)
+	if len(resource.Powers) != 0 {
+		for _, r := range resource.Powers {
+			//资源中台 cb_zy_code
+			if r == IC.C.ResourceCode {
+				b = true
+				break
+			}
+		}
+	}
+	return
+}
+
+// 3秒内防止重复提交
+func IsAllowedAccess(key string) string {
+	redisKey := fmt.Sprintf("participate_isAllowed_%s", key)
+	if b, err := redis.Exists("other", redisKey); err != nil && b {
+		return "访问频次过快,请稍后再试"
+	}
+	redis.Put("other", redisKey, key, 3)
+	return ""
+}

+ 42 - 2
jyBXCore/rpc/util/search.go

@@ -13,7 +13,7 @@ import (
 	MC "app.yhyue.com/moapp/jybase/common"
 	ME "app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/es"
-	"github.com/zeromicro/go-zero/core/logx"
+	"log"
 )
 
 var (
@@ -121,7 +121,7 @@ func MakeCollection(userId string, list []*bxcore.SearchList) {
 	param := []interface{}{userId}
 	var wh []string
 	for _, v := range list {
-		logx.Info(v.Title, "---v.id---:", v.Id)
+		log.Println(v.Title, "---v.id---:", v.Id)
 		array := ME.DecodeArticleId2ByCheck(v.Id)
 		if len(array) == 1 && array[0] != "" {
 			param = append(param, array[0])
@@ -299,3 +299,43 @@ func GetPublishTime(y, m int, publishTime string) string {
 	}
 	return ""
 }
+
+// GetQueryItems 免费 标题(title)  正文(content) 老用户【中标企业(winner)】
+// 付费用户 全部(all)、标题(title)  正文(content)  会员: 采购单位(buyer) 中标企业(winner) 招标代理机构(agency) 附件(file)
+// 项目名称projectname和标的物purchasing(ppa)
+func GetQueryItems(selectType string, limitOldTime, registerData int64, isPay bool) (items []string) {
+	if isPay {
+		for _, t := range strings.Split(selectType, ",") {
+			if t == "content" {
+				items = append(items, "detail")
+			} else if t == "buyer" {
+				items = append(items, "mbuyer")
+			} else if t == "winner" {
+				items = append(items, "mwinner")
+			} else if t == "agency" {
+				items = append(items, "magency")
+			} else if t == "title" {
+				items = append(items, "title")
+			} else if t == "ppa" {
+				items = append(items, []string{"purchasing", "projectname.pname"}...)
+			} else if t == "file" { //dev4.7.8 标讯优化:搜索范围附件-》全部用户可用
+				items = append(items, "filetext")
+			}
+		}
+		return
+	}
+	//老用户 使用付费功能
+	isOldUser := registerData != 0 && registerData < limitOldTime
+	for _, t := range strings.Split(selectType, ",") {
+		if t == "winner" && isOldUser {
+			items = append(items, "mwinner")
+		} else if t == "title" {
+			items = append(items, "title")
+		} else if t == "content" {
+			items = append(items, "detail")
+		} else if t == "file" { //dev4.7.8 标讯优化:搜索范围附件-》全部用户可用
+			items = append(items, "filetext")
+		}
+	}
+	return
+}

+ 0 - 49
jyBXCore/rpc/util/userInfo.go

@@ -1,12 +1,7 @@
 package util
 
 import (
-	IC "jyBXCore/rpc/init"
 	"strings"
-
-	MC "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/mongodb"
-	"app.yhyue.com/moapp/jybase/mysql"
 )
 
 // VipState 是否是付费用户
@@ -19,50 +14,6 @@ type VipState struct {
 	IsNewEnt     bool  //新版商机管理
 }
 
-func GetVipState(mysql *mysql.Mysql, mg mongodb.MongodbSim, userId string, entId int64) (vs *VipState) {
-	vs = &VipState{}
-	if userId == "" {
-		return
-	}
-	phone := ""
-	data, ok := mg.FindById("user", userId, `"i_member_status":1,"i_vip_status":1,"s_m_phone":1,"s_phone":1,"o_vipjy":1,"l_registedate":1`)
-	if data != nil && len(*data) > 0 && ok {
-		iVipStatus := MC.Int64All((*data)["i_vip_status"])
-		if iVipStatus > 1 {
-			vs.VipState = 1
-			oVipJY, _ := (*data)["o_vipjy"].(map[string]interface{})
-			if oVipJY["o_buyset"] != nil {
-				oBuys := oVipJY["o_buyset"].(map[string]interface{})
-				if oBuys["upgrade"] != nil {
-					vs.VipState = 2
-				}
-			}
-		}
-		if iMemberStatus := MC.Int64All((*data)["i_member_status"]); iMemberStatus > 0 {
-			vs.BigMember = iMemberStatus
-		}
-		if sPhone, _ := (*data)["s_phone"].(string); sPhone != "" {
-			phone = sPhone
-		} else if sMPhone, _ := (*data)["s_m_phone"].(string); sMPhone != "" {
-			phone = sMPhone
-		}
-		if phone != "" && entId > 0 {
-			entNicheInfos := mysql.SelectBySql(`SELECT i.status,i.isNew,r.role_id,u.power 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, entId)
-			//商机管理用户信息判断
-			if entNicheInfos != nil && len(*entNicheInfos) > 0 {
-				entNicheInfo := (*entNicheInfos)[0]
-				if MC.IntAll(entNicheInfo["status"]) > 0 && (MC.IntAll(entNicheInfo["power"]) == 1 || MC.IntAll(entNicheInfo["role_id"]) > 0) {
-					vs.EntMember = 1
-				}
-				vs.IsNewEnt = MC.Int64All(entNicheInfo["isNew"]) > 0
-			}
-		}
-		vs.RegisterData, _ = ((*data)["l_registedate"]).(int64)
-		vs.IsOldVip = vs.VipState > 0 && vs.RegisterData < IC.C.ContextOldVipLimit
-	}
-	return
-}
-
 // IsPayedUser 是否是付费账户
 func (vs *VipState) IsPayedUser() bool {
 	return vs.VipState > 0 || vs.BigMember > 0 || vs.EntMember > 0

+ 5 - 0
jyBXCore/rpc/util/util.go

@@ -0,0 +1,5 @@
+package util
+
+func init() {
+	PLock = NewParticipateLock()
+}

+ 246 - 0
jyBXCore/test.http

@@ -0,0 +1,246 @@
+// p300 投标项目管理接口测试
+### rpc接口测试
+###  列表页 个人
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateShow
+
+{
+  "ids":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D,ABCY2FddT1YLy8vNGN6c2I%2FIzNfCSd3cXhyKA4ZLTogUX5wHDNUCkw%3D",
+  "entId": 0,
+  "entUserId": 0,
+  "positionId": 1204781659,
+  "positionType": 0,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "641aa7bcac1c8e639bc15cdb",
+  "newUserId": 486050,
+  "accountId": 360058
+}
+
+###  列表页 企业
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateShow
+
+{
+  "ids":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D,ABCY2FddT1YLy8vNGN6c2I%2FIzNfCSd3cXhyKA4ZLTogUX5wHDNUCkw%3D",
+  "entId": 25922,
+  "entUserId": 6116,
+  "positionId": 1205051263,
+  "positionType": 1,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "1205051263",
+  "newUserId": 486050,
+  "accountId": 360157
+}
+
+
+### 详情页参标信息 -正常
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateInfo
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "entId": 25922,
+  "entUserId": 6116,
+  "positionId": 1205051263,
+  "positionType": 1,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "1205051263",
+  "newUserId": 486050,
+  "accountId": 360157
+}
+### 详情页参标信息-无权限
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateInfo
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "entId": 25922,
+  "entUserId": 6117,
+  "positionId": 1205051265,
+  "positionType": 1,
+  "mgoUserId": "644a493516f19b49b8451716",
+  "appId": 10000,
+  "userId": "1205051265",
+  "newUserId": 725515,
+  "accountId": 360158
+}
+
+
+
+
+### 更新投标状态
+GRPC 127.0.0.1:8003/bxcore.BxCore/UpdateBidStatus
+
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "entId": 25922,
+  "entUserId": 6116,
+  "positionId": 1205051263,
+  "positionType": 1,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "1205051263",
+  "newUserId": 486050,
+  "accountId": 360157,
+  "bidType": 1,
+  "bidStage": [],
+  "isWin": 1,
+  "channelName": "阿勒泰",
+  "channelPerson": "若羌",
+  "channelPhone": "",
+  "winner": ""
+
+}
+
+
+### 获取最新的投标状态内容
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateContent
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "entId": 25922,
+  "entUserId": 6116,
+  "positionId": 1205051263,
+  "positionType": 1,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "1205051263",
+  "newUserId": 486050,
+  "accountId": 360157
+
+
+}
+
+
+### 获取操作记录  页面不传默认 500
+GRPC 127.0.0.1:8003/bxcore.BxCore/ParticipateRecords
+
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "entId": 25922,
+  "entUserId": 6116,
+  "positionId": 1205051263,
+  "positionType": 1,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "1205051263",
+  "newUserId": 486050,
+  "accountId": 360157,
+  "page": 1,
+  "pageSize": 10
+
+
+}
+
+### api接口测试
+### 列表页参标信息接口
+POST http://127.0.0.1:8004/jybx/core/participate/show
+Content-Type: application/json
+entId: 25922
+entUserId: 6116
+positionId: 1205051263
+positionType: 1
+mgoUserId: 641aa7bcac1c8e639bc15cdb
+appId: 10000
+userId: 1205051263
+newUserId: 486050
+accountId: 360157
+
+{
+  "ids":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D,ABCY2EAdi4vKygvM3xhcHUJJzACHj1mZnB%2FPDgZKSEwc3xzeVJUCg4%3D"
+}
+
+###  详情页参标信息接口
+POST http://127.0.0.1:8004/jybx/core/participate/info
+Content-Type: application/json
+entId: 25922
+entUserId: 6116
+positionId: 1205051263
+positionType: 1
+mgoUserId: 641aa7bcac1c8e639bc15cdb
+appId: 10000
+userId: 1205051263
+newUserId: 486050
+accountId: 360157
+
+{
+"sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D"
+}
+
+
+
+###  更新参标状态
+POST http://127.0.0.1:8004/jybx/core/participate/updateBidStatus
+Content-Type: application/json
+entId: 25922
+entUserId: 6116
+positionId: 1205051263
+positionType: 1
+mgoUserId: 641aa7bcac1c8e639bc15cdb
+appId: 10000
+userId: 1205051263
+newUserId: 486050
+accountId: 360157
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "bidType": 2,
+  "bidStage": [],
+  "isWin": 2,
+  "channelName": "霍尔果斯",
+  "channelPerson": "若羌",
+  "channelPhone": "",
+  "winner": ""
+}
+
+###  参标操作记录 页码不传时 默认500
+POST http://127.0.0.1:8004/jybx/core/participate/records
+Content-Type: application/json
+entId: 25922
+entUserId: 6116
+positionId: 1205051263
+positionType: 1
+mgoUserId: 641aa7bcac1c8e639bc15cdb
+appId: 10000
+userId: 1205051263
+newUserId: 486050
+accountId: 360157
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D",
+  "page": 1,
+  "pageSize": 5
+}
+
+###  获取最新的投标状态信息
+POST http://127.0.0.1:8004/jybx/core/participate/content
+Content-Type: application/json
+entId: 25922
+entUserId: 6116
+positionId: 1205051263
+positionType: 1
+mgoUserId: 641aa7bcac1c8e639bc15cdb
+appId: 10000
+userId: 1205051263
+newUserId: 486050
+accountId: 360157
+
+{
+  "sid":"ABCY2FddTxYLyo4And1c08ODCcoGjF0XGB%2BKDggPSFFYFJwGC9UCa0%3D"
+}
+
+###  获取最新的投标状态信息
+GRPC http://127.0.0.1:8003/bxcore.BxCore/ParticipateSetUpInfo
+
+{
+  "entId": 0,
+  "entUserId": 0,
+  "positionId": 1204781659,
+  "positionType": 0,
+  "mgoUserId": "641aa7bcac1c8e639bc15cdb",
+  "appId": 10000,
+  "userId": "641aa7bcac1c8e639bc15cdb",
+  "newUserId": 486050,
+  "accountId": 360058
+}

+ 1 - 1
jyBXSubscribe/go.mod

@@ -21,7 +21,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230414052738-2cf914a80b5d // indirect
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 // indirect
 	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect

+ 2 - 2
jyBXSubscribe/go.sum

@@ -26,8 +26,8 @@ bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad0
 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-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230414052738-2cf914a80b5d h1:nhrpiUuZl5GyTcAt19ZIZBDgnEfeEQm77uxfhuK7JTI=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230414052738-2cf914a80b5d/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
 bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 h1:aK3ya7aznINdAuEl7sKq9U2MvJidUfk6nxPGjjX+t3Y=

+ 5 - 2
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -28,8 +28,11 @@ message SubscribeInfosReq {
   bool IsEnt = 22;
   string SelectIds = 23;
   int64 positionType = 24;
-  int64 notReturnCount = 25;
-  string item = 26;
+  string accountId = 25; //账户id
+  string positionId = 26;  //职位id
+  string mgoUserId = 27;  //原userId
+  int64 notReturnCount = 28;
+  string item = 29;
 }
 
 message SubscribeInfosResp {

+ 10 - 3
jyBXSubscribe/rpc/internal/logic/getsublistlogic.go

@@ -6,7 +6,7 @@ import (
 	"jyBXSubscribe/rpc/internal/svc"
 	"jyBXSubscribe/rpc/model"
 	"jyBXSubscribe/rpc/type/bxsubscribe"
-	"jyBXSubscribe/rpc/util"
+	"strconv"
 	"strings"
 	"time"
 
@@ -41,10 +41,17 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 	if in.PageNum == 1 {
 		go model.UpdateUserPushUnread(in.UserId, in.UserType)
 	}
+	accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
+	positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
+	entId, _ := strconv.ParseInt(in.EntId, 10, 64)
+	//判断用户身份
+	userInfo := IC.Middleground.PowerCheckCenter.Check("10000", in.UserId, in.NewUserId, accountId, entId, in.PositionType, positionId)
+	//是否是付费用户
+	isPay := !userInfo.Free.IsFree
 	isPayUser := false
-	userInfo := util.GetVipState(IC.MainMysql, IC.Mgo, in.UserId)
+
 	//付费用户
-	if in.UserType != "fType" && userInfo.IsPayedUser() {
+	if in.UserType != "fType" && isPay {
 		isPayUser = true
 	}
 	//分发员工

+ 576 - 353
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go

@@ -50,8 +50,11 @@ type SubscribeInfosReq struct {
 	IsEnt          bool   `protobuf:"varint,22,opt,name=IsEnt,proto3" json:"IsEnt,omitempty"`
 	SelectIds      string `protobuf:"bytes,23,opt,name=SelectIds,proto3" json:"SelectIds,omitempty"`
 	PositionType   int64  `protobuf:"varint,24,opt,name=positionType,proto3" json:"positionType,omitempty"`
-	NotReturnCount int64  `protobuf:"varint,25,opt,name=notReturnCount,proto3" json:"notReturnCount,omitempty"`
-	Item           string `protobuf:"bytes,26,opt,name=item,proto3" json:"item,omitempty"`
+	AccountId      string `protobuf:"bytes,25,opt,name=accountId,proto3" json:"accountId,omitempty"`   //账户id
+	PositionId     string `protobuf:"bytes,26,opt,name=positionId,proto3" json:"positionId,omitempty"` //职位id
+	MgoUserId      string `protobuf:"bytes,27,opt,name=mgoUserId,proto3" json:"mgoUserId,omitempty"`   //原userId
+	NotReturnCount int64  `protobuf:"varint,28,opt,name=notReturnCount,proto3" json:"notReturnCount,omitempty"`
+	Item           string `protobuf:"bytes,29,opt,name=item,proto3" json:"item,omitempty"`
 }
 
 func (x *SubscribeInfosReq) Reset() {
@@ -254,6 +257,27 @@ func (x *SubscribeInfosReq) GetPositionType() int64 {
 	return 0
 }
 
+func (x *SubscribeInfosReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *SubscribeInfosReq) GetPositionId() string {
+	if x != nil {
+		return x.PositionId
+	}
+	return ""
+}
+
+func (x *SubscribeInfosReq) GetMgoUserId() string {
+	if x != nil {
+		return x.MgoUserId
+	}
+	return ""
+}
+
 func (x *SubscribeInfosReq) GetNotReturnCount() int64 {
 	if x != nil {
 		return x.NotReturnCount
@@ -3869,8 +3893,8 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x0a, 0x11, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x70, 0x72,
 	0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
 	0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
-	0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9,
-	0x05, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+	0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5,
+	0x06, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f,
 	0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18,
 	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a,
 	0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
@@ -3910,370 +3934,365 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x09, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f,
 	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26,
-	0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
-	0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72,
-	0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x1a,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x78, 0x0a, 0x12, 0x53, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65,
-	0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72,
-	0x72, 0x4d, 0x73, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
-	0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x22, 0x77, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
-	0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x68,
-	0x61, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
-	0x52, 0x0b, 0x68, 0x61, 0x73, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a,
-	0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x78,
-	0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xb3, 0x07,
-	0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
-	0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64,
-	0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75,
-	0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
-	0x62, 0x75, 0x79, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75,
-	0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62,
-	0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79,
-	0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18,
-	0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69,
-	0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a,
-	0x07, 0x63, 0x61, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
-	0x63, 0x61, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76,
-	0x69, 0x73, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x61, 0x49, 0x73,
-	0x76, 0x69, 0x73, 0x69, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65,
-	0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
-	0x0a, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28,
-	0x09, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06,
-	0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x62, 0x75,
-	0x64, 0x67, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
-	0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75,
-	0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
-	0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a,
-	0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70,
-	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69,
-	0x6e, 0x6e, 0x65, 0x72, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x6e,
-	0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d,
-	0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e,
-	0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76, 0x69, 0x70,
-	0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x73, 0x76, 0x69, 0x70, 0x12,
-	0x23, 0x0a, 0x0d, 0x63, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73,
-	0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78,
-	0x69, 0x73, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x16,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04,
-	0x73, 0x69, 0x74, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x74, 0x65,
-	0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x18, 0x18, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x79, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b,
-	0x62, 0x75, 0x79, 0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x0b, 0x62, 0x75, 0x79, 0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16,
-	0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x61, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79,
-	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67,
-	0x65, 0x6e, 0x63, 0x79, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x67,
-	0x65, 0x6e, 0x63, 0x79, 0x54, 0x65, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
-	0x67, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e,
-	0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73,
-	0x69, 0x67, 0x6e, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x69,
-	0x64, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
-	0x62, 0x69, 0x64, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x77, 0x69,
-	0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
-	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x57, 0x69, 0x6e,
-	0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49,
-	0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64,
-	0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x43,
-	0x6f, 0x64, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e,
-	0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x69,
-	0x6e, 0x6e, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77,
-	0x69, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x69, 0x6e, 0x6e,
-	0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
-	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
-	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0xed, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d,
-	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49,
-	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16,
-	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79,
-	0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
-	0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
-	0x74, 0x49, 0x64, 0x18, 0x06, 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, 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f,
-	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x0c, 0x53, 0x6f, 0x6d, 0x65,
-	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f,
-	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43,
-	0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x73,
-	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x88, 0x02, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65,
-	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b,
-	0x69, 0x73, 0x49, 0x6e, 0x54, 0x53, 0x67, 0x75, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x54, 0x53, 0x67, 0x75, 0x69, 0x64, 0x65, 0x12, 0x1a,
-	0x0a, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x08, 0x69, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73,
-	0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73,
-	0x4f, 0x6e, 0x54, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x50,
-	0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x74, 0x68, 0x65,
-	0x72, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x74, 0x68,
-	0x65, 0x72, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1a,
-	0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09,
-	0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
-	0x65, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x22, 0x60, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1d, 0x0a,
-	0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06,
-	0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74,
-	0x61, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x11, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69,
-	0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72,
-	0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
-	0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
-	0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6c, 0x0a, 0x16, 0x55, 0x70, 0x64,
-	0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f,
-	0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x75, 0x62, 0x53, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54,
-	0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74,
-	0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x1e, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28,
-	0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x22, 0x66, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
-	0x12, 0x15, 0x0a, 0x06, 0x73, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,
-	0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64,
-	0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x61, 0x5f, 0x6b, 0x65, 0x79,
-	0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
-	0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x04, 0x61, 0x4b, 0x65, 0x79, 0x22,
-	0x8a, 0x01, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
-	0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
-	0x74, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x6b,
-	0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69,
-	0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x12, 0x1c,
-	0x0a, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28,
-	0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x68, 0x0a, 0x08,
-	0x4b, 0x65, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x5f, 0x69, 0x74,
-	0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12,
-	0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
-	0x25, 0x0a, 0x05, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
-	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79,
-	0x52, 0x04, 0x61, 0x4b, 0x65, 0x79, 0x22, 0x89, 0x01, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x10,
-	0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
-	0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
-	0x52, 0x06, 0x6e, 0x6f, 0x74, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61,
-	0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70,
-	0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63,
-	0x68, 0x77, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63,
-	0x68, 0x77, 0x61, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x6b, 0x65,
-	0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x6b,
-	0x65, 0x79, 0x22, 0xf6, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65,
-	0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
+	0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
+	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09,
+	0x6d, 0x67, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x09, 0x6d, 0x67, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x6f,
+	0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x1c, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x78, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08,
+	0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
+	0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d,
+	0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67,
+	0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x22, 0x77, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x61, 0x74,
+	0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x4e, 0x65,
+	0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x68, 0x61,
+	0x73, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x6c, 0x69, 0x73,
+	0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xb3, 0x07, 0x0a, 0x0d, 0x73, 0x75,
+	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0f, 0x0a, 0x03, 0x5f,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
+	0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
+	0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x43,
+	0x6c, 0x61, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x65,
+	0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70,
+	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65,
+	0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b,
+	0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19,
+	0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x07, 0x63, 0x61, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f,
+	0x64, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x44, 0x61,
+	0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76, 0x69, 0x73, 0x69, 0x74,
+	0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x61, 0x49, 0x73, 0x76, 0x69, 0x73, 0x69,
+	0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61,
+	0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6d,
+	0x61, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67,
+	0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74,
+	0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20,
+	0x01, 0x28, 0x01, 0x52, 0x09, 0x62, 0x69, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e,
+	0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14,
+	0x0a, 0x05, 0x62, 0x75, 0x79, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62,
+	0x75, 0x79, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e,
+	0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+	0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72,
+	0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x20,
+	0x0a, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x13, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x69, 0x64, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65,
+	0x12, 0x19, 0x0a, 0x08, 0x63, 0x61, 0x5f, 0x69, 0x73, 0x76, 0x69, 0x70, 0x18, 0x14, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x07, 0x63, 0x61, 0x49, 0x73, 0x76, 0x69, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x63,
+	0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x15, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x0c, 0x63, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73,
+	0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x74, 0x65,
+	0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x62, 0x75, 0x79, 0x65, 0x72, 0x54, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x75, 0x79, 0x65,
+	0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62,
+	0x75, 0x79, 0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x67,
+	0x65, 0x6e, 0x63, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e,
+	0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x65, 0x72, 0x73,
+	0x6f, 0x6e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79,
+	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x63, 0x79,
+	0x54, 0x65, 0x6c, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x63,
+	0x79, 0x54, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x6e, 0x64, 0x54,
+	0x69, 0x6d, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65,
+	0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x69, 0x64, 0x65, 0x6e, 0x64,
+	0x54, 0x69, 0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x69, 0x64, 0x65,
+	0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72,
+	0x49, 0x6e, 0x66, 0x6f, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+	0x1e, 0x0a, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x21, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22,
+	0x82, 0x01, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16,
+	0x0a, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72,
+	0x54, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x69, 0x6e, 0x6e, 0x65,
+	0x72, 0x54, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x50, 0x65,
+	0x72, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x69, 0x6e, 0x6e,
+	0x65, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x6e,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x6e,
+	0x65, 0x72, 0x49, 0x64, 0x22, 0xed, 0x01, 0x0a, 0x0b, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66,
+	0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
+	0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74,
+	0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x06, 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, 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+	0x6f, 0x6e, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x0c, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
+	0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x22, 0x88, 0x02, 0x0a, 0x08, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+	0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+	0x52, 0x06, 0x68, 0x61, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x49, 0x6e,
+	0x54, 0x53, 0x67, 0x75, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69,
+	0x73, 0x49, 0x6e, 0x54, 0x53, 0x67, 0x75, 0x69, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73,
+	0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73,
+	0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61,
+	0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x54, 0x61,
+	0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e,
+	0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x43,
+	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x46, 0x6c, 0x61,
+	0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x46, 0x6c,
+	0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e,
+	0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e,
+	0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x60,
+	0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x09,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65,
+	0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+	0x22, 0x63, 0x0a, 0x11, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,
+	0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d,
+	0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d,
+	0x73, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64,
+	0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
+	0x75, 0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12,
+	0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
+	0x06, 0x73, 0x75, 0x62, 0x53, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
 	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
-	0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76,
-	0x73, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x76, 0x73, 0x69, 0x64, 0x12,
-	0x14, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
-	0x45, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72,
+	0x22, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+	0x79, 0x70, 0x65, 0x22, 0x1e, 0x0a, 0x08, 0x43, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12,
+	0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63,
+	0x69, 0x74, 0x79, 0x22, 0x66, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06,
+	0x73, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x49,
+	0x74, 0x65, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
+	0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x2e, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x04, 0x61, 0x4b, 0x65, 0x79, 0x22, 0x8a, 0x01, 0x0a, 0x04,
+	0x4b, 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x6b, 0x65, 0x79,
+	0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x6b, 0x65, 0x79, 0x12, 0x1e,
+	0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a,
+	0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70,
+	0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61,
+	0x70, 0x70, 0x65, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x68, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x49,
+	0x74, 0x65, 0x6d, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x73, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x75,
+	0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x61,
+	0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x61, 0x4b,
+	0x65, 0x79, 0x22, 0x89, 0x01, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+	0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06,
+	0x6e, 0x6f, 0x74, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f,
+	0x74, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69,
+	0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+	0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79,
+	0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x6b, 0x65, 0x79, 0x22, 0xf6,
+	0x01, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a,
+	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
+	0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,
+	0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x73, 0x69, 0x64, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x76, 0x73, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x45,
+	0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6e, 0x74, 0x49,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
+	0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73,
+	0x45, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+	0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74,
+	0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf7, 0x02, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4b,
+	0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72,
 	0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65,
 	0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
 	0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
 	0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08,
-	0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74,
-	0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70,
-	0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf7, 0x02, 0x0a, 0x09,
-	0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70,
-	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12,
-	0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
-	0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
-	0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65,
-	0x77, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73,
-	0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x18, 0x08,
-	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x76,
-	0x69, 0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76,
-	0x69, 0x70, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65,
-	0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65,
-	0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x77,
-	0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
-	0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75,
-	0x73, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
-	0x75, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x70,
-	0x74, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x70, 0x74, 0x49,
-	0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
-	0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
-	0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73,
+	0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x69, 0x70, 0x50, 0x6f,
+	0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x69, 0x70, 0x50, 0x6f,
+	0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, 0x77,
+	0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+	0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x6f, 0x77, 0x65,
+	0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x50,
+	0x6f, 0x77, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72,
+	0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x74, 0x49, 0x64, 0x18,
+	0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x70, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a,
+	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+	0x65, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x6f, 0x72, 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, 0x14, 0x0a,
+	0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x6c,
+	0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65,
+	0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72,
+	0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x73,
 	0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18,
-	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a,
-	0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x71,
-	0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
-	0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x11, 0x4d, 0x73,
-	0x67, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02,
-	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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
-	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x66, 0x66,
-	0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x66, 0x66, 0x73, 0x22,
-	0x6a, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72,
-	0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72,
-	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2b,
-	0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
-	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x49,
-	0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x1c, 0x0a, 0x04, 0x4c,
-	0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03,
-	0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcb, 0x02, 0x0a, 0x09, 0x53, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18,
-	0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
-	0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x41, 0x72,
-	0x65, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a,
-	0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
-	0x09, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1a, 0x0a,
-	0x08, 0x69, 0x6e, 0x66, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
-	0x08, 0x69, 0x6e, 0x66, 0x6f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65,
-	0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
-	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74,
-	0x65, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x18,
-	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x12,
-	0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
-	0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61,
-	0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x74, 0x69, 0x70, 0x18, 0x07, 0x20,
-	0x01, 0x28, 0x08, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x74, 0x69, 0x70, 0x1a, 0x4a, 0x0a, 0x09, 0x41,
-	0x72, 0x65, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61,
-	0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x73, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61,
-	0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa5, 0x01, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72,
-	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, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e,
-	0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x22, 0x0a,
-	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
-	0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x75, 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, 0x22,
-	0x72, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x71, 0x12, 0x2a, 0x0a, 0x04, 0x64,
-	0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x78, 0x73, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
-	0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f,
-	0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43,
-	0x6f, 0x64, 0x65, 0x22, 0x72, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
-	0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x66, 0x66, 0x73, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x66, 0x66, 0x73, 0x22, 0x6a, 0x0a, 0x07, 0x4b,
+	0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f,
 	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64,
 	0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74,
 	0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x73, 0x75,
-	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
-	0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x44, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73,
+	0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x1c, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12,
+	0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05,
+	0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcb, 0x02, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x20, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x41, 0x72, 0x65, 0x61, 0x45, 0x6e,
+	0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x79,
+	0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x62,
+	0x75, 0x79, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x66,
+	0x6f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x66,
+	0x6f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12,
+	0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x77, 0x61, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x70,
+	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12,
+	0x16, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x74, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
+	0x06, 0x6b, 0x65, 0x79, 0x74, 0x69, 0x70, 0x1a, 0x4a, 0x0a, 0x09, 0x41, 0x72, 0x65, 0x61, 0x45,
+	0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+	0x02, 0x38, 0x01, 0x22, 0xa5, 0x01, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 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, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73,
+	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
+	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+	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, 0x22, 0x72, 0x0a, 0x08, 0x55,
+	0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x71, 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 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, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22,
+	0x72, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a,
+	0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
+	0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x69, 0x74,
+	0x65, 0x6d, 0x73, 0x22, 0x44, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+	0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x74, 0x0a, 0x10, 0x47, 0x65, 0x74,
+	0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e,
+	0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49,
+	0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x22,
+	0x73, 0x0a, 0x0e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07,
+	0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65,
+	0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x69,
+	0x74, 0x65, 0x6d, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x74, 0x0a,
-	0x10, 0x47, 0x65, 0x74, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
-	0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69,
-	0x6e, 0x66, 0x6f, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x66,
-	0x6f, 0x49, 0x64, 0x22, 0x73, 0x0a, 0x0e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64,
-	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65,
-	0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65,
-	0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
-	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x65,
-	0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
-	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69,
-	0x73, 0x76, 0x69, 0x73, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73,
-	0x76, 0x69, 0x73, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74, 0x69,
-	0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74,
-	0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a,
-	0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
-	0x72, 0x49, 0x6e, 0x66, 0x6f, 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, 0x14,
-	0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f,
-	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e,
-	0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20,
-	0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
-	0x22, 0x7b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x65, 0x73, 0x71, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x0b, 0x32, 0x18, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
-	0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74,
-	0x61, 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, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x7f, 0x0a,
-	0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04,
-	0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c,
-	0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x67, 0x55, 0x72, 0x6c,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x12, 0x16,
-	0x0a, 0x06, 0x61, 0x70, 0x70, 0x55, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
-	0x61, 0x70, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x6f, 0x77, 0x57, 0x78,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x68, 0x6f, 0x77, 0x57, 0x78, 0x22, 0xaa,
-	0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
-	0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
-	0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54,
-	0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74,
-	0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18,
-	0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xf3, 0x01, 0x0a, 0x0d,
-	0x47, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a,
+	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x76, 0x69, 0x73,
+	0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69, 0x73, 0x76, 0x69, 0x73, 0x69,
+	0x74, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x69, 0x73, 0x69, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12,
+	0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
+	0x6f, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16,
+	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+	0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x61,
+	0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+	0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65,
+	0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7b, 0x0a, 0x0f,
+	0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x71, 0x12,
+	0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x0a, 0x65, 0x72,
+	0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x7f, 0x0a, 0x0b, 0x47, 0x65, 0x74,
+	0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05,
+	0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61,
+	0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x67, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70,
+	0x70, 0x55, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x70, 0x55,
+	0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x6f, 0x77, 0x57, 0x78, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x06, 0x73, 0x68, 0x6f, 0x77, 0x57, 0x78, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x53,
+	0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
 	0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74,
@@ -4282,6 +4301,7 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
 	0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18,
 	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54,
+<<<<<<< HEAD
 	0x79, 0x70, 0x65, 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, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64,
@@ -4474,6 +4494,209 @@ var file_bxsubscribe_proto_rawDesc = []byte{
 	0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x65,
 	0x74, 0x61, 0x69, 0x6c, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
 	0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+=======
+	0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xf3, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50,
+	0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 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,
+	0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70,
+	0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x03, 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, 0x06, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
+	0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a,
+	0x0a, 0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xf1, 0x02,
+	0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x39, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74,
+	0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x44, 0x61, 0x74, 0x61,
+	0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x45, 0x0a, 0x08, 0x74,
+	0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e,
+	0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50,
+	0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x44,
+	0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x61,
+	0x74, 0x61, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12,
+	0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x4d,
+	0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
+	0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a,
+	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62,
+	0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53,
+	0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x52, 0x0a,
+	0x0d, 0x54, 0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+	0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79,
+	0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x15, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x54, 0x69,
+	0x6d, 0x65, 0x4a, 0x73, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+	0x01, 0x22, 0x23, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a,
+	0x07, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06,
+	0x61, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x53,
+	0x65, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x06, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69,
+	0x5f, 0x77, 0x78, 0x70, 0x75, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x69,
+	0x57, 0x78, 0x70, 0x75, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x5f, 0x61, 0x70, 0x70, 0x70,
+	0x75, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x41, 0x70, 0x70, 0x70,
+	0x75, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x5f, 0x6d, 0x61, 0x69, 0x6c, 0x70, 0x75, 0x73,
+	0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x4d, 0x61, 0x69, 0x6c, 0x70, 0x75,
+	0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64, 0x65,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x52, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64,
+	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x57, 0x78, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x1e, 0x0a,
+	0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a,
+	0x0a, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x22, 0xcf, 0x02,
+	0x0a, 0x0d, 0x53, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 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, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02,
+	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, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
+	0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, 0x54,
+	0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x18,
+	0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x61, 0x74, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x12,
+	0x1a, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x70, 0x75, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74,
+	0x69, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65,
+	0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x70, 0x75, 0x73, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+	0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x22,
+	0xdd, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 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, 0x14, 0x0a, 0x05, 0x65,
+	0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 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, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+	0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
+	0x18, 0x0a, 0x07, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x07, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67,
+	0x65, 0x4e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65,
+	0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
+	0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22,
+	0x95, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72,
+	0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72,
+	0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x14,
+	0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74,
+	0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x66,
+	0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
+	0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x53,
+	0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x53, 0x74,
+	0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x63,
+	0x0a, 0x17, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74,
+	0x49, 0x64, 0x18, 0x01, 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, 0x02, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a,
+	0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
+	0x6b, 0x65, 0x6e, 0x22, 0x5e, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x65,
+	0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65,
+	0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73,
+	0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12,
+	0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x32, 0xbb, 0x09, 0x0a, 0x0b, 0x42, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x4c, 0x69, 0x73,
+	0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65,
+	0x71, 0x1a, 0x1f, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x45, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x53, 0x6f, 0x6d, 0x65,
+	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x19,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x6f, 0x6d,
+	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x13, 0x55, 0x70, 0x64,
+	0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+	0x12, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55,
+	0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x53, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e,
+	0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
+	0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f,
+	0x0a, 0x0d, 0x42, 0x79, 0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12,
+	0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75,
+	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x1a,
+	0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x42, 0x79,
+	0x50, 0x75, 0x73, 0x68, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x3b, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x12, 0x17, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64,
+	0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x06,
+	0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x14,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4b, 0x65, 0x79,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x53, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x15,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x55, 0x73, 0x65,
+	0x72, 0x52, 0x65, 0x73, 0x71, 0x12, 0x49, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x73, 0x74,
+	0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x4e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+	0x6f, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52,
+	0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
+	0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x4b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x12, 0x1d, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
+	0x47, 0x65, 0x74, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71,
+	0x1a, 0x1b, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x56,
+	0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a,
+	0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x62, 0x78, 0x73, 0x75,
+	0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x73, 0x71, 0x12, 0x3f, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12,
+	0x1b, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65,
+	0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62,
+	0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68,
+	0x53, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
+	0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a,
+	0x1b, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x47, 0x65,
+	0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0a,
+	0x73, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x78, 0x73,
+	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x75, 0x73, 0x68,
+	0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x5c, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63,
+	0x72, 0x69, 0x62, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a,
+	0x17, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x78, 0x73, 0x75, 0x62,
+	0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x66, 0x66, 0x53, 0x75, 0x62, 0x73,
+	0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x21,
+	0x2e, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x74, 0x61,
+	0x66, 0x66, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69,
+	0x6c, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x62, 0x78, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
+	0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+>>>>>>> master
 }
 
 var (

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff