Merge branch 'dev-lzh-1009' into dev
This commit is contained in:
commit
7ea566bd9b
@ -218,12 +218,10 @@ func CreateBundleBalance(data model.BundleBalance) error {
|
|||||||
return app.ModuleClients.BundleDB.Create(&data).Error
|
return app.ModuleClients.BundleDB.Create(&data).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) {
|
func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLog, total int64, err error) {
|
||||||
session := app.ModuleClients.BundleDB.Table("cast_cost_log as ccl").Select("ccl.*,cwe.artist_confirmed_time").
|
session := app.ModuleClients.BundleDB.Model(&model.CostLog{})
|
||||||
Joins("left join cast_work_extra as cwe on cwe.work_uuid = ccl.work_uuid").
|
if req.WorkTitle != "" {
|
||||||
Where("ccl.deleted_at = 0")
|
session = session.Where("work_title like ?", "%"+req.WorkTitle+"%")
|
||||||
if req.Title != "" {
|
|
||||||
session = session.Where("title = ?", req.Title)
|
|
||||||
}
|
}
|
||||||
if req.Platform != 0 {
|
if req.Platform != 0 {
|
||||||
session = session.Where(fmt.Sprintf("JSON_CONTAINS(platform_ids,'%d')", req.Platform))
|
session = session.Where(fmt.Sprintf("JSON_CONTAINS(platform_ids,'%d')", req.Platform))
|
||||||
|
@ -118,6 +118,7 @@ type CastWorkLog struct {
|
|||||||
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);comment:艺人ID;NOT NULL" json:"artist_uuid"`
|
ArtistUuid string `gorm:"column:artist_uuid;type:varchar(50);comment:艺人ID;NOT NULL" json:"artist_uuid"`
|
||||||
MediaAccUserIds string `gorm:"column:media_acc_user_ids;type:json;comment:自媒体账号user_ids集合;NOT NULL" json:"media_acc_user_ids"`
|
MediaAccUserIds string `gorm:"column:media_acc_user_ids;type:json;comment:自媒体账号user_ids集合;NOT NULL" json:"media_acc_user_ids"`
|
||||||
MediaNames string `gorm:"column:media_names;type:varchar(600);comment:自媒体账号名称集合;NOT NULL" json:"media_names"`
|
MediaNames string `gorm:"column:media_names;type:varchar(600);comment:自媒体账号名称集合;NOT NULL" json:"media_names"`
|
||||||
|
CostType int `gorm:"column:cost_type;type:int(11)" json:"costType"`
|
||||||
ConfirmedAt int64 `gorm:"column:confirmed_at;type:int(11)" json:"confirmedAt"`
|
ConfirmedAt int64 `gorm:"column:confirmed_at;type:int(11)" json:"confirmedAt"`
|
||||||
CreatedAt int `gorm:"column:created_at;type:int(11)" json:"created_at"`
|
CreatedAt int `gorm:"column:created_at;type:int(11)" json:"created_at"`
|
||||||
UpdatedAt int `gorm:"column:updated_at;type:int(11)" json:"updated_at"`
|
UpdatedAt int `gorm:"column:updated_at;type:int(11)" json:"updated_at"`
|
||||||
|
@ -757,7 +757,7 @@ message GetUsedRecordListReq{
|
|||||||
string account = 3;
|
string account = 3;
|
||||||
int32 platform = 4;
|
int32 platform = 4;
|
||||||
int32 type = 5;
|
int32 type = 5;
|
||||||
string title = 6;
|
string workTitle = 6;
|
||||||
int64 submitTimeStart = 7;
|
int64 submitTimeStart = 7;
|
||||||
int64 submitTimeEnd = 8;
|
int64 submitTimeEnd = 8;
|
||||||
int32 page = 9;
|
int32 page = 9;
|
||||||
@ -829,6 +829,7 @@ message workItem{
|
|||||||
int64 createdAt = 11; // 提交时间
|
int64 createdAt = 11; // 提交时间
|
||||||
string artistName = 12;
|
string artistName = 12;
|
||||||
string artistUuid = 13;
|
string artistUuid = 13;
|
||||||
|
uint32 costType = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ToBeComfirmedWorksResp{
|
message ToBeComfirmedWorksResp{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
math "math"
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||||
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user