脚本优化

This commit is contained in:
戴育兵 2025-11-24 15:00:08 +08:00
parent 9d270bcce3
commit ea46576511
3 changed files with 28 additions and 12 deletions

View File

@ -1451,6 +1451,7 @@ type WorkListReq struct {
PageSize int32 `protobuf:"varint,13,opt,name=pageSize,proto3" json:"pageSize"`
MediaAccountUuids []string `protobuf:"bytes,14,rep,name=mediaAccountUuids,proto3" json:"mediaAccountUuids"`
CostType int32 `protobuf:"varint,15,opt,name=costType,proto3" json:"costType"`
ScriptUuid string `protobuf:"bytes,16,opt,name=scriptUuid,proto3" json:"scriptUuid"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1590,6 +1591,13 @@ func (x *WorkListReq) GetCostType() int32 {
return 0
}
func (x *WorkListReq) GetScriptUuid() string {
if x != nil {
return x.ScriptUuid
}
return ""
}
type WorkListResp struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data []*WorkListResp_Info `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
@ -5415,7 +5423,7 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
"scriptUuid\x18\x15 \x01(\tR\n" +
"scriptUuid\"1\n" +
"\x13UpdateWorkVideoResp\x12\x1a\n" +
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\"\xab\x04\n" +
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\"\xcb\x04\n" +
"\vWorkListReq\x12\x1c\n" +
"\tartistVal\x18\x01 \x01(\tR\tartistVal\x12\x1e\n" +
"\n" +
@ -5436,7 +5444,10 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
"\x04page\x18\f \x01(\x05R\x04page\x12\x1a\n" +
"\bpageSize\x18\r \x01(\x05R\bpageSize\x12,\n" +
"\x11mediaAccountUuids\x18\x0e \x03(\tR\x11mediaAccountUuids\x12\x1a\n" +
"\bcostType\x18\x0f \x01(\x05R\bcostType\"\xaa\x05\n" +
"\bcostType\x18\x0f \x01(\x05R\bcostType\x12\x1e\n" +
"\n" +
"scriptUuid\x18\x10 \x01(\tR\n" +
"scriptUuid\"\xaa\x05\n" +
"\fWorkListResp\x12+\n" +
"\x04data\x18\x01 \x03(\v2\x17.Cast.WorkListResp.InfoR\x04data\x12\x14\n" +
"\x05count\x18\x02 \x01(\x03R\x05count\x1a\xd6\x04\n" +

View File

@ -1803,6 +1803,8 @@ func (m *WorkListReq) validate(all bool) error {
// no validation rules for CostType
// no validation rules for ScriptUuid
if len(errors) > 0 {
return WorkListReqMultiError(errors)
}

View File

@ -152,21 +152,24 @@ func ImportBatch(ctx *gin.Context) {
SubNum: row[2],
Domain: "app",
})
if _err != nil {
zap.L().Error("AccountFieeProvider.SubNumGetInfo", zap.Error(_err))
service.Error(ctx, _err)
return
}
temp := cast.VideoScriptInfo{
Title: row[3],
Content: row[4],
ArtistUuid: fmt.Sprint(subInfoResp.Id),
ArtistName: subInfoResp.Name,
ArtistPhone: subInfoResp.TelNum,
//ArtistUuid: fmt.Sprint(subInfoResp.Id),
//ArtistName: subInfoResp.Name,
//ArtistPhone: subInfoResp.TelNum,
ArtistNum: row[2],
CreatorUuid: fmt.Sprint(userInfo.ID),
CreatorName: userInfo.Name,
}
if _err != nil {
zap.L().Error("AccountFieeProvider.SubNumGetInfo", zap.Error(_err))
temp.Remark = _err.Error()
} else {
temp.ArtistUuid = fmt.Sprint(subInfoResp.Id)
temp.ArtistName = subInfoResp.Name
temp.ArtistPhone = subInfoResp.TelNum
}
req.Data = append(req.Data, &temp)
}
resp, _err := service.CastProvider.UpdateVideoScriptBatch(context.Background(), &req)