diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index 31cd8ac..f36af79 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -226,8 +226,8 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLog, tota if req.Platform != 0 { session = session.Where(fmt.Sprintf("JSON_CONTAINS(platform_ids,'%d')", req.Platform)) } - if req.Account != 0 { - session = session.Where(fmt.Sprintf("JSON_CONTAINS(media_names,'%d')", req.Account)) + if req.Account != "" { + session = session.Where(fmt.Sprintf("JSON_CONTAINS(media_names,'%s')", req.Account)) } if req.SubmitTimeEnd != 0 { session = session.Where("submit_time <= ?", time.UnixMilli(req.SubmitTimeEnd)) diff --git a/pb/bundle.proto b/pb/bundle.proto index eb064e3..3b05afb 100644 --- a/pb/bundle.proto +++ b/pb/bundle.proto @@ -676,7 +676,7 @@ message AddBundleBalanceResp{ message GetUsedRecordListReq{ string user = 1; string operator = 2; - int32 account = 3; + string account = 3; int32 platform = 4; int32 type = 5; string title = 6; diff --git a/pb/bundle/bundle.pb.go b/pb/bundle/bundle.pb.go index ec11e53..b252a57 100644 --- a/pb/bundle/bundle.pb.go +++ b/pb/bundle/bundle.pb.go @@ -5944,7 +5944,7 @@ type GetUsedRecordListReq struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - Account int32 `protobuf:"varint,3,opt,name=account,proto3" json:"account,omitempty"` + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` Platform int32 `protobuf:"varint,4,opt,name=platform,proto3" json:"platform,omitempty"` Type int32 `protobuf:"varint,5,opt,name=type,proto3" json:"type,omitempty"` Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"` @@ -6000,11 +6000,11 @@ func (x *GetUsedRecordListReq) GetOperator() string { return "" } -func (x *GetUsedRecordListReq) GetAccount() int32 { +func (x *GetUsedRecordListReq) GetAccount() string { if x != nil { return x.Account } - return 0 + return "" } func (x *GetUsedRecordListReq) GetPlatform() int32 { @@ -8326,7 +8326,7 @@ var file_pb_bundle_proto_rawDesc = []byte{ 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,