修改使用记录的用户名搜索

This commit is contained in:
lzh 2025-06-23 14:11:07 +08:00
parent 37bae4398d
commit 24c701d9a1
4 changed files with 8 additions and 8 deletions

View File

@ -224,8 +224,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))

View File

@ -594,7 +594,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;

View File

@ -5153,7 +5153,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"`
@ -5209,11 +5209,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 {
@ -7176,7 +7176,7 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 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,
0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 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,

View File

@ -7,8 +7,8 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)