jiaojiao7 4 年 前
コミット
b7875c8f38

+ 1 - 1
entity/resources.go

@@ -25,7 +25,7 @@ type ConsumeRecord struct {
 	ResourceType  string `xorm:"resourceType" form:"resourceType" json:"resourceType"`    //资源类型
 	Number        int64  `xorm:"number" form:"number" json:"number"`                      //数量
 	DeductionNumb int64  `xorm:"deductionNumb" form:"deductionNumb" json:"deductionNumb"` //扣除数量
-	RuleId        int64  `xorm:"ruleId" form:"ruleId" json:"ruleId"`
+	RuleId        string `xorm:"ruleId" form:"ruleId" json:"ruleId"`
 	CreateTime    string `xorm:"createTime" form:"createTime" json:"createTime"`
 	UserType      int64  `xorm:"userType" form:"userType" json:"userType"`
 	Remarks       string `xorm:"remarks" form:"remarks" json:"remarks"`

+ 2 - 2
rpc/resourcesCenter.proto

@@ -1,7 +1,7 @@
 syntax = "proto3";
 
 package resourcesCenter;
-option go_package = "resourcesCenter/";
+//option go_package = "resourcesCenter/";
 message Response {
     int64 code = 1; //响应代码
     string message = 2; //响应消息
@@ -76,7 +76,7 @@ message ConsumeRecord {
     string resourceType = 4; //资源代码
     int64 number = 5; //数量
     int64 deductionNumb = 6; //扣除数量
-    int64 ruleId = 7; //导出规则标识
+    string ruleId = 7; //导出规则标识
     string createTime = 8; //创建时间
     int64 userType = 9; //消费、充值
     string remarks = 10; //备注

+ 12 - 7
rpc/resourcesCenter/resourcesCenter.pb.go

@@ -1,6 +1,6 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.25.0
 // 	protoc        v3.15.1
 // source: resourcesCenter.proto
 
@@ -8,6 +8,7 @@ package resourcesCenter
 
 import (
 	context "context"
+	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
@@ -24,6 +25,11 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+// This is a compile-time assertion that a sufficiently up-to-date version
+// of the legacy proto package is being used.
+const _ = proto.ProtoPackageIsVersion4
+
+//option go_package = "resourcesCenter/";
 type Response struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -685,7 +691,7 @@ type ConsumeRecord struct {
 	ResourceType  string `protobuf:"bytes,4,opt,name=resourceType,proto3" json:"resourceType,omitempty"`    //资源代码
 	Number        int64  `protobuf:"varint,5,opt,name=number,proto3" json:"number,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"`                //导出规则标识
 	CreateTime    string `protobuf:"bytes,8,opt,name=createTime,proto3" json:"createTime,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"`             //备注
@@ -765,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) GetCreateTime() string {
@@ -1370,7 +1376,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x75, 0x6d, 0x62, 0x65, 0x72, 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,
+	0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c,
 	0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
 	0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
 	0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18,
@@ -1460,8 +1466,7 @@ var file_resourcesCenter_proto_rawDesc = []byte{
 	0x65, 0x73, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
 	0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43,
 	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73,
-	0x42, 0x12, 0x5a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x43, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 8 - 8
rpc/resourcesCenterclient/resourcescenter.go

@@ -1,9 +1,9 @@
 // Code generated by goctl. DO NOT EDIT!
 // Source: resourcesCenter.proto
 
-//go:generate mockgen -destination ./resourcescenter_mock.go -package resourcescenter -source $GOFILE
+//go:generate mockgen -destination ./resourcescenter_mock.go -package resourcescenterclient -source $GOFILE
 
-package resourcesCenterclient
+package resourcescenterclient
 
 import (
 	"context"
@@ -14,19 +14,19 @@ import (
 )
 
 type (
-	ResourcesAuth     = resourcesCenter.ResourcesAuth
+	PreviewReq        = resourcesCenter.PreviewReq
 	Resources         = resourcesCenter.Resources
 	PreviewRes        = resourcesCenter.PreviewRes
 	ResourcesAuthRes  = resourcesCenter.ResourcesAuthRes
-	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
-	ResourcesReq      = resourcesCenter.ResourcesReq
-	ResourceBalance   = resourcesCenter.ResourceBalance
 	ConsumeRecord     = resourcesCenter.ConsumeRecord
-	PreviewReq        = resourcesCenter.PreviewReq
+	Detailed          = resourcesCenter.Detailed
+	ResourceBalance   = resourcesCenter.ResourceBalance
+	ResourcesReq      = resourcesCenter.ResourcesReq
 	AccountBalanceRes = resourcesCenter.AccountBalanceRes
 	RecordReq         = resourcesCenter.RecordReq
-	Detailed          = resourcesCenter.Detailed
 	Balance           = resourcesCenter.Balance
+	ResourcesAuth     = resourcesCenter.ResourcesAuth
+	ConsumeRecordRes  = resourcesCenter.ConsumeRecordRes
 	Response          = resourcesCenter.Response
 
 	ResourcesCenter interface {