Merge branch 'feat-cjy-tag' into dev
# Conflicts: # api/cast/cast.pb.go # api/cast/cast.pb.validate.go
This commit is contained in:
commit
66287ee0d0
12139
api/cast/cast.pb.go
12139
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -104,6 +104,7 @@ type CastClient interface {
|
|||||||
CalculateMediaMetricsByWorks(ctx context.Context, in *CalculateMediaMetricsByWorksReq, opts ...grpc_go.CallOption) (*CalculateMediaMetricsByWorksResp, common.ErrorWithAttachment)
|
CalculateMediaMetricsByWorks(ctx context.Context, in *CalculateMediaMetricsByWorksReq, opts ...grpc_go.CallOption) (*CalculateMediaMetricsByWorksResp, common.ErrorWithAttachment)
|
||||||
// 艺人AyrShare信息相关接口
|
// 艺人AyrShare信息相关接口
|
||||||
GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyrShareInfoReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoResp, common.ErrorWithAttachment)
|
GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyrShareInfoReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoResp, common.ErrorWithAttachment)
|
||||||
|
GetArtistAyrShareInfoByPlatformIDs(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoByPlatformIDsResp, common.ErrorWithAttachment)
|
||||||
// 作品平台信息相关接口
|
// 作品平台信息相关接口
|
||||||
ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment)
|
ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment)
|
||||||
// 任务列表相关接口
|
// 任务列表相关接口
|
||||||
@ -124,80 +125,81 @@ type castClient struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CastClientImpl struct {
|
type CastClientImpl struct {
|
||||||
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
||||||
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||||
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*UnbindManagerResp, error)
|
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*UnbindManagerResp, error)
|
||||||
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
||||||
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||||
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||||
MediaInfo func(ctx context.Context, in *MediaInfoReq) (*MediaInfoResp, error)
|
MediaInfo func(ctx context.Context, in *MediaInfoReq) (*MediaInfoResp, error)
|
||||||
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
|
||||||
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
||||||
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
|
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
|
||||||
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
||||||
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||||
MediaWorks func(ctx context.Context, in *MediaWorksReq) (*MediaWorksResp, error)
|
MediaWorks func(ctx context.Context, in *MediaWorksReq) (*MediaWorksResp, error)
|
||||||
Publish func(ctx context.Context, in *PublishReq) (*PublishResp, error)
|
Publish func(ctx context.Context, in *PublishReq) (*PublishResp, error)
|
||||||
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
||||||
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
||||||
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
||||||
ArtistInfo func(ctx context.Context, in *ArtistInfoReq) (*ArtistInfoResp, error)
|
ArtistInfo func(ctx context.Context, in *ArtistInfoReq) (*ArtistInfoResp, error)
|
||||||
ImportWorkBatch func(ctx context.Context, in *ImportWorkBatchReq) (*ImportWorkBatchResp, error)
|
ImportWorkBatch func(ctx context.Context, in *ImportWorkBatchReq) (*ImportWorkBatchResp, error)
|
||||||
UpdateWorkPlatformInfo func(ctx context.Context, in *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
UpdateWorkPlatformInfo func(ctx context.Context, in *UpdateWorkPlatformInfoReq) (*UpdateWorkPlatformInfoResp, error)
|
||||||
UpdateWorkPublishLog func(ctx context.Context, in *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
UpdateWorkPublishLog func(ctx context.Context, in *UpdateWorkPublishLogReq) (*emptypb.Empty, error)
|
||||||
RefreshWorkList func(ctx context.Context, in *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
RefreshWorkList func(ctx context.Context, in *RefreshWorkListReq) (*RefreshWorkListResp, error)
|
||||||
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||||
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
OAuthAccountV2 func(ctx context.Context, in *OAuthAccountV2Req) (*OAuthAccountV2Resp, error)
|
||||||
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||||
UpdateOAuth func(ctx context.Context, in *UpdateOAuthReq) (*emptypb.Empty, error)
|
UpdateOAuth func(ctx context.Context, in *UpdateOAuthReq) (*emptypb.Empty, error)
|
||||||
RefreshToken func(ctx context.Context, in *RefreshTokenReq) (*RefreshTokenResp, error)
|
RefreshToken func(ctx context.Context, in *RefreshTokenReq) (*RefreshTokenResp, error)
|
||||||
PublishMediaInfo func(ctx context.Context, in *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
PublishMediaInfo func(ctx context.Context, in *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
||||||
Tools func(ctx context.Context, in *ToolsReq) (*emptypb.Empty, error)
|
Tools func(ctx context.Context, in *ToolsReq) (*emptypb.Empty, error)
|
||||||
UpdateVideoScript func(ctx context.Context, in *UpdateVideoScriptReq) (*UpdateVideoScriptResp, error)
|
UpdateVideoScript func(ctx context.Context, in *UpdateVideoScriptReq) (*UpdateVideoScriptResp, error)
|
||||||
GetVideoScript func(ctx context.Context, in *GetVideoScriptReq) (*GetVideoScriptResp, error)
|
GetVideoScript func(ctx context.Context, in *GetVideoScriptReq) (*GetVideoScriptResp, error)
|
||||||
ListVideoScripts func(ctx context.Context, in *ListVideoScriptsReq) (*ListVideoScriptsResp, error)
|
ListVideoScripts func(ctx context.Context, in *ListVideoScriptsReq) (*ListVideoScriptsResp, error)
|
||||||
DeleteVideoScript func(ctx context.Context, in *DeleteVideoScriptReq) (*emptypb.Empty, error)
|
DeleteVideoScript func(ctx context.Context, in *DeleteVideoScriptReq) (*emptypb.Empty, error)
|
||||||
UpdateVideoScriptBatch func(ctx context.Context, in *UpdateVideoScriptBatchReq) (*UpdateVideoScriptBatchResp, error)
|
UpdateVideoScriptBatch func(ctx context.Context, in *UpdateVideoScriptBatchReq) (*UpdateVideoScriptBatchResp, error)
|
||||||
UpdateScriptStatus func(ctx context.Context, in *UpdateScriptStatusReq) (*emptypb.Empty, error)
|
UpdateScriptStatus func(ctx context.Context, in *UpdateScriptStatusReq) (*emptypb.Empty, error)
|
||||||
GetLayout func(ctx context.Context, in *GetLayoutReq) (*GetLayoutResp, error)
|
GetLayout func(ctx context.Context, in *GetLayoutReq) (*GetLayoutResp, error)
|
||||||
SetLayout func(ctx context.Context, in *SetLayoutReq) (*emptypb.Empty, error)
|
SetLayout func(ctx context.Context, in *SetLayoutReq) (*emptypb.Empty, error)
|
||||||
UpdatePrompt func(ctx context.Context, in *UpdatePromptReq) (*emptypb.Empty, error)
|
UpdatePrompt func(ctx context.Context, in *UpdatePromptReq) (*emptypb.Empty, error)
|
||||||
DeletePrompt func(ctx context.Context, in *DeletePromptReq) (*emptypb.Empty, error)
|
DeletePrompt func(ctx context.Context, in *DeletePromptReq) (*emptypb.Empty, error)
|
||||||
GetPrompt func(ctx context.Context, in *GetPromptReq) (*GetPromptResp, error)
|
GetPrompt func(ctx context.Context, in *GetPromptReq) (*GetPromptResp, error)
|
||||||
ListPrompts func(ctx context.Context, in *ListPromptsReq) (*ListPromptsResp, error)
|
ListPrompts func(ctx context.Context, in *ListPromptsReq) (*ListPromptsResp, error)
|
||||||
UpdatePromptBatch func(ctx context.Context, in *UpdatePromptBatchReq) (*UpdatePromptBatchResp, error)
|
UpdatePromptBatch func(ctx context.Context, in *UpdatePromptBatchReq) (*UpdatePromptBatchResp, error)
|
||||||
UpdateArtist func(ctx context.Context, in *UpdateArtistReq) (*UpdateArtistResp, error)
|
UpdateArtist func(ctx context.Context, in *UpdateArtistReq) (*UpdateArtistResp, error)
|
||||||
GetArtist func(ctx context.Context, in *GetArtistReq) (*GetArtistResp, error)
|
GetArtist func(ctx context.Context, in *GetArtistReq) (*GetArtistResp, error)
|
||||||
CreateWorkAnalysis func(ctx context.Context, in *CreateWorkAnalysisReq) (*CreateWorkAnalysisResp, error)
|
CreateWorkAnalysis func(ctx context.Context, in *CreateWorkAnalysisReq) (*CreateWorkAnalysisResp, error)
|
||||||
UpdateWorkAnalysis func(ctx context.Context, in *UpdateWorkAnalysisReq) (*emptypb.Empty, error)
|
UpdateWorkAnalysis func(ctx context.Context, in *UpdateWorkAnalysisReq) (*emptypb.Empty, error)
|
||||||
UpdateWorkAnalysisStatus func(ctx context.Context, in *UpdateWorkAnalysisStatusReq) (*emptypb.Empty, error)
|
UpdateWorkAnalysisStatus func(ctx context.Context, in *UpdateWorkAnalysisStatusReq) (*emptypb.Empty, error)
|
||||||
GetWorkAnalysis func(ctx context.Context, in *GetWorkAnalysisDetailReq) (*GetWorkAnalysisDetailResp, error)
|
GetWorkAnalysis func(ctx context.Context, in *GetWorkAnalysisDetailReq) (*GetWorkAnalysisDetailResp, error)
|
||||||
GetLatestWorkAnalysis func(ctx context.Context, in *GetLatestWorkAnalysisReq) (*GetWorkAnalysisResp, error)
|
GetLatestWorkAnalysis func(ctx context.Context, in *GetLatestWorkAnalysisReq) (*GetWorkAnalysisResp, error)
|
||||||
ListWorkAnalysis func(ctx context.Context, in *ListWorkAnalysisReq) (*ListWorkAnalysisResp, error)
|
ListWorkAnalysis func(ctx context.Context, in *ListWorkAnalysisReq) (*ListWorkAnalysisResp, error)
|
||||||
DeleteWorkAnalysis func(ctx context.Context, in *DeleteWorkAnalysisReq) (*emptypb.Empty, error)
|
DeleteWorkAnalysis func(ctx context.Context, in *DeleteWorkAnalysisReq) (*emptypb.Empty, error)
|
||||||
UpdateWorkAnalysisApprovalID func(ctx context.Context, in *UpdateWorkAnalysisApprovalIDReq) (*emptypb.Empty, error)
|
UpdateWorkAnalysisApprovalID func(ctx context.Context, in *UpdateWorkAnalysisApprovalIDReq) (*emptypb.Empty, error)
|
||||||
ArtistDataList func(ctx context.Context, in *ArtistDataListReq) (*ArtistDataListResp, error)
|
ArtistDataList func(ctx context.Context, in *ArtistDataListReq) (*ArtistDataListResp, error)
|
||||||
MediaDataList func(ctx context.Context, in *MediaDataListReq) (*MediaDataListResp, error)
|
MediaDataList func(ctx context.Context, in *MediaDataListReq) (*MediaDataListResp, error)
|
||||||
DataOverview func(ctx context.Context, in *DataOverviewReq) (*DataOverviewResp, error)
|
DataOverview func(ctx context.Context, in *DataOverviewReq) (*DataOverviewResp, error)
|
||||||
ArtistMetricsSeries func(ctx context.Context, in *ArtistMetricsSeriesReq) (*ArtistMetricsSeriesResp, error)
|
ArtistMetricsSeries func(ctx context.Context, in *ArtistMetricsSeriesReq) (*ArtistMetricsSeriesResp, error)
|
||||||
ArtistMetricsDailyWindow func(ctx context.Context, in *ArtistMetricsDailyWindowReq) (*ArtistMetricsDailyWindowResp, error)
|
ArtistMetricsDailyWindow func(ctx context.Context, in *ArtistMetricsDailyWindowReq) (*ArtistMetricsDailyWindowResp, error)
|
||||||
TobeConfirmedList func(ctx context.Context, in *TobeConfirmedListReq) (*TobeConfirmedListResp, error)
|
TobeConfirmedList func(ctx context.Context, in *TobeConfirmedListReq) (*TobeConfirmedListResp, error)
|
||||||
UpsertMediaMetricsDailyBatch func(ctx context.Context, in *UpsertMediaMetricsDailyBatchReq) (*UpsertMediaMetricsDailyBatchResp, error)
|
UpsertMediaMetricsDailyBatch func(ctx context.Context, in *UpsertMediaMetricsDailyBatchReq) (*UpsertMediaMetricsDailyBatchResp, error)
|
||||||
UpsertWorkMetricsDailyBatch func(ctx context.Context, in *UpsertWorkMetricsDailyBatchReq) (*UpsertWorkMetricsDailyBatchResp, error)
|
UpsertWorkMetricsDailyBatch func(ctx context.Context, in *UpsertWorkMetricsDailyBatchReq) (*UpsertWorkMetricsDailyBatchResp, error)
|
||||||
ListMediaMetricsDaily func(ctx context.Context, in *ListMediaMetricsDailyReq) (*ListMediaMetricsDailyResp, error)
|
ListMediaMetricsDaily func(ctx context.Context, in *ListMediaMetricsDailyReq) (*ListMediaMetricsDailyResp, error)
|
||||||
ListWorkMetricsDaily func(ctx context.Context, in *ListWorkMetricsDailyReq) (*ListWorkMetricsDailyResp, error)
|
ListWorkMetricsDaily func(ctx context.Context, in *ListWorkMetricsDailyReq) (*ListWorkMetricsDailyResp, error)
|
||||||
CalculateMediaMetricsByWorks func(ctx context.Context, in *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
CalculateMediaMetricsByWorks func(ctx context.Context, in *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
||||||
GetArtistAyrShareInfo func(ctx context.Context, in *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
GetArtistAyrShareInfo func(ctx context.Context, in *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
||||||
ListWorkPlatformInfo func(ctx context.Context, in *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
GetArtistAyrShareInfoByPlatformIDs func(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
|
||||||
UpsertTaskList func(ctx context.Context, in *UpsertTaskListReq) (*UpsertTaskListResp, error)
|
ListWorkPlatformInfo func(ctx context.Context, in *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
||||||
GetTaskList func(ctx context.Context, in *GetTaskListReq) (*GetTaskListResp, error)
|
UpsertTaskList func(ctx context.Context, in *UpsertTaskListReq) (*UpsertTaskListResp, error)
|
||||||
ListTaskList func(ctx context.Context, in *ListTaskListReq) (*ListTaskListResp, error)
|
GetTaskList func(ctx context.Context, in *GetTaskListReq) (*GetTaskListResp, error)
|
||||||
DeleteTaskList func(ctx context.Context, in *DeleteTaskListReq) (*emptypb.Empty, error)
|
ListTaskList func(ctx context.Context, in *ListTaskListReq) (*ListTaskListResp, error)
|
||||||
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
DeleteTaskList func(ctx context.Context, in *DeleteTaskListReq) (*emptypb.Empty, error)
|
||||||
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
|
||||||
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
|
||||||
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
|
||||||
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
|
||||||
|
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||||
@ -596,6 +598,12 @@ func (c *castClient) GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyr
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfo", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfo", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) GetArtistAyrShareInfoByPlatformIDs(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq, opts ...grpc_go.CallOption) (*GetArtistAyrShareInfoByPlatformIDsResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetArtistAyrShareInfoByPlatformIDsResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistAyrShareInfoByPlatformIDs", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *castClient) ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment) {
|
func (c *castClient) ListWorkPlatformInfo(ctx context.Context, in *ListWorkPlatformInfoReq, opts ...grpc_go.CallOption) (*ListWorkPlatformInfoResp, common.ErrorWithAttachment) {
|
||||||
out := new(ListWorkPlatformInfoResp)
|
out := new(ListWorkPlatformInfoResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -735,6 +743,7 @@ type CastServer interface {
|
|||||||
CalculateMediaMetricsByWorks(context.Context, *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
CalculateMediaMetricsByWorks(context.Context, *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
|
||||||
// 艺人AyrShare信息相关接口
|
// 艺人AyrShare信息相关接口
|
||||||
GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
|
||||||
|
GetArtistAyrShareInfoByPlatformIDs(context.Context, *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
|
||||||
// 作品平台信息相关接口
|
// 作品平台信息相关接口
|
||||||
ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
|
||||||
// 任务列表相关接口
|
// 任务列表相关接口
|
||||||
@ -948,6 +957,9 @@ func (UnimplementedCastServer) CalculateMediaMetricsByWorks(context.Context, *Ca
|
|||||||
func (UnimplementedCastServer) GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error) {
|
func (UnimplementedCastServer) GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfo not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) GetArtistAyrShareInfoByPlatformIDs(context.Context, *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtistAyrShareInfoByPlatformIDs not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedCastServer) ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error) {
|
func (UnimplementedCastServer) ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ListWorkPlatformInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ListWorkPlatformInfo not implemented")
|
||||||
}
|
}
|
||||||
@ -2862,6 +2874,35 @@ func _Cast_GetArtistAyrShareInfo_Handler(srv interface{}, ctx context.Context, d
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_GetArtistAyrShareInfoByPlatformIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistAyrShareInfoByPlatformIDsReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||||
|
args := []interface{}{}
|
||||||
|
args = append(args, in)
|
||||||
|
md, _ := metadata.FromIncomingContext(ctx)
|
||||||
|
invAttachment := make(map[string]interface{}, len(md))
|
||||||
|
for k, v := range md {
|
||||||
|
invAttachment[k] = v
|
||||||
|
}
|
||||||
|
invo := invocation.NewRPCInvocation("GetArtistAyrShareInfoByPlatformIDs", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Cast_ListWorkPlatformInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Cast_ListWorkPlatformInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(ListWorkPlatformInfoReq)
|
in := new(ListWorkPlatformInfoReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3415,6 +3456,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "GetArtistAyrShareInfo",
|
MethodName: "GetArtistAyrShareInfo",
|
||||||
Handler: _Cast_GetArtistAyrShareInfo_Handler,
|
Handler: _Cast_GetArtistAyrShareInfo_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetArtistAyrShareInfoByPlatformIDs",
|
||||||
|
Handler: _Cast_GetArtistAyrShareInfoByPlatformIDs_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "ListWorkPlatformInfo",
|
MethodName: "ListWorkPlatformInfo",
|
||||||
Handler: _Cast_ListWorkPlatformInfo_Handler,
|
Handler: _Cast_ListWorkPlatformInfo_Handler,
|
||||||
|
|||||||
@ -86,6 +86,9 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
tag.POST("list", serviceCast.ListCastTags)
|
tag.POST("list", serviceCast.ListCastTags)
|
||||||
tag.POST("import-batch", serviceCast.ImportTagBatch)
|
tag.POST("import-batch", serviceCast.ImportTagBatch)
|
||||||
tag.POST("recalculate-quote-count", serviceCast.RecalculateCastTagQuoteCount)
|
tag.POST("recalculate-quote-count", serviceCast.RecalculateCastTagQuoteCount)
|
||||||
|
tag.POST("auto-hashtags", serviceCast.AutoHashtags)
|
||||||
|
tag.POST("recommend-hashtags", serviceCast.RecommendHashtags)
|
||||||
|
tag.POST("search-hashtags", serviceCast.SearchHashtags)
|
||||||
}
|
}
|
||||||
|
|
||||||
//AI 生图
|
//AI 生图
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
package cast
|
package cast
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"fonchain-fiee/api/aryshare"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/cmd/config"
|
"fonchain-fiee/cmd/config"
|
||||||
"fonchain-fiee/pkg/model/login"
|
"fonchain-fiee/pkg/model/login"
|
||||||
@ -169,3 +172,242 @@ func RecalculateCastTagQuoteCount(ctx *gin.Context) {
|
|||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// findNewTags 对比两次标签,找出新增的标签
|
||||||
|
func findNewTags(beforeTags, afterTags []string) []string {
|
||||||
|
// 将 beforeTags 转换为 map,方便查找
|
||||||
|
beforeMap := make(map[string]bool)
|
||||||
|
for _, tag := range beforeTags {
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" {
|
||||||
|
beforeMap[cleanTag] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 找出 afterTags 中不在 beforeTags 中的标签
|
||||||
|
newTags := make([]string, 0)
|
||||||
|
for _, tag := range afterTags {
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" && !beforeMap[cleanTag] {
|
||||||
|
newTags = append(newTags, cleanTag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newTags
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetValidProfileKey(ctx context.Context, platformIDs []uint32) (string, error) {
|
||||||
|
if len(platformIDs) == 0 {
|
||||||
|
platformIDs = []uint32{1, 2, 3, 5}
|
||||||
|
}
|
||||||
|
profileKeys, err := service.CastProvider.GetArtistAyrShareInfoByPlatformIDs(ctx, &cast.GetArtistAyrShareInfoByPlatformIDsReq{
|
||||||
|
PlatformIDs: platformIDs,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("GetArtistAyrShareInfoByPlatformIDs failed", zap.Error(err))
|
||||||
|
return "", errors.New("获取有效profileKey失败")
|
||||||
|
}
|
||||||
|
if len(profileKeys.Data) == 0 {
|
||||||
|
return "", errors.New("当前没有有效的profileKey")
|
||||||
|
}
|
||||||
|
if profileKeys.Data[0].ProfileKey != "" {
|
||||||
|
return profileKeys.Data[0].ProfileKey, nil
|
||||||
|
}
|
||||||
|
return "", errors.New("profileKey为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
// SaveTagsToDatabase 将标签保存到数据库
|
||||||
|
func SaveTagsToDatabase(ctx *gin.Context, tags []string, source uint32) error {
|
||||||
|
if len(tags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取用户信息
|
||||||
|
userInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
|
||||||
|
// 构建批量导入请求
|
||||||
|
req := cast.UpdateCastTagBatchReq{
|
||||||
|
Data: make([]*cast.CastTagInfo, 0, len(tags)),
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tag := range tags {
|
||||||
|
tagInfo := &cast.CastTagInfo{
|
||||||
|
HashTag: tag,
|
||||||
|
CreatorUuid: fmt.Sprint(userInfo.ID),
|
||||||
|
CreatorName: userInfo.Name,
|
||||||
|
Source: source, // 4: 自动标签(从内容中自动提取)
|
||||||
|
Status: 1, // 1: 有效
|
||||||
|
}
|
||||||
|
req.Data = append(req.Data, tagInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用批量导入接口
|
||||||
|
_, err := service.CastProvider.UpdateCastTagBatch(newCtx, &req)
|
||||||
|
if err != nil {
|
||||||
|
err = errors.New("标签保存到数据库失败")
|
||||||
|
zap.L().Error("SaveTagsToDatabase UpdateCastTagBatch failed", zap.Error(err))
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
zap.L().Info("SaveTagsToDatabase success", zap.Int("tagCount", len(tags)), zap.Strings("tags", tags), zap.Uint32("source", source))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func GenerateAutoHashtags(ctx context.Context, post string, max int32, position, language string) (*aryshare.AutoHashtagsResponse, []string, bool, error) {
|
||||||
|
// 验证帖子内容
|
||||||
|
if post == "" {
|
||||||
|
return nil, nil, false, errors.New("帖子内容不能为空")
|
||||||
|
}
|
||||||
|
// post 的长度不能超过1000个字符
|
||||||
|
if len(post) > 1000 {
|
||||||
|
return nil, nil, false, errors.New("自动生成标签的帖子内容不能超过1000个字符")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取生成前的标签
|
||||||
|
beforeTags := utils.ExtractTags(post)
|
||||||
|
zap.L().Info("GenerateAutoHashtags beforeTags", zap.Strings("beforeTags", beforeTags))
|
||||||
|
|
||||||
|
// 如果标签数量已经达到或超过5个,不需要生成
|
||||||
|
if len(beforeTags) >= 5 {
|
||||||
|
return nil, nil, false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置默认值
|
||||||
|
if position == "" {
|
||||||
|
position = "end"
|
||||||
|
}
|
||||||
|
if language == "" {
|
||||||
|
language = "zh"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果 max 为0,则根据现有标签数自动计算,确保总数为5
|
||||||
|
if max == 0 {
|
||||||
|
max = int32(5 - len(beforeTags))
|
||||||
|
}
|
||||||
|
|
||||||
|
profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5})
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建请求
|
||||||
|
req := &aryshare.AutoHashtagsRequest{
|
||||||
|
Post: post,
|
||||||
|
Max: max,
|
||||||
|
Position: position,
|
||||||
|
Language: language,
|
||||||
|
ProfileKey: profileKey,
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用 Ayrshare 的 AutoHashtags 接口
|
||||||
|
resp, err := service.AyrshareProvider.AutoHashtags(ctx, req)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("AutoHashtags failed", zap.Error(err))
|
||||||
|
return nil, nil, false, errors.New("自动生成标签失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取生成后的标签
|
||||||
|
afterTags := utils.ExtractTags(resp.Post)
|
||||||
|
zap.L().Info("GenerateAutoHashtags afterTags", zap.Strings("afterTags", afterTags))
|
||||||
|
|
||||||
|
// 对比两次标签,找出新增的标签
|
||||||
|
newTags := findNewTags(beforeTags, afterTags)
|
||||||
|
|
||||||
|
return resp, newTags, true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoHashtags 自动生成标签
|
||||||
|
func AutoHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.AutoHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用核心逻辑生成标签
|
||||||
|
resp, newTags, needMore, err := GenerateAutoHashtags(
|
||||||
|
context.Background(),
|
||||||
|
req.Post,
|
||||||
|
req.Max,
|
||||||
|
req.Position,
|
||||||
|
req.Language,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果标签已满5个,直接返回
|
||||||
|
if !needMore {
|
||||||
|
service.Success(ctx, map[string]interface{}{
|
||||||
|
"message": "当前帖子的标签已经有5个了",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存新增的标签到数据库,Source 设置为 4(自动标签)
|
||||||
|
if len(newTags) > 0 {
|
||||||
|
if err = SaveTagsToDatabase(ctx, newTags, 4); err != nil {
|
||||||
|
zap.L().Error("SaveTagsToDatabase failed", zap.Error(err), zap.Strings("newTags", newTags))
|
||||||
|
err = errors.New("标签保存到数据库失败")
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// RecommendHashtags 推荐标签
|
||||||
|
func RecommendHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.RecommendHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
profileKey, err := GetValidProfileKey(context.Background(), []uint32{1})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.ProfileKey = profileKey
|
||||||
|
resp, err := service.AyrshareProvider.RecommendHashtags(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("RecommendHashtags failed", zap.Error(err))
|
||||||
|
err = errors.New("推荐标签失败")
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// SearchHashtags 搜索标签
|
||||||
|
func SearchHashtags(ctx *gin.Context) {
|
||||||
|
var req *aryshare.SearchHashtagsRequest
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
profileKey, err := GetValidProfileKey(context.Background(), []uint32{3})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.ProfileKey = profileKey
|
||||||
|
resp, err := service.AyrshareProvider.SearchHashtags(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("SearchHashtags failed", zap.Error(err))
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
@ -122,6 +122,14 @@ func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.
|
|||||||
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
||||||
// return nil, err
|
// return nil, err
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||||
|
// content, err := processContentAndAutoTags(ctx, req.Content)
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// // 将自动生成标签后的内容更新到请求中
|
||||||
|
// req.Content = content
|
||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
||||||
@ -170,6 +178,80 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func processContentTags(ctx *gin.Context, content string) error {
|
||||||
|
// 如果内容为空,直接返回
|
||||||
|
if content == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取标签
|
||||||
|
tags := utils.ExtractTags(content)
|
||||||
|
if len(tags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第一步:检查标签格式(验证标签不为空且有效)
|
||||||
|
validTags := make([]string, 0, len(tags))
|
||||||
|
for _, tag := range tags {
|
||||||
|
// 去除空白字符后检查
|
||||||
|
cleanTag := strings.TrimSpace(tag)
|
||||||
|
if cleanTag != "" {
|
||||||
|
validTags = append(validTags, cleanTag)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有有效标签,直接返回
|
||||||
|
if len(validTags) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二步:检查标签数量是否超过5个
|
||||||
|
if len(validTags) > 5 {
|
||||||
|
return errors.New("帖子标签数量不能超过5个")
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println("validTags", validTags)
|
||||||
|
|
||||||
|
// 第三步:调用 SaveTagsToDatabase 函数批量导入标签,Source 设置为 3(推荐标签)
|
||||||
|
if err := SaveTagsToDatabase(ctx, validTags, 3); err != nil {
|
||||||
|
zap.L().Error("processContentTags SaveTagsToDatabase failed", zap.Error(err))
|
||||||
|
return errors.New("批量导入标签失败")
|
||||||
|
}
|
||||||
|
|
||||||
|
zap.L().Info("processContentTags success", zap.Int("tagCount", len(validTags)), zap.Strings("tags", validTags))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// processContentAndAutoTags 处理内容标签并自动生成标签
|
||||||
|
// 该函数统一处理内容中的标签提取、验证和自动生成标签的逻辑
|
||||||
|
func processContentAndAutoTags(ctx *gin.Context, content string) (string, error) {
|
||||||
|
// 如果内容为空,直接返回
|
||||||
|
if content == "" {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入
|
||||||
|
if err := processContentTags(ctx, content); err != nil {
|
||||||
|
return content, err
|
||||||
|
}
|
||||||
|
// 处理完内容标签后,自动生成标签并存入数据库
|
||||||
|
resp, newTags, needMore, err := GenerateAutoHashtags(
|
||||||
|
context.Background(),
|
||||||
|
content,
|
||||||
|
0, // max 为0时自动计算
|
||||||
|
"", // position 使用默认值
|
||||||
|
"", // language 使用默认值
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return content, err
|
||||||
|
} else if needMore && len(newTags) > 0 {
|
||||||
|
if saveErr := SaveTagsToDatabase(ctx, newTags, 4); saveErr != nil {
|
||||||
|
zap.L().Error("processContentAndAutoTags SaveTagsToDatabase failed", zap.Error(saveErr))
|
||||||
|
return content, errors.New("自动生成标签保存到数据库失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resp.Post, nil
|
||||||
|
}
|
||||||
|
|
||||||
// UpdateWorkVideoCore 更新作品视频的核心逻辑,可以被其他函数复用
|
// UpdateWorkVideoCore 更新作品视频的核心逻辑,可以被其他函数复用
|
||||||
func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.UpdateWorkVideoResp, error) {
|
func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.UpdateWorkVideoResp, error) {
|
||||||
var infoResp *accountFiee.UserInfoResponse
|
var infoResp *accountFiee.UserInfoResponse
|
||||||
@ -249,6 +331,14 @@ func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.
|
|||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
req.ArtistSubNum = infoResp.SubNum
|
req.ArtistSubNum = infoResp.SubNum
|
||||||
|
|
||||||
|
// 处理内容中的标签:提取、验证并批量导入,以及自动生成标签
|
||||||
|
// content, err := processContentAndAutoTags(ctx, req.Content)
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// // 将自动生成标签后的内容更新到请求中
|
||||||
|
// req.Content = content
|
||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user