jiaojiao7 hace 4 años
padre
commit
7337648bec

+ 4 - 3
entity/resources.go

@@ -2,7 +2,7 @@ package entity
 
 type ResourcesAuth struct {
 	Id          int64 `xorm:"pk autoincr id" form:"id" json:"id"`
-	EmployeeId  int64 `xorm:"employeeId" form:"employeeId" json:"employeeId"`    //用户标识
+	AccountId   int64 `xorm:"accountId" form:"accountId" json:"accountId"`       //用户标识
 	ResourcesId int64 `xorm:"resourcesId" form:"resourcesId" json:"resourcesId"` //资源标识
 	Quota       int64 `xorm:"quota" form:"quota" json:"quota"`                   //定额
 	Ratio       int64 `xorm:"ratio" form:"ratio" json:"ratio"`                   //比例
@@ -11,7 +11,7 @@ type ResourcesAuth struct {
 
 type AccountBalance struct {
 	Id           int64  `xorm:"pk autoincr id" form:"id" json:"id"`
-	EmployeeId   int64  `xorm:"employeeId" form:"employeeId" json:"employeeId"`       //人员标识
+	AccountId    int64  `xorm:"accountId" form:"accountId" json:"accountId"`          //人员标识
 	Name         string `xorm:"name" form:"name" json:"name"`                         //资源名称
 	Number       int64  `xorm:"number" form:"number" json:"number"`                   //余额
 	ResourceType string `xorm:"resourceType" form:"resourceType" json:"resourceType"` //资源代码
@@ -20,7 +20,7 @@ type AccountBalance struct {
 
 type ConsumeRecord struct {
 	Id            int64  `xorm:"pk autoincr id" form:"id" json:"id"`
-	EmployeeId    int64  `xorm:"employeeId" form:"employeeId" json:"employeeId"`          //人员标识; //用户标识
+	AccountId     int64  `xorm:"accountId" form:"accountId" json:"accountId"`             //人员标识; //用户标识
 	CompanyId     int64  `xorm:"companyId" form:"companyId" json:"companyId"`             //用户标识
 	ResourceType  string `xorm:"resourceType" form:"resourceType" json:"resourceType"`    //资源类型
 	ExportNum     int64  `xorm:"exportNum" form:"exportNum" json:"exportNum"`             //导出数量
@@ -29,4 +29,5 @@ type ConsumeRecord struct {
 	ExportTime    string `xorm:"exportTime" form:"exportTime" json:"exportTime"`
 	UserType      int64  `xorm:"userType" form:"userType" json:"userType"`
 	DepartmentId  int64  `xorm:"departmentId" form:"departmentId" json:"departmentId"`
+	UserId        string `xorm:"userId" form:"userId" json:"userId"`
 }

+ 4 - 4
rpc/internal/logic/findresourcesauthlogic.go

@@ -27,24 +27,24 @@ func NewFindResourcesAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext)
 	}
 }
 
-func (l *FindResourcesAuthLogic) FindResourcesAuth(in *resourcesCenter.ResourcesReq) (*resourcesCenter.ResourcesAuthRes, error) {
+func (l *FindResourcesAuthLogic) FindResourcesAuth(in *resourcesCenter.ResourcesReq) (*resourcesCenter.AccountBalanceRes, error) {
 	// todo: add your logic here and delete this line
 	if in.AccountId != 0 {
 		authArr, err := resourceManageService.FindResourcesAuth(in)
 		if len(authArr) == 0 && err != nil {
-			return &resourcesCenter.ResourcesAuthRes{
+			return &resourcesCenter.AccountBalanceRes{
 				Code:    0,
 				Message: "查询出错",
 				Data:    authArr,
 			}, err
 		}
-		return &resourcesCenter.ResourcesAuthRes{
+		return &resourcesCenter.AccountBalanceRes{
 			Code:    1,
 			Message: "查询成功",
 			Data:    authArr,
 		}, nil
 	} else {
-		return &resourcesCenter.ResourcesAuthRes{
+		return &resourcesCenter.AccountBalanceRes{
 			Code:    0,
 			Message: "缺少参数",
 			Data:    nil,

+ 1 - 1
rpc/internal/server/resourcescenterserver.go

@@ -22,7 +22,7 @@ func NewResourcesCenterServer(svcCtx *svc.ServiceContext) *ResourcesCenterServer
 }
 
 // 查询账户资源权限
-func (s *ResourcesCenterServer) FindResourcesAuth(ctx context.Context, in *resourcesCenter.ResourcesReq) (*resourcesCenter.ResourcesAuthRes, error) {
+func (s *ResourcesCenterServer) FindResourcesAuth(ctx context.Context, in *resourcesCenter.ResourcesReq) (*resourcesCenter.AccountBalanceRes, error) {
 	l := logic.NewFindResourcesAuthLogic(ctx, s.svcCtx)
 	return l.FindResourcesAuth(in)
 }

+ 5 - 4
rpc/resourcesCenter.proto

@@ -32,7 +32,7 @@ message Detailed {
 
 message ResourcesAuth {
     int64 id = 1;
-    int64 employeeId = 2; //用户标识
+    int64 accountId = 2; //账户标识
     int64 resourcesId = 3; //资源标识
     int64 quota = 4; //定额
     int64 ratio = 5; //比例
@@ -41,7 +41,7 @@ message ResourcesAuth {
 
 message ResourceBalance {
     int64 id = 1;
-    int64 employeeId = 2; //人员标识
+    int64 accountId = 2; //人员标识
     string name = 3; //资源名称
     int64 number = 4; //剩余数量
     string resourceType = 5; //资源代码
@@ -50,7 +50,7 @@ message ResourceBalance {
 
 message ConsumeRecord {
     int64 id = 1;
-    int64 employeeId = 2; //用户标识
+    int64 accountId = 2; //用户标识
     int64 companyId = 3; //用户标识
     string resourceType = 4;
     int64 exportNum = 5;
@@ -59,6 +59,7 @@ message ConsumeRecord {
     string exportTime = 8;
     int64 userType = 9;
     int64 departmentId = 10;
+    string userId = 11;
 }
 
 
@@ -90,7 +91,7 @@ message ConsumeRecordRes {
 
 service ResourcesCenter {
     //查询账户资源权限
-    rpc findResourcesAuth (ResourcesReq) returns (ResourcesAuthRes);
+    rpc findResourcesAuth (ResourcesReq) returns (AccountBalanceRes);
     //查询账户资源余额
     rpc findAccountBalance (ResourcesReq) returns (AccountBalanceRes);
     //查询流水账

+ 117 - 108
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -321,7 +321,7 @@ type ResourcesAuth struct {
 	unknownFields protoimpl.UnknownFields
 
 	Id          int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	EmployeeId  int64 `protobuf:"varint,2,opt,name=employeeId,proto3" json:"employeeId,omitempty"`   //用户标识
+	AccountId   int64 `protobuf:"varint,2,opt,name=accountId,proto3" json:"accountId,omitempty"`     //账户标识
 	ResourcesId int64 `protobuf:"varint,3,opt,name=resourcesId,proto3" json:"resourcesId,omitempty"` //资源标识
 	Quota       int64 `protobuf:"varint,4,opt,name=quota,proto3" json:"quota,omitempty"`             //定额
 	Ratio       int64 `protobuf:"varint,5,opt,name=ratio,proto3" json:"ratio,omitempty"`             //比例
@@ -367,9 +367,9 @@ func (x *ResourcesAuth) GetId() int64 {
 	return 0
 }
 
-func (x *ResourcesAuth) GetEmployeeId() int64 {
+func (x *ResourcesAuth) GetAccountId() int64 {
 	if x != nil {
-		return x.EmployeeId
+		return x.AccountId
 	}
 	return 0
 }
@@ -408,7 +408,7 @@ type ResourceBalance struct {
 	unknownFields protoimpl.UnknownFields
 
 	Id           int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	EmployeeId   int64  `protobuf:"varint,2,opt,name=employeeId,proto3" json:"employeeId,omitempty"`    //人员标识
+	AccountId    int64  `protobuf:"varint,2,opt,name=accountId,proto3" json:"accountId,omitempty"`      //人员标识
 	Name         string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                 //资源名称
 	Number       int64  `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`            //剩余数量
 	ResourceType string `protobuf:"bytes,5,opt,name=resourceType,proto3" json:"resourceType,omitempty"` //资源代码
@@ -454,9 +454,9 @@ func (x *ResourceBalance) GetId() int64 {
 	return 0
 }
 
-func (x *ResourceBalance) GetEmployeeId() int64 {
+func (x *ResourceBalance) GetAccountId() int64 {
 	if x != nil {
-		return x.EmployeeId
+		return x.AccountId
 	}
 	return 0
 }
@@ -495,8 +495,8 @@ type ConsumeRecord struct {
 	unknownFields protoimpl.UnknownFields
 
 	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	EmployeeId    int64  `protobuf:"varint,2,opt,name=employeeId,proto3" json:"employeeId,omitempty"` //用户标识
-	CompanyId     int64  `protobuf:"varint,3,opt,name=companyId,proto3" json:"companyId,omitempty"`   //用户标识
+	AccountId     int64  `protobuf:"varint,2,opt,name=accountId,proto3" json:"accountId,omitempty"` //用户标识
+	CompanyId     int64  `protobuf:"varint,3,opt,name=companyId,proto3" json:"companyId,omitempty"` //用户标识
 	ResourceType  string `protobuf:"bytes,4,opt,name=resourceType,proto3" json:"resourceType,omitempty"`
 	ExportNum     int64  `protobuf:"varint,5,opt,name=exportNum,proto3" json:"exportNum,omitempty"`
 	DeductionType int64  `protobuf:"varint,6,opt,name=deductionType,proto3" json:"deductionType,omitempty"`
@@ -504,6 +504,7 @@ type ConsumeRecord struct {
 	ExportTime    string `protobuf:"bytes,8,opt,name=exportTime,proto3" json:"exportTime,omitempty"`
 	UserType      int64  `protobuf:"varint,9,opt,name=userType,proto3" json:"userType,omitempty"`
 	DepartmentId  int64  `protobuf:"varint,10,opt,name=departmentId,proto3" json:"departmentId,omitempty"`
+	UserId        string `protobuf:"bytes,11,opt,name=userId,proto3" json:"userId,omitempty"`
 }
 
 func (x *ConsumeRecord) Reset() {
@@ -545,9 +546,9 @@ func (x *ConsumeRecord) GetId() int64 {
 	return 0
 }
 
-func (x *ConsumeRecord) GetEmployeeId() int64 {
+func (x *ConsumeRecord) GetAccountId() int64 {
 	if x != nil {
-		return x.EmployeeId
+		return x.AccountId
 	}
 	return 0
 }
@@ -608,6 +609,13 @@ func (x *ConsumeRecord) GetDepartmentId() int64 {
 	return 0
 }
 
+func (x *ConsumeRecord) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
 type ResourcesReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -892,100 +900,101 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72,
 	0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
 	0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
-	0xa3, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74,
+	0xa1, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74,
 	0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
-	0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49,
-	0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49, 0x64,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
-	0x73, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74,
-	0x69, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12,
-	0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
-	0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
-	0x63, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6d, 0x70,
-	0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65,
-	0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
-	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
-	0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e,
-	0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65,
-	0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xbd, 0x02,
-	0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
-	0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12,
-	0x1e, 0x0a, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x12,
-	0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x22, 0x0a,
-	0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
-	0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x05,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12,
-	0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f,
-	0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18,
-	0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a,
-	0x0a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a,
-	0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70,
-	0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x2c, 0x0a,
-	0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
-	0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x74, 0x0a, 0x10, 0x52,
-	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x12,
-	0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63,
-	0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a,
-	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65,
+	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
+	0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49, 0x64, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x49,
+	0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x14, 0x0a,
+	0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74,
+	0x61, 0x74, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+	0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d,
+	0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65,
+	0x72, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xd3, 0x02, 0x0a, 0x0d, 0x43, 0x6f,
+	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d,
+	0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f,
+	0x6d, 0x70, 0x61, 0x6e, 0x79, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65,
+	0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64,
+	0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6f, 0x72,
+	0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70,
+	0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
+	0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
+	0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x61, 0x72,
+	0x74, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+	0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
+	0x2c, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12,
+	0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x74, 0x0a,
+	0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65,
+	0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+	0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x22, 0x77, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61,
+	0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42,
+	0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x74, 0x0a, 0x10,
+	0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32,
+	0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
+	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x32, 0xaf, 0x03, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1d, 0x2e, 0x72, 0x65,
 	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x64, 0x61, 0x74,
-	0x61, 0x22, 0x77, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61,
-	0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03,
-	0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x61, 0x6c,
-	0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x74, 0x0a, 0x10, 0x43, 0x6f,
-	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x12, 0x12,
-	0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f,
-	0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x04,
-	0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e,
-	0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
-	0x32, 0xae, 0x03, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x66,
-	0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
-	0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71,
-	0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
-	0x65, 0x52, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x73,
-	0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75,
-	0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x11, 0x75,
-	0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
-	0x12, 0x18, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73,
-	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73,
-	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55,
-	0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x2e, 0x72, 0x65,
-	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65,
-	0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63,
+	0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x57,
+	0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c,
+	0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+	0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x61, 0x6c,
+	0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x43,
+	0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x2e, 0x72,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x72, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f,
+	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x12, 0x48,
+	0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x6c, 0x61,
+	0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x19, 0x2e,
+	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61,
+	0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x19,
+	0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x1a, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70,
+	0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1022,7 +1031,7 @@ var file_resourcesCenter_proto_depIdxs = []int32{
 	6, // 5: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.ResourcesReq
 	1, // 6: resourcesCenter.ResourcesCenter.updateUserBalance:input_type -> resourcesCenter.Balance
 	2, // 7: resourcesCenter.ResourcesCenter.updateUserDetailed:input_type -> resourcesCenter.Detailed
-	7, // 8: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.ResourcesAuthRes
+	8, // 8: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
 	8, // 9: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
 	9, // 10: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
 	0, // 11: resourcesCenter.ResourcesCenter.updateUserBalance:output_type -> resourcesCenter.Response
@@ -1194,7 +1203,7 @@ const _ = grpc.SupportPackageIsVersion6
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
 type ResourcesCenterClient interface {
 	//查询账户资源权限
-	FindResourcesAuth(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*ResourcesAuthRes, error)
+	FindResourcesAuth(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*AccountBalanceRes, error)
 	//查询账户资源余额
 	FindAccountBalance(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*AccountBalanceRes, error)
 	//查询流水账
@@ -1213,8 +1222,8 @@ func NewResourcesCenterClient(cc grpc.ClientConnInterface) ResourcesCenterClient
 	return &resourcesCenterClient{cc}
 }
 
-func (c *resourcesCenterClient) FindResourcesAuth(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*ResourcesAuthRes, error) {
-	out := new(ResourcesAuthRes)
+func (c *resourcesCenterClient) FindResourcesAuth(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*AccountBalanceRes, error) {
+	out := new(AccountBalanceRes)
 	err := c.cc.Invoke(ctx, "/resourcesCenter.ResourcesCenter/findResourcesAuth", in, out, opts...)
 	if err != nil {
 		return nil, err
@@ -1261,7 +1270,7 @@ func (c *resourcesCenterClient) UpdateUserDetailed(ctx context.Context, in *Deta
 // ResourcesCenterServer is the server API for ResourcesCenter service.
 type ResourcesCenterServer interface {
 	//查询账户资源权限
-	FindResourcesAuth(context.Context, *ResourcesReq) (*ResourcesAuthRes, error)
+	FindResourcesAuth(context.Context, *ResourcesReq) (*AccountBalanceRes, error)
 	//查询账户资源余额
 	FindAccountBalance(context.Context, *ResourcesReq) (*AccountBalanceRes, error)
 	//查询流水账
@@ -1276,7 +1285,7 @@ type ResourcesCenterServer interface {
 type UnimplementedResourcesCenterServer struct {
 }
 
-func (*UnimplementedResourcesCenterServer) FindResourcesAuth(context.Context, *ResourcesReq) (*ResourcesAuthRes, error) {
+func (*UnimplementedResourcesCenterServer) FindResourcesAuth(context.Context, *ResourcesReq) (*AccountBalanceRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindResourcesAuth not implemented")
 }
 func (*UnimplementedResourcesCenterServer) FindAccountBalance(context.Context, *ResourcesReq) (*AccountBalanceRes, error) {

+ 8 - 8
rpc/resourcesCenterclient/resourcescenter.go

@@ -3,7 +3,7 @@
 
 //go:generate mockgen -destination ./resourcescenter_mock.go -package resourcescenterclient -source $GOFILE
 
-package resourcescenterclient
+package resourcesCenterclient
 
 import (
 	"context"
@@ -14,20 +14,20 @@ import (
 )
 
 type (
-	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
 	Balance           = resourcesCenter.Balance
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
-	ConsumeRecord     = resourcesCenter.ConsumeRecord
-	ResourcesReq      = resourcesCenter.ResourcesReq
+	ResourceBalance   = resourcesCenter.ResourceBalance
+	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
 	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
 	Response          = resourcesCenter.Response
 	Detailed          = resourcesCenter.Detailed
-	ResourceBalance   = resourcesCenter.ResourceBalance
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
+	ConsumeRecord     = resourcesCenter.ConsumeRecord
+	ResourcesReq      = resourcesCenter.ResourcesReq
 	AccountBalanceRes = resourcesCenter.AccountBalanceRes
 
 	ResourcesCenter interface {
 		// 查询账户资源权限
-		FindResourcesAuth(ctx context.Context, in *ResourcesReq) (*ResourcesAuthRes, error)
+		FindResourcesAuth(ctx context.Context, in *ResourcesReq) (*AccountBalanceRes, error)
 		// 查询账户资源余额
 		FindAccountBalance(ctx context.Context, in *ResourcesReq) (*AccountBalanceRes, error)
 		// 查询流水账
@@ -50,7 +50,7 @@ func NewResourcesCenter(cli zrpc.Client) ResourcesCenter {
 }
 
 // 查询账户资源权限
-func (m *defaultResourcesCenter) FindResourcesAuth(ctx context.Context, in *ResourcesReq) (*ResourcesAuthRes, error) {
+func (m *defaultResourcesCenter) FindResourcesAuth(ctx context.Context, in *ResourcesReq) (*AccountBalanceRes, error) {
 	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
 	return client.FindResourcesAuth(ctx, in)
 }

+ 3 - 4
rpc/test/resourcesRecord_test.go

@@ -22,7 +22,7 @@ func Test_FindResourcesAuth(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 510*time.Second)
 	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
 	req := &resourcesCenter.ResourcesReq{
-		AccountId:6,
+		AccountId: 111,
 	}
 	res, err := FileSystem.FindResourcesAuth(ctx, req)
 	log.Println("结果", res)
@@ -33,7 +33,7 @@ func Test_FindAccountBalance(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
 	req := &resourcesCenter.ResourcesReq{
-		AccountId:6,
+		AccountId: 111,
 	}
 	res, err := FileSystem.FindAccountBalance(ctx, req)
 	log.Println("结果", res)
@@ -44,10 +44,9 @@ func Test_FindConsumeRecord(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
 	req := &resourcesCenter.ResourcesReq{
-		AccountId:6,
+		AccountId: 111,
 	}
 	res, err := FileSystem.FindConsumeRecord(ctx, req)
 	log.Println("结果", res)
 	log.Println("报错:", err)
 }
-

+ 21 - 16
service/resourceManageService.go

@@ -3,29 +3,35 @@ package service
 import (
 	"app.yhyue.com/moapp/jyResourcesCenter/entity"
 	"app.yhyue.com/moapp/jyResourcesCenter/rpc/resourcesCenter"
+	"log"
 )
 
 type ResourceManageService struct{}
 
 //查询用户资源权限
-func (service *ResourceManageService) FindResourcesAuth(data *resourcesCenter.ResourcesReq) ([]*resourcesCenter.ResourcesAuth, error) {
+func (service *ResourceManageService) FindResourcesAuth(data *resourcesCenter.ResourcesReq) ([]*resourcesCenter.ResourceBalance, error) {
 	orm := entity.Engine.NewSession()
-	var authArr []*entity.ResourcesAuth
-	authList := make([]*resourcesCenter.ResourcesAuth, 0)
-	err := orm.Table("resources_authorization").Select("*").
-		Where("accountId = ? and state = 1", data.AccountId).Find(&authArr)
+	var authArr []*entity.AccountBalance
+	authList := make([]*resourcesCenter.ResourceBalance, 0)
+	err := orm.Table("account_resources").Select("*").
+		Where("accountId = ?", data.AccountId).Find(&authArr)
 	if err != nil {
 		return authList, err
 	}
 	for _, v := range authArr {
-		authList = append(authList, &resourcesCenter.ResourcesAuth{
-			Id:          v.Id,
-			EmployeeId:  v.EmployeeId,
-			ResourcesId: v.ResourcesId,
-			Quota:       v.Quota,
-			State:       v.State,
-			Ratio:       v.Ratio,
-		})
+		log.Println("=======",v)
+		rb := &resourcesCenter.ResourceBalance{
+			Id:           v.Id,
+			AccountId:    v.AccountId,
+			Name:         v.Name,
+			ResourceType: v.ResourceType,
+			Number:       v.Number,
+			Spec:         v.Spec,
+		}
+		if v.Number == 0 {
+			rb.Number = int64(0)
+		}
+		authList = append(authList, rb)
 	}
 	return authList, nil
 }
@@ -43,7 +49,7 @@ func (service *ResourceManageService) FindAccountBalance(in *resourcesCenter.Res
 	for _, v := range accountBalanceArr {
 		dataList = append(dataList, &resourcesCenter.ResourceBalance{
 			Id:           v.Id,
-			EmployeeId:   v.EmployeeId,
+			AccountId:    v.AccountId,
 			Name:         v.Name,
 			ResourceType: v.ResourceType,
 			Number:       v.Number,
@@ -53,7 +59,7 @@ func (service *ResourceManageService) FindAccountBalance(in *resourcesCenter.Res
 	return dataList, nil
 }
 
-//查询账户资源余额
+//查询流水
 func (service *ResourceManageService) FindConsumeRecord(in *resourcesCenter.ResourcesReq) ([]*resourcesCenter.ConsumeRecord, error) {
 	orm := entity.Engine.NewSession()
 	var recordArr []*entity.ConsumeRecord
@@ -66,7 +72,6 @@ func (service *ResourceManageService) FindConsumeRecord(in *resourcesCenter.Reso
 	for _, v := range recordArr {
 		dataList = append(dataList, &resourcesCenter.ConsumeRecord{
 			Id:            v.Id,
-			EmployeeId:    v.EmployeeId,
 			CompanyId:     v.CompanyId,
 			DepartmentId:  v.DepartmentId,
 			ResourceType:  v.ResourceType,