jiaojiao7 4 gadi atpakaļ
vecāks
revīzija
43aeaf9809

+ 1 - 1
entity/resources.go

@@ -25,7 +25,7 @@ type ConsumeRecord struct {
 	ResourceType   string `xorm:"resourceType" form:"resourceType" json:"resourceType"`    //资源类型
 	ExportNum      int64  `xorm:"exportNum" form:"exportNum" json:"exportNum"`             //导出数量
 	DeductionNumb  int64  `xorm:"deductionNumb" form:"deductionNumb" json:"deductionNumb"` //扣除数量
-	RuleId         int64  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
+	RuleId         string  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
 	ExportTime     string `xorm:"exportTime" form:"exportTime" json:"exportTime"`
 	UserType       int64  `xorm:"userType" form:"userType" json:"userType"`
 	Remarks        string `xorm:"remarks" form:"remarks" json:"remarks"`

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

@@ -44,7 +44,7 @@ func (l *PurchaseUserBalanceLogic) PurchaseUserBalance(in *resourcesCenter.Resou
 	detailed := &resourcesCenter.Detailed{
 		AccountId:     in.AccountId,
 		CompanyId:     in.CompanyId,
-		ResourceType:  in.AccountId,
+		ResourceType:  in.ResourceType,
 		ExportNum:     in.Number,
 		DepartmentId:  in.DepartmentId,
 		Name:          in.Name,

+ 1 - 1
rpc/resourcesCenter.proto

@@ -77,7 +77,7 @@ message ConsumeRecord {
     string resourceType = 4; //资源代码
     int64 exportNum = 5; //导出数量
     int64 deductionNumb = 6; //扣除数量
-    int64 ruleId = 7; //导出规则标识
+    string ruleId = 7; //导出规则标识
     string exportTime = 8; //导出时间
     int64 userType = 9; //消费、充值
     string remarks = 10; //备注

+ 4 - 4
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -691,7 +691,7 @@ type ConsumeRecord struct {
 	ResourceType  string `protobuf:"bytes,4,opt,name=resourceType,proto3" json:"resourceType,omitempty"`    //资源代码
 	ExportNum     int64  `protobuf:"varint,5,opt,name=exportNum,proto3" json:"exportNum,omitempty"`         //导出数量
 	DeductionNumb int64  `protobuf:"varint,6,opt,name=deductionNumb,proto3" json:"deductionNumb,omitempty"` //扣除数量
-	RuleId        int64  `protobuf:"varint,7,opt,name=ruleId,proto3" json:"ruleId,omitempty"`               //导出规则标识
+	RuleId        string `protobuf:"bytes,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"`           //消费、充值
 	Remarks       string `protobuf:"bytes,10,opt,name=remarks,proto3" json:"remarks,omitempty"`             //备注
@@ -771,11 +771,11 @@ func (x *ConsumeRecord) GetDeductionNumb() int64 {
 	return 0
 }
 
-func (x *ConsumeRecord) GetRuleId() int64 {
+func (x *ConsumeRecord) GetRuleId() string {
 	if x != nil {
 		return x.RuleId
 	}
-	return 0
+	return ""
 }
 
 func (x *ConsumeRecord) GetExportTime() string {
@@ -1377,7 +1377,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75,
 	0x6d, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x63, 0x74,
 	0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 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,
+	0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 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,

+ 10 - 10
rpc/resourcesCenterclient/resourcescenter.go

@@ -14,20 +14,20 @@ import (
 )
 
 type (
-	PreviewReq        = resourcesCenter.PreviewReq
+	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
+	Balance           = resourcesCenter.Balance
+	Detailed          = resourcesCenter.Detailed
+	ConsumeRecord     = resourcesCenter.ConsumeRecord
 	PreviewRes        = resourcesCenter.PreviewRes
-	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
 	AccountBalanceRes = resourcesCenter.AccountBalanceRes
-	RecordReq         = resourcesCenter.RecordReq
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
-	ConsumeRecord     = resourcesCenter.ConsumeRecord
-	ResourcesReq      = resourcesCenter.ResourcesReq
-	ResourceBalance   = resourcesCenter.ResourceBalance
 	Response          = resourcesCenter.Response
+	PreviewReq        = resourcesCenter.PreviewReq
+	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
 	Resources         = resourcesCenter.Resources
-	Detailed          = resourcesCenter.Detailed
-	Balance           = resourcesCenter.Balance
-	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
+	ResourceBalance   = resourcesCenter.ResourceBalance
+	ResourcesReq      = resourcesCenter.ResourcesReq
+	RecordReq         = resourcesCenter.RecordReq
 
 	ResourcesCenter interface {
 		// 查询账户资源权限