From ea465765116189d9ec5a18fe3ce9076685844229 Mon Sep 17 00:00:00 2001 From: daiyb <570956418@qq.com> Date: Mon, 24 Nov 2025 15:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/cast/cast.pb.go | 15 +++++++++++++-- api/cast/cast.pb.validate.go | 2 ++ pkg/service/cast/script.go | 23 +++++++++++++---------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/api/cast/cast.pb.go b/api/cast/cast.pb.go index ee419ae..80f45d2 100644 --- a/api/cast/cast.pb.go +++ b/api/cast/cast.pb.go @@ -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" + diff --git a/api/cast/cast.pb.validate.go b/api/cast/cast.pb.validate.go index 5659452..69029a5 100644 --- a/api/cast/cast.pb.validate.go +++ b/api/cast/cast.pb.validate.go @@ -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) } diff --git a/pkg/service/cast/script.go b/pkg/service/cast/script.go index 67ea9d6..66b1350 100644 --- a/pkg/service/cast/script.go +++ b/pkg/service/cast/script.go @@ -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, + Title: row[3], + Content: row[4], + //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)