jiaojiao7 4 lat temu
rodzic
commit
b33752b577

+ 15 - 12
entity/resources.go

@@ -11,7 +11,7 @@ type ResourcesAuth struct {
 
 type AccountBalance struct {
 	Id           int64  `xorm:"pk autoincr id" form:"id" json:"id"`
-	AccountId    string  `xorm:"accountId" form:"accountId" json:"accountId"`          //人员标识
+	AccountId    string `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"` //资源代码
@@ -19,15 +19,18 @@ type AccountBalance struct {
 }
 
 type ConsumeRecord struct {
-	Id            int64  `xorm:"pk autoincr id" form:"id" json:"id"`
-	AccountId     string  `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"`             //导出数量
-	DeductionType int64  `xorm:"deductionType" form:"deductionType" json:"deductionType"` //扣费类型(1高级字段包)
-	RuleId        int64  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
-	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"`
+	Id             int64  `xorm:"pk autoincr id" form:"id" json:"id"`
+	AccountId      string `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"`          //导出数量
+	RuleId         int64  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
+	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"`
+	DeductionNumb  int64  `xorm:"deductionNumb" form:"deductionNumb" json:"deductionNumb"` //扣除数量
+	Url            string `xorm:"url" form:"url" json:"url"`
+	SearchCriteria string `xorm:"searchCriteria" form:"searchCriteria" json:"searchCriteria"`
+	Source         string `xorm:"source" form:"source" json:"source"`
 }

+ 2 - 2
rpc/internal/logic/findconsumerecordlogic.go

@@ -24,9 +24,9 @@ func NewFindConsumeRecordLogic(ctx context.Context, svcCtx *svc.ServiceContext)
 	}
 }
 
-func (l *FindConsumeRecordLogic) FindConsumeRecord(in *resourcesCenter.ResourcesReq) (*resourcesCenter.ConsumeRecordRes, error) {
+func (l *FindConsumeRecordLogic) FindConsumeRecord(in *resourcesCenter.RecordReq) (*resourcesCenter.ConsumeRecordRes, error) {
 	// todo: add your logic here and delete this line
-	if in.AccountId != "" {
+	if in.AccountId != "" && in.UserId != "" && in.PageSize != 0 && in.Page != 0 {
 		recordArr, err := resourceManageService.FindConsumeRecord(in)
 		if len(recordArr) == 0 && err != nil {
 			return &resourcesCenter.ConsumeRecordRes{

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

@@ -34,7 +34,7 @@ func (s *ResourcesCenterServer) FindAccountBalance(ctx context.Context, in *reso
 }
 
 // 查询流水账
-func (s *ResourcesCenterServer) FindConsumeRecord(ctx context.Context, in *resourcesCenter.ResourcesReq) (*resourcesCenter.ConsumeRecordRes, error) {
+func (s *ResourcesCenterServer) FindConsumeRecord(ctx context.Context, in *resourcesCenter.RecordReq) (*resourcesCenter.ConsumeRecordRes, error) {
 	l := logic.NewFindConsumeRecordLogic(ctx, s.svcCtx)
 	return l.FindConsumeRecord(in)
 }

+ 18 - 7
rpc/resourcesCenter.proto

@@ -54,12 +54,15 @@ message ConsumeRecord {
     int64 companyId = 3; //用户标识
     string resourceType = 4;
     int64 exportNum = 5;
-    int64 deductionType = 6;
-    int64 ruleId = 7;
-    string exportTime = 8;
-    int64 userType = 9;
-    int64 departmentId = 10;
-    string userId = 11;
+    int64 ruleId = 6;
+    string exportTime = 7;
+    int64 userType = 8;
+    int64 departmentId = 9;
+    string userId = 10;
+    int64 deductionNumb = 11;
+    string url = 12;
+    string searchCriteria = 13;
+    string source = 14;
 }
 
 
@@ -82,10 +85,18 @@ message AccountBalanceRes {
 }
 
 //查询流水账
+message RecordReq {
+    string accountId = 1;
+    string userId = 2;
+    int64 pageSize = 3;
+    int64 page = 4;
+}
+
 message ConsumeRecordRes {
     int64 code = 1;
     string message = 2;
     repeated ConsumeRecord data = 3;
+    int64 count = 4;
 }
 
 
@@ -95,7 +106,7 @@ service ResourcesCenter {
     //查询账户资源余额
     rpc findAccountBalance (ResourcesReq) returns (AccountBalanceRes);
     //查询流水账
-    rpc findConsumeRecord (ResourcesReq) returns (ConsumeRecordRes);
+    rpc findConsumeRecord (RecordReq) returns (ConsumeRecordRes);
 
     //根据账户标识修改资源结存账
     rpc updateUserBalance (Balance) returns (Response);

+ 244 - 114
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -494,17 +494,20 @@ type ConsumeRecord struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
-	AccountId     string `protobuf:"bytes,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"`
-	RuleId        int64  `protobuf:"varint,7,opt,name=ruleId,proto3" json:"ruleId,omitempty"`
-	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"`
+	Id             int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	AccountId      string `protobuf:"bytes,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"`
+	RuleId         int64  `protobuf:"varint,6,opt,name=ruleId,proto3" json:"ruleId,omitempty"`
+	ExportTime     string `protobuf:"bytes,7,opt,name=exportTime,proto3" json:"exportTime,omitempty"`
+	UserType       int64  `protobuf:"varint,8,opt,name=userType,proto3" json:"userType,omitempty"`
+	DepartmentId   int64  `protobuf:"varint,9,opt,name=departmentId,proto3" json:"departmentId,omitempty"`
+	UserId         string `protobuf:"bytes,10,opt,name=userId,proto3" json:"userId,omitempty"`
+	DeductionNumb  int64  `protobuf:"varint,11,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"`
+	Url            string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`
+	SearchCriteria string `protobuf:"bytes,13,opt,name=searchCriteria,proto3" json:"searchCriteria,omitempty"`
+	Source         string `protobuf:"bytes,14,opt,name=source,proto3" json:"source,omitempty"`
 }
 
 func (x *ConsumeRecord) Reset() {
@@ -574,13 +577,6 @@ func (x *ConsumeRecord) GetExportNum() int64 {
 	return 0
 }
 
-func (x *ConsumeRecord) GetDeductionType() int64 {
-	if x != nil {
-		return x.DeductionType
-	}
-	return 0
-}
-
 func (x *ConsumeRecord) GetRuleId() int64 {
 	if x != nil {
 		return x.RuleId
@@ -616,6 +612,34 @@ func (x *ConsumeRecord) GetUserId() string {
 	return ""
 }
 
+func (x *ConsumeRecord) GetDeductionNumb() int64 {
+	if x != nil {
+		return x.DeductionNumb
+	}
+	return 0
+}
+
+func (x *ConsumeRecord) GetUrl() string {
+	if x != nil {
+		return x.Url
+	}
+	return ""
+}
+
+func (x *ConsumeRecord) GetSearchCriteria() string {
+	if x != nil {
+		return x.SearchCriteria
+	}
+	return ""
+}
+
+func (x *ConsumeRecord) GetSource() string {
+	if x != nil {
+		return x.Source
+	}
+	return ""
+}
+
 type ResourcesReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -792,6 +816,77 @@ func (x *AccountBalanceRes) GetData() []*ResourceBalance {
 }
 
 //查询流水账
+type RecordReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AccountId string `protobuf:"bytes,1,opt,name=accountId,proto3" json:"accountId,omitempty"`
+	UserId    string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
+	PageSize  int64  `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
+	Page      int64  `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
+}
+
+func (x *RecordReq) Reset() {
+	*x = RecordReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_resourcesCenter_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RecordReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecordReq) ProtoMessage() {}
+
+func (x *RecordReq) ProtoReflect() protoreflect.Message {
+	mi := &file_resourcesCenter_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use RecordReq.ProtoReflect.Descriptor instead.
+func (*RecordReq) Descriptor() ([]byte, []int) {
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *RecordReq) GetAccountId() string {
+	if x != nil {
+		return x.AccountId
+	}
+	return ""
+}
+
+func (x *RecordReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *RecordReq) GetPageSize() int64 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+func (x *RecordReq) GetPage() int64 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
 type ConsumeRecordRes struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -800,12 +895,13 @@ type ConsumeRecordRes struct {
 	Code    int64            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
 	Message string           `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
 	Data    []*ConsumeRecord `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
+	Count   int64            `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
 }
 
 func (x *ConsumeRecordRes) Reset() {
 	*x = ConsumeRecordRes{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_resourcesCenter_proto_msgTypes[9]
+		mi := &file_resourcesCenter_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -818,7 +914,7 @@ func (x *ConsumeRecordRes) String() string {
 func (*ConsumeRecordRes) ProtoMessage() {}
 
 func (x *ConsumeRecordRes) ProtoReflect() protoreflect.Message {
-	mi := &file_resourcesCenter_proto_msgTypes[9]
+	mi := &file_resourcesCenter_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -831,7 +927,7 @@ func (x *ConsumeRecordRes) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use ConsumeRecordRes.ProtoReflect.Descriptor instead.
 func (*ConsumeRecordRes) Descriptor() ([]byte, []int) {
-	return file_resourcesCenter_proto_rawDescGZIP(), []int{9}
+	return file_resourcesCenter_proto_rawDescGZIP(), []int{10}
 }
 
 func (x *ConsumeRecordRes) GetCode() int64 {
@@ -855,6 +951,13 @@ func (x *ConsumeRecordRes) GetData() []*ConsumeRecord {
 	return nil
 }
 
+func (x *ConsumeRecordRes) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
 var File_resourcesCenter_proto protoreflect.FileDescriptor
 
 var file_resourcesCenter_proto_rawDesc = []byte{
@@ -920,7 +1023,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	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,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xa5, 0x03, 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, 0x09, 0x52, 0x09,
@@ -930,71 +1033,85 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	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, 0x09, 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, 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,
+	0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x75, 0x6c,
+	0x65, 0x49, 0x64, 0x18, 0x06, 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,
+	0x07, 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, 0x08, 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, 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, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64,
+	0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x12,
+	0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
+	0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x72, 0x69, 0x74, 0x65,
+	0x72, 0x69, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63,
+	0x68, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
+	0x65, 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, 0x09, 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, 0x71,
+	0x0a, 0x09, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a,
+	0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x61, 0x67,
+	0x65, 0x22, 0x8a, 0x01, 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, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xac,
+	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, 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, 0x52, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75,
+	0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72,
+	0x64, 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 (
@@ -1009,7 +1126,7 @@ func file_resourcesCenter_proto_rawDescGZIP() []byte {
 	return file_resourcesCenter_proto_rawDescData
 }
 
-var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_resourcesCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
 var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*Response)(nil),          // 0: resourcesCenter.Response
 	(*Balance)(nil),           // 1: resourcesCenter.Balance
@@ -1020,27 +1137,28 @@ var file_resourcesCenter_proto_goTypes = []interface{}{
 	(*ResourcesReq)(nil),      // 6: resourcesCenter.ResourcesReq
 	(*ResourcesAuthRes)(nil),  // 7: resourcesCenter.ResourcesAuthRes
 	(*AccountBalanceRes)(nil), // 8: resourcesCenter.AccountBalanceRes
-	(*ConsumeRecordRes)(nil),  // 9: resourcesCenter.ConsumeRecordRes
+	(*RecordReq)(nil),         // 9: resourcesCenter.RecordReq
+	(*ConsumeRecordRes)(nil),  // 10: resourcesCenter.ConsumeRecordRes
 }
 var file_resourcesCenter_proto_depIdxs = []int32{
-	3, // 0: resourcesCenter.ResourcesAuthRes.data:type_name -> resourcesCenter.ResourcesAuth
-	4, // 1: resourcesCenter.AccountBalanceRes.data:type_name -> resourcesCenter.ResourceBalance
-	5, // 2: resourcesCenter.ConsumeRecordRes.data:type_name -> resourcesCenter.ConsumeRecord
-	6, // 3: resourcesCenter.ResourcesCenter.findResourcesAuth:input_type -> resourcesCenter.ResourcesReq
-	6, // 4: resourcesCenter.ResourcesCenter.findAccountBalance:input_type -> resourcesCenter.ResourcesReq
-	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
-	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
-	0, // 12: resourcesCenter.ResourcesCenter.updateUserDetailed:output_type -> resourcesCenter.Response
-	8, // [8:13] is the sub-list for method output_type
-	3, // [3:8] is the sub-list for method input_type
-	3, // [3:3] is the sub-list for extension type_name
-	3, // [3:3] is the sub-list for extension extendee
-	0, // [0:3] is the sub-list for field type_name
+	3,  // 0: resourcesCenter.ResourcesAuthRes.data:type_name -> resourcesCenter.ResourcesAuth
+	4,  // 1: resourcesCenter.AccountBalanceRes.data:type_name -> resourcesCenter.ResourceBalance
+	5,  // 2: resourcesCenter.ConsumeRecordRes.data:type_name -> resourcesCenter.ConsumeRecord
+	6,  // 3: resourcesCenter.ResourcesCenter.findResourcesAuth:input_type -> resourcesCenter.ResourcesReq
+	6,  // 4: resourcesCenter.ResourcesCenter.findAccountBalance:input_type -> resourcesCenter.ResourcesReq
+	9,  // 5: resourcesCenter.ResourcesCenter.findConsumeRecord:input_type -> resourcesCenter.RecordReq
+	1,  // 6: resourcesCenter.ResourcesCenter.updateUserBalance:input_type -> resourcesCenter.Balance
+	2,  // 7: resourcesCenter.ResourcesCenter.updateUserDetailed:input_type -> resourcesCenter.Detailed
+	8,  // 8: resourcesCenter.ResourcesCenter.findResourcesAuth:output_type -> resourcesCenter.AccountBalanceRes
+	8,  // 9: resourcesCenter.ResourcesCenter.findAccountBalance:output_type -> resourcesCenter.AccountBalanceRes
+	10, // 10: resourcesCenter.ResourcesCenter.findConsumeRecord:output_type -> resourcesCenter.ConsumeRecordRes
+	0,  // 11: resourcesCenter.ResourcesCenter.updateUserBalance:output_type -> resourcesCenter.Response
+	0,  // 12: resourcesCenter.ResourcesCenter.updateUserDetailed:output_type -> resourcesCenter.Response
+	8,  // [8:13] is the sub-list for method output_type
+	3,  // [3:8] is the sub-list for method input_type
+	3,  // [3:3] is the sub-list for extension type_name
+	3,  // [3:3] is the sub-list for extension extendee
+	0,  // [0:3] is the sub-list for field type_name
 }
 
 func init() { file_resourcesCenter_proto_init() }
@@ -1158,6 +1276,18 @@ func file_resourcesCenter_proto_init() {
 			}
 		}
 		file_resourcesCenter_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RecordReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_resourcesCenter_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*ConsumeRecordRes); i {
 			case 0:
 				return &v.state
@@ -1176,7 +1306,7 @@ func file_resourcesCenter_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_resourcesCenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   10,
+			NumMessages:   11,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -1207,7 +1337,7 @@ type ResourcesCenterClient interface {
 	//查询账户资源余额
 	FindAccountBalance(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*AccountBalanceRes, error)
 	//查询流水账
-	FindConsumeRecord(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error)
+	FindConsumeRecord(ctx context.Context, in *RecordReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error)
 	//根据账户标识修改资源结存账
 	UpdateUserBalance(ctx context.Context, in *Balance, opts ...grpc.CallOption) (*Response, error)
 	//根据账户标识记录资源使用流水账
@@ -1240,7 +1370,7 @@ func (c *resourcesCenterClient) FindAccountBalance(ctx context.Context, in *Reso
 	return out, nil
 }
 
-func (c *resourcesCenterClient) FindConsumeRecord(ctx context.Context, in *ResourcesReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error) {
+func (c *resourcesCenterClient) FindConsumeRecord(ctx context.Context, in *RecordReq, opts ...grpc.CallOption) (*ConsumeRecordRes, error) {
 	out := new(ConsumeRecordRes)
 	err := c.cc.Invoke(ctx, "/resourcesCenter.ResourcesCenter/findConsumeRecord", in, out, opts...)
 	if err != nil {
@@ -1274,7 +1404,7 @@ type ResourcesCenterServer interface {
 	//查询账户资源余额
 	FindAccountBalance(context.Context, *ResourcesReq) (*AccountBalanceRes, error)
 	//查询流水账
-	FindConsumeRecord(context.Context, *ResourcesReq) (*ConsumeRecordRes, error)
+	FindConsumeRecord(context.Context, *RecordReq) (*ConsumeRecordRes, error)
 	//根据账户标识修改资源结存账
 	UpdateUserBalance(context.Context, *Balance) (*Response, error)
 	//根据账户标识记录资源使用流水账
@@ -1291,7 +1421,7 @@ func (*UnimplementedResourcesCenterServer) FindResourcesAuth(context.Context, *R
 func (*UnimplementedResourcesCenterServer) FindAccountBalance(context.Context, *ResourcesReq) (*AccountBalanceRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindAccountBalance not implemented")
 }
-func (*UnimplementedResourcesCenterServer) FindConsumeRecord(context.Context, *ResourcesReq) (*ConsumeRecordRes, error) {
+func (*UnimplementedResourcesCenterServer) FindConsumeRecord(context.Context, *RecordReq) (*ConsumeRecordRes, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindConsumeRecord not implemented")
 }
 func (*UnimplementedResourcesCenterServer) UpdateUserBalance(context.Context, *Balance) (*Response, error) {
@@ -1342,7 +1472,7 @@ func _ResourcesCenter_FindAccountBalance_Handler(srv interface{}, ctx context.Co
 }
 
 func _ResourcesCenter_FindConsumeRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ResourcesReq)
+	in := new(RecordReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
@@ -1354,7 +1484,7 @@ func _ResourcesCenter_FindConsumeRecord_Handler(srv interface{}, ctx context.Con
 		FullMethod: "/resourcesCenter.ResourcesCenter/FindConsumeRecord",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(ResourcesCenterServer).FindConsumeRecord(ctx, req.(*ResourcesReq))
+		return srv.(ResourcesCenterServer).FindConsumeRecord(ctx, req.(*RecordReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }

+ 7 - 6
rpc/resourcesCenterclient/resourcescenter.go

@@ -14,16 +14,17 @@ import (
 )
 
 type (
-	Balance           = resourcesCenter.Balance
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
 	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
-	AccountBalanceRes = resourcesCenter.AccountBalanceRes
 	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
 	Response          = resourcesCenter.Response
+	Balance           = resourcesCenter.Balance
 	Detailed          = resourcesCenter.Detailed
-	ResourceBalance   = resourcesCenter.ResourceBalance
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
 	ConsumeRecord     = resourcesCenter.ConsumeRecord
+	ResourceBalance   = resourcesCenter.ResourceBalance
 	ResourcesReq      = resourcesCenter.ResourcesReq
+	AccountBalanceRes = resourcesCenter.AccountBalanceRes
+	RecordReq         = resourcesCenter.RecordReq
 
 	ResourcesCenter interface {
 		// 查询账户资源权限
@@ -31,7 +32,7 @@ type (
 		// 查询账户资源余额
 		FindAccountBalance(ctx context.Context, in *ResourcesReq) (*AccountBalanceRes, error)
 		// 查询流水账
-		FindConsumeRecord(ctx context.Context, in *ResourcesReq) (*ConsumeRecordRes, error)
+		FindConsumeRecord(ctx context.Context, in *RecordReq) (*ConsumeRecordRes, error)
 		// 根据账户标识修改资源结存账
 		UpdateUserBalance(ctx context.Context, in *Balance) (*Response, error)
 		// 根据账户标识记录资源使用流水账
@@ -62,7 +63,7 @@ func (m *defaultResourcesCenter) FindAccountBalance(ctx context.Context, in *Res
 }
 
 // 查询流水账
-func (m *defaultResourcesCenter) FindConsumeRecord(ctx context.Context, in *ResourcesReq) (*ConsumeRecordRes, error) {
+func (m *defaultResourcesCenter) FindConsumeRecord(ctx context.Context, in *RecordReq) (*ConsumeRecordRes, error) {
 	client := resourcesCenter.NewResourcesCenterClient(m.cli.Conn())
 	return client.FindConsumeRecord(ctx, in)
 }

+ 2 - 2
rpc/test/company_test.go

@@ -43,7 +43,7 @@ func Test_UpdateUserBalance(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
 	req := &resourcesCenter.Balance{
-		AccountId:    111,
+		AccountId:    "111",
 		CompanyId:    0,
 		DepartmentId: 0,
 		Name:         "数据导出",
@@ -80,7 +80,7 @@ func Test_UpdateUserDetailed(t *testing.T) {
 	ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
 	FileSystem := resourcesCenterclient.NewResourcesCenter(zrpc.MustNewClient(c.FileSystemConf))
 	req := &resourcesCenter.Detailed{
-		AccountId:     111,
+		AccountId:     "111",
 		CompanyId:     0,
 		ResourceType:  "001",
 		ExportNum:     1300,

+ 7 - 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: 111,
+		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: 111,
+		AccountId: "111",
 	}
 	res, err := FileSystem.FindAccountBalance(ctx, req)
 	log.Println("结果", res)
@@ -43,8 +43,11 @@ func Test_FindAccountBalance(t *testing.T) {
 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: 111,
+	req := &resourcesCenter.RecordReq{
+		AccountId: "111",
+		UserId:"1111111",
+		Page:1,
+		PageSize:10,
 	}
 	res, err := FileSystem.FindConsumeRecord(ctx, req)
 	log.Println("结果", res)

+ 17 - 13
service/resourceManageService.go

@@ -55,26 +55,30 @@ func (service *ResourceManageService) FindAccountBalance(in *resourcesCenter.Res
 }
 
 //查询流水账
-func (service *ResourceManageService) FindConsumeRecord(in *resourcesCenter.ResourcesReq) ([]*resourcesCenter.ConsumeRecord, error) {
+func (service *ResourceManageService) FindConsumeRecord(in *resourcesCenter.RecordReq) ([]*resourcesCenter.ConsumeRecord, error) {
 	orm := entity.Engine.NewSession()
 	var recordArr []*entity.ConsumeRecord
 	dataList := make([]*resourcesCenter.ConsumeRecord, 0)
-	err := orm.Table("consume_record").
-		Where("accountId = ?", in.AccountId).Find(&recordArr)
-	if err != nil {
+	count, err := orm.Table("consume_record").
+		Where("accountId = ? and userId = ?", in.AccountId, in.UserId).
+		Limit(int(in.PageSize), (int(in.Page)-1)*int(in.PageSize)).OrderBy("id desc").FindAndCount(&recordArr)
+	if err != nil && count == 0 {
 		return dataList, err
 	}
 	for _, v := range recordArr {
 		dataList = append(dataList, &resourcesCenter.ConsumeRecord{
-			Id:            v.Id,
-			CompanyId:     v.CompanyId,
-			DepartmentId:  v.DepartmentId,
-			ResourceType:  v.ResourceType,
-			ExportNum:     v.ExportNum,
-			DeductionType: v.DeductionType,
-			RuleId:        v.RuleId,
-			ExportTime:    v.ExportTime,
-			UserType:      v.UserType,
+			Id:             v.Id,
+			CompanyId:      v.CompanyId,
+			DepartmentId:   v.DepartmentId,
+			ResourceType:   v.ResourceType,
+			ExportNum:      v.ExportNum,
+			RuleId:         v.RuleId,
+			ExportTime:     v.ExportTime,
+			UserType:       v.UserType,
+			DeductionNumb:  v.DeductionNumb,
+			Url:            v.Url,
+			SearchCriteria: v.SearchCriteria,
+			Source:         v.Source,
 		})
 	}
 	return dataList, nil