Updata:解决冲突

This commit is contained in:
jiaji.H 2026-01-14 13:42:58 +08:00
commit 8d36aeb751
39 changed files with 16036 additions and 6399 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,6 +66,8 @@ service AccountFiee {
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}//
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc GetInviterInfo(InviterInfoRequest) returns(InviterInfoResponse) {} //
rpc GetInviterList(InviterListRequest) returns(InviterListResponse) {} //
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// ,
@ -101,7 +103,21 @@ service AccountFiee {
rpc GetChatAutoReplyRulerDetail ( GetChatAutoReplyRulerByIdRequest )returns( ChatAutoReplyRulerData ){} //
rpc GetChatAutoReplyRulerList ( GetChatAutoReplyRulerListRequest )returns( GetChatAutoReplyRulerListResp ){} //
}
message InviterListRequest{
repeated uint64 ids =1;
}
message InviterListResponse{
repeated InviterInfoResponse list = 1;
}
message InviterInfoRequest{
string code = 1;
}
message InviterInfoResponse{
uint64 id = 1;
string code = 2;
string name = 3;
string telNum = 4;
}
message VerifySliderStatusRequest {
string nonceStr = 1;
}
@ -183,6 +199,11 @@ message UserListInfo{
string idNumber = 21;
string dateOfBirth = 22;
string age = 23;
string email = 24;
string AbroadTelAreaCode = 25;
string AbroadTel = 26;
string inviterName = 27;
string inviterCode = 28;
}
message UserListRequest{
string domain = 1;
@ -221,6 +242,11 @@ message UserInfoResponse{
string telAreaCode = 19;
string idNumber = 20;
string dateOfBirth = 21;
string email = 22;
string AbroadTelAreaCode = 23;
string AbroadTel = 24;
uint64 inviterId = 25;
}
message RealNameResponse{
uint64 id = 1;
@ -541,6 +567,9 @@ message UpdateRequest {
string Domain = 2 [json_name = "domain"];
string Language = 3 [json_name = "language"];
string NickName = 4 [json_name = "nickName"];
string Email = 5 [json_name = "email"];
string AbroadTel = 6 [json_name = "abroadTel"];
string AbroadTelAreaCode = 7 [json_name = "abroadTelAreaCode"];
}
message Operator {
@ -632,6 +661,8 @@ message RegistRequest {
string telAreaCode = 5;
string language = 6;
string nickName = 7;
uint64 inviterID = 8;
string inviterCode = 9;
}
message LoginRequest {

View File

@ -17,6 +17,25 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *InviterListRequest) Validate() error {
return nil
}
func (this *InviterListResponse) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *InviterInfoRequest) Validate() error {
return nil
}
func (this *InviterInfoResponse) Validate() error {
return nil
}
func (this *VerifySliderStatusRequest) Validate() error {
return nil
}

View File

@ -70,6 +70,8 @@ type AccountFieeClient interface {
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment)
GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment)
CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment)
// submit info
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
@ -148,6 +150,8 @@ type AccountFieeClientImpl struct {
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
GetInviterInfo func(ctx context.Context, in *InviterInfoRequest) (*InviterInfoResponse, error)
GetInviterList func(ctx context.Context, in *InviterListRequest) (*InviterListResponse, error)
CreateUserAndRealName func(ctx context.Context, in *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
@ -436,6 +440,18 @@ func (c *accountFieeClient) SendNationTemplateMsg(ctx context.Context, in *SendN
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationTemplateMsg", in, out)
}
func (c *accountFieeClient) GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment) {
out := new(InviterInfoResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterInfo", in, out)
}
func (c *accountFieeClient) GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment) {
out := new(InviterListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterList", in, out)
}
func (c *accountFieeClient) CreateUserAndRealName(ctx context.Context, in *CreateUserAndRealNameRequest, opts ...grpc_go.CallOption) (*CreateUserAndRealNameResponse, common.ErrorWithAttachment) {
out := new(CreateUserAndRealNameResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -650,6 +666,8 @@ type AccountFieeServer interface {
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error)
GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error)
CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
// submit info
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
@ -811,6 +829,12 @@ func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *Verif
func (UnimplementedAccountFieeServer) SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendNationTemplateMsg not implemented")
}
func (UnimplementedAccountFieeServer) GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInviterInfo not implemented")
}
func (UnimplementedAccountFieeServer) GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInviterList not implemented")
}
func (UnimplementedAccountFieeServer) CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAndRealName not implemented")
}
@ -2112,6 +2136,64 @@ func _AccountFiee_SendNationTemplateMsg_Handler(srv interface{}, ctx context.Con
return interceptor(ctx, in, info, handler)
}
func _AccountFiee_GetInviterInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(InviterInfoRequest)
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("GetInviterInfo", 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 _AccountFiee_GetInviterList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(InviterListRequest)
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("GetInviterList", 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 _AccountFiee_CreateUserAndRealName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserAndRealNameRequest)
if err := dec(in); err != nil {
@ -3095,6 +3177,14 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "SendNationTemplateMsg",
Handler: _AccountFiee_SendNationTemplateMsg_Handler,
},
{
MethodName: "GetInviterInfo",
Handler: _AccountFiee_GetInviterInfo_Handler,
},
{
MethodName: "GetInviterList",
Handler: _AccountFiee_GetInviterList_Handler,
},
{
MethodName: "CreateUserAndRealName",
Handler: _AccountFiee_CreateUserAndRealName_Handler,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -38,6 +38,7 @@ type CastClient interface {
MediaInfo(ctx context.Context, in *MediaInfoReq, opts ...grpc_go.CallOption) (*MediaInfoResp, common.ErrorWithAttachment)
MediaInfoByPlatform(ctx context.Context, in *MediaInfoByPlatformReq, opts ...grpc_go.CallOption) (*MediaInfoByPlatformResp, common.ErrorWithAttachment)
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
WorkListPublished(ctx context.Context, in *WorkListPublishedReq, opts ...grpc_go.CallOption) (*WorkListPublishedResp, common.ErrorWithAttachment)
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
@ -104,6 +105,7 @@ type CastClient interface {
CalculateMediaMetricsByWorks(ctx context.Context, in *CalculateMediaMetricsByWorksReq, opts ...grpc_go.CallOption) (*CalculateMediaMetricsByWorksResp, common.ErrorWithAttachment)
// 艺人AyrShare信息相关接口
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)
// 任务列表相关接口
@ -111,6 +113,23 @@ type CastClient interface {
GetTaskList(ctx context.Context, in *GetTaskListReq, opts ...grpc_go.CallOption) (*GetTaskListResp, common.ErrorWithAttachment)
ListTaskList(ctx context.Context, in *ListTaskListReq, opts ...grpc_go.CallOption) (*ListTaskListResp, common.ErrorWithAttachment)
DeleteTaskList(ctx context.Context, in *DeleteTaskListReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
// 话题标签相关接口
UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment)
ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment)
UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment)
BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment)
// 竞品报告相关接口
CreateCompetitiveReport(ctx context.Context, in *CreateCompetitiveReportReq, opts ...grpc_go.CallOption) (*CreateCompetitiveReportResp, common.ErrorWithAttachment)
ImportCompetitiveReportBatch(ctx context.Context, in *ImportCompetitiveReportBatchReq, opts ...grpc_go.CallOption) (*ImportCompetitiveReportBatchResp, common.ErrorWithAttachment)
UpdateCompetitiveReportStatus(ctx context.Context, in *UpdateCompetitiveReportStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
GetCompetitiveReport(ctx context.Context, in *GetCompetitiveReportDetailReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportDetailResp, common.ErrorWithAttachment)
GetCompetitiveReportForApp(ctx context.Context, in *GetCompetitiveReportForAppReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportForAppResp, common.ErrorWithAttachment)
ListCompetitiveReport(ctx context.Context, in *ListCompetitiveReportReq, opts ...grpc_go.CallOption) (*ListCompetitiveReportResp, common.ErrorWithAttachment)
DeleteCompetitiveReport(ctx context.Context, in *DeleteCompetitiveReportReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
UpdateCompetitiveReportApprovalID(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
CountCompetitiveReportByWorkUuids(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq, opts ...grpc_go.CallOption) (*CountCompetitiveReportByWorkUuidsResp, common.ErrorWithAttachment)
}
type castClient struct {
@ -127,6 +146,7 @@ type CastClientImpl struct {
MediaInfo func(ctx context.Context, in *MediaInfoReq) (*MediaInfoResp, error)
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
WorkListPublished func(ctx context.Context, in *WorkListPublishedReq) (*WorkListPublishedResp, error)
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
@ -182,11 +202,27 @@ type CastClientImpl struct {
ListWorkMetricsDaily func(ctx context.Context, in *ListWorkMetricsDailyReq) (*ListWorkMetricsDailyResp, error)
CalculateMediaMetricsByWorks func(ctx context.Context, in *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
GetArtistAyrShareInfo func(ctx context.Context, in *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
GetArtistAyrShareInfoByPlatformIDs func(ctx context.Context, in *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
ListWorkPlatformInfo func(ctx context.Context, in *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
UpsertTaskList func(ctx context.Context, in *UpsertTaskListReq) (*UpsertTaskListResp, error)
GetTaskList func(ctx context.Context, in *GetTaskListReq) (*GetTaskListResp, error)
ListTaskList func(ctx context.Context, in *ListTaskListReq) (*ListTaskListResp, error)
DeleteTaskList func(ctx context.Context, in *DeleteTaskListReq) (*emptypb.Empty, error)
UpdateCastTag func(ctx context.Context, in *UpdateCastTagReq) (*UpdateCastTagResp, error)
ListCastTags func(ctx context.Context, in *ListCastTagsReq) (*ListCastTagsResp, error)
UpdateCastTagBatch func(ctx context.Context, in *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
BatchUpdateCastTags func(ctx context.Context, in *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
UpdateCastTagStatus func(ctx context.Context, in *UpdateCastTagStatusReq) (*emptypb.Empty, error)
RecalculateCastTagQuoteCount func(ctx context.Context, in *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
CreateCompetitiveReport func(ctx context.Context, in *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error)
ImportCompetitiveReportBatch func(ctx context.Context, in *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error)
UpdateCompetitiveReportStatus func(ctx context.Context, in *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error)
GetCompetitiveReport func(ctx context.Context, in *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error)
GetCompetitiveReportForApp func(ctx context.Context, in *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error)
ListCompetitiveReport func(ctx context.Context, in *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error)
DeleteCompetitiveReport func(ctx context.Context, in *DeleteCompetitiveReportReq) (*emptypb.Empty, error)
UpdateCompetitiveReportApprovalID func(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error)
CountCompetitiveReportByWorkUuids func(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error)
}
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
@ -255,6 +291,12 @@ func (c *castClient) WorkList(ctx context.Context, in *WorkListReq, opts ...grpc
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList", in, out)
}
func (c *castClient) WorkListPublished(ctx context.Context, in *WorkListPublishedReq, opts ...grpc_go.CallOption) (*WorkListPublishedResp, common.ErrorWithAttachment) {
out := new(WorkListPublishedResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkListPublished", in, out)
}
func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) {
out := new(WorkDetailResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -585,6 +627,12 @@ func (c *castClient) GetArtistAyrShareInfo(ctx context.Context, in *GetArtistAyr
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) {
out := new(ListWorkPlatformInfoResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -615,6 +663,96 @@ func (c *castClient) DeleteTaskList(ctx context.Context, in *DeleteTaskListReq,
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteTaskList", in, out)
}
func (c *castClient) UpdateCastTag(ctx context.Context, in *UpdateCastTagReq, opts ...grpc_go.CallOption) (*UpdateCastTagResp, common.ErrorWithAttachment) {
out := new(UpdateCastTagResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTag", in, out)
}
func (c *castClient) ListCastTags(ctx context.Context, in *ListCastTagsReq, opts ...grpc_go.CallOption) (*ListCastTagsResp, common.ErrorWithAttachment) {
out := new(ListCastTagsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListCastTags", in, out)
}
func (c *castClient) UpdateCastTagBatch(ctx context.Context, in *UpdateCastTagBatchReq, opts ...grpc_go.CallOption) (*UpdateCastTagBatchResp, common.ErrorWithAttachment) {
out := new(UpdateCastTagBatchResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagBatch", in, out)
}
func (c *castClient) BatchUpdateCastTags(ctx context.Context, in *BatchUpdateCastTagsReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchUpdateCastTags", in, out)
}
func (c *castClient) UpdateCastTagStatus(ctx context.Context, in *UpdateCastTagStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCastTagStatus", in, out)
}
func (c *castClient) RecalculateCastTagQuoteCount(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*RecalculateCastTagQuoteCountResp, common.ErrorWithAttachment) {
out := new(RecalculateCastTagQuoteCountResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RecalculateCastTagQuoteCount", in, out)
}
func (c *castClient) CreateCompetitiveReport(ctx context.Context, in *CreateCompetitiveReportReq, opts ...grpc_go.CallOption) (*CreateCompetitiveReportResp, common.ErrorWithAttachment) {
out := new(CreateCompetitiveReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateCompetitiveReport", in, out)
}
func (c *castClient) ImportCompetitiveReportBatch(ctx context.Context, in *ImportCompetitiveReportBatchReq, opts ...grpc_go.CallOption) (*ImportCompetitiveReportBatchResp, common.ErrorWithAttachment) {
out := new(ImportCompetitiveReportBatchResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ImportCompetitiveReportBatch", in, out)
}
func (c *castClient) UpdateCompetitiveReportStatus(ctx context.Context, in *UpdateCompetitiveReportStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCompetitiveReportStatus", in, out)
}
func (c *castClient) GetCompetitiveReport(ctx context.Context, in *GetCompetitiveReportDetailReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportDetailResp, common.ErrorWithAttachment) {
out := new(GetCompetitiveReportDetailResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCompetitiveReport", in, out)
}
func (c *castClient) GetCompetitiveReportForApp(ctx context.Context, in *GetCompetitiveReportForAppReq, opts ...grpc_go.CallOption) (*GetCompetitiveReportForAppResp, common.ErrorWithAttachment) {
out := new(GetCompetitiveReportForAppResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCompetitiveReportForApp", in, out)
}
func (c *castClient) ListCompetitiveReport(ctx context.Context, in *ListCompetitiveReportReq, opts ...grpc_go.CallOption) (*ListCompetitiveReportResp, common.ErrorWithAttachment) {
out := new(ListCompetitiveReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListCompetitiveReport", in, out)
}
func (c *castClient) DeleteCompetitiveReport(ctx context.Context, in *DeleteCompetitiveReportReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteCompetitiveReport", in, out)
}
func (c *castClient) UpdateCompetitiveReportApprovalID(ctx context.Context, in *UpdateCompetitiveReportApprovalIDReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateCompetitiveReportApprovalID", in, out)
}
func (c *castClient) CountCompetitiveReportByWorkUuids(ctx context.Context, in *CountCompetitiveReportByWorkUuidsReq, opts ...grpc_go.CallOption) (*CountCompetitiveReportByWorkUuidsResp, common.ErrorWithAttachment) {
out := new(CountCompetitiveReportByWorkUuidsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CountCompetitiveReportByWorkUuids", in, out)
}
// CastServer is the server API for Cast service.
// All implementations must embed UnimplementedCastServer
// for forward compatibility
@ -628,6 +766,7 @@ type CastServer interface {
MediaInfo(context.Context, *MediaInfoReq) (*MediaInfoResp, error)
MediaInfoByPlatform(context.Context, *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error)
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
@ -694,6 +833,7 @@ type CastServer interface {
CalculateMediaMetricsByWorks(context.Context, *CalculateMediaMetricsByWorksReq) (*CalculateMediaMetricsByWorksResp, error)
// 艺人AyrShare信息相关接口
GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error)
GetArtistAyrShareInfoByPlatformIDs(context.Context, *GetArtistAyrShareInfoByPlatformIDsReq) (*GetArtistAyrShareInfoByPlatformIDsResp, error)
// 作品平台信息相关接口
ListWorkPlatformInfo(context.Context, *ListWorkPlatformInfoReq) (*ListWorkPlatformInfoResp, error)
// 任务列表相关接口
@ -701,6 +841,23 @@ type CastServer interface {
GetTaskList(context.Context, *GetTaskListReq) (*GetTaskListResp, error)
ListTaskList(context.Context, *ListTaskListReq) (*ListTaskListResp, error)
DeleteTaskList(context.Context, *DeleteTaskListReq) (*emptypb.Empty, error)
// 话题标签相关接口
UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error)
ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error)
UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error)
BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error)
UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error)
RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error)
// 竞品报告相关接口
CreateCompetitiveReport(context.Context, *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error)
ImportCompetitiveReportBatch(context.Context, *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error)
UpdateCompetitiveReportStatus(context.Context, *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error)
GetCompetitiveReport(context.Context, *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error)
GetCompetitiveReportForApp(context.Context, *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error)
ListCompetitiveReport(context.Context, *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error)
DeleteCompetitiveReport(context.Context, *DeleteCompetitiveReportReq) (*emptypb.Empty, error)
UpdateCompetitiveReportApprovalID(context.Context, *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error)
CountCompetitiveReportByWorkUuids(context.Context, *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error)
mustEmbedUnimplementedCastServer()
}
@ -736,6 +893,9 @@ func (UnimplementedCastServer) MediaInfoByPlatform(context.Context, *MediaInfoBy
func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkList not implemented")
}
func (UnimplementedCastServer) WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkListPublished not implemented")
}
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
}
@ -901,6 +1061,9 @@ func (UnimplementedCastServer) CalculateMediaMetricsByWorks(context.Context, *Ca
func (UnimplementedCastServer) GetArtistAyrShareInfo(context.Context, *GetArtistAyrShareInfoReq) (*GetArtistAyrShareInfoResp, error) {
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) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkPlatformInfo not implemented")
}
@ -916,6 +1079,51 @@ func (UnimplementedCastServer) ListTaskList(context.Context, *ListTaskListReq) (
func (UnimplementedCastServer) DeleteTaskList(context.Context, *DeleteTaskListReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTaskList not implemented")
}
func (UnimplementedCastServer) UpdateCastTag(context.Context, *UpdateCastTagReq) (*UpdateCastTagResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTag not implemented")
}
func (UnimplementedCastServer) ListCastTags(context.Context, *ListCastTagsReq) (*ListCastTagsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCastTags not implemented")
}
func (UnimplementedCastServer) UpdateCastTagBatch(context.Context, *UpdateCastTagBatchReq) (*UpdateCastTagBatchResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagBatch not implemented")
}
func (UnimplementedCastServer) BatchUpdateCastTags(context.Context, *BatchUpdateCastTagsReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateCastTags not implemented")
}
func (UnimplementedCastServer) UpdateCastTagStatus(context.Context, *UpdateCastTagStatusReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCastTagStatus not implemented")
}
func (UnimplementedCastServer) RecalculateCastTagQuoteCount(context.Context, *emptypb.Empty) (*RecalculateCastTagQuoteCountResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method RecalculateCastTagQuoteCount not implemented")
}
func (UnimplementedCastServer) CreateCompetitiveReport(context.Context, *CreateCompetitiveReportReq) (*CreateCompetitiveReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCompetitiveReport not implemented")
}
func (UnimplementedCastServer) ImportCompetitiveReportBatch(context.Context, *ImportCompetitiveReportBatchReq) (*ImportCompetitiveReportBatchResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ImportCompetitiveReportBatch not implemented")
}
func (UnimplementedCastServer) UpdateCompetitiveReportStatus(context.Context, *UpdateCompetitiveReportStatusReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCompetitiveReportStatus not implemented")
}
func (UnimplementedCastServer) GetCompetitiveReport(context.Context, *GetCompetitiveReportDetailReq) (*GetCompetitiveReportDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCompetitiveReport not implemented")
}
func (UnimplementedCastServer) GetCompetitiveReportForApp(context.Context, *GetCompetitiveReportForAppReq) (*GetCompetitiveReportForAppResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCompetitiveReportForApp not implemented")
}
func (UnimplementedCastServer) ListCompetitiveReport(context.Context, *ListCompetitiveReportReq) (*ListCompetitiveReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCompetitiveReport not implemented")
}
func (UnimplementedCastServer) DeleteCompetitiveReport(context.Context, *DeleteCompetitiveReportReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCompetitiveReport not implemented")
}
func (UnimplementedCastServer) UpdateCompetitiveReportApprovalID(context.Context, *UpdateCompetitiveReportApprovalIDReq) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCompetitiveReportApprovalID not implemented")
}
func (UnimplementedCastServer) CountCompetitiveReportByWorkUuids(context.Context, *CountCompetitiveReportByWorkUuidsReq) (*CountCompetitiveReportByWorkUuidsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountCompetitiveReportByWorkUuids not implemented")
}
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
@ -1205,6 +1413,35 @@ func _Cast_WorkList_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
func _Cast_WorkListPublished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(WorkListPublishedReq)
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("WorkListPublished", 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_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(WorkDetailReq)
if err := dec(in); err != nil {
@ -2800,6 +3037,35 @@ func _Cast_GetArtistAyrShareInfo_Handler(srv interface{}, ctx context.Context, d
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) {
in := new(ListWorkPlatformInfoReq)
if err := dec(in); err != nil {
@ -2945,6 +3211,441 @@ func _Cast_DeleteTaskList_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _Cast_UpdateCastTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCastTagReq)
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("UpdateCastTag", 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_ListCastTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCastTagsReq)
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("ListCastTags", 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_UpdateCastTagBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCastTagBatchReq)
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("UpdateCastTagBatch", 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_BatchUpdateCastTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchUpdateCastTagsReq)
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("BatchUpdateCastTags", 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_UpdateCastTagStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCastTagStatusReq)
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("UpdateCastTagStatus", 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_RecalculateCastTagQuoteCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
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("RecalculateCastTagQuoteCount", 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_CreateCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateCompetitiveReportReq)
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("CreateCompetitiveReport", 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_ImportCompetitiveReportBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportCompetitiveReportBatchReq)
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("ImportCompetitiveReportBatch", 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_UpdateCompetitiveReportStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCompetitiveReportStatusReq)
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("UpdateCompetitiveReportStatus", 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_GetCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCompetitiveReportDetailReq)
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("GetCompetitiveReport", 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_GetCompetitiveReportForApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCompetitiveReportForAppReq)
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("GetCompetitiveReportForApp", 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_ListCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCompetitiveReportReq)
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("ListCompetitiveReport", 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_DeleteCompetitiveReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCompetitiveReportReq)
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("DeleteCompetitiveReport", 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_UpdateCompetitiveReportApprovalID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCompetitiveReportApprovalIDReq)
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("UpdateCompetitiveReportApprovalID", 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_CountCompetitiveReportByWorkUuids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CountCompetitiveReportByWorkUuidsReq)
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("CountCompetitiveReportByWorkUuids", 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)
}
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -2988,6 +3689,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "WorkList",
Handler: _Cast_WorkList_Handler,
},
{
MethodName: "WorkListPublished",
Handler: _Cast_WorkListPublished_Handler,
},
{
MethodName: "WorkDetail",
Handler: _Cast_WorkDetail_Handler,
@ -3208,6 +3913,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "GetArtistAyrShareInfo",
Handler: _Cast_GetArtistAyrShareInfo_Handler,
},
{
MethodName: "GetArtistAyrShareInfoByPlatformIDs",
Handler: _Cast_GetArtistAyrShareInfoByPlatformIDs_Handler,
},
{
MethodName: "ListWorkPlatformInfo",
Handler: _Cast_ListWorkPlatformInfo_Handler,
@ -3228,6 +3937,66 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "DeleteTaskList",
Handler: _Cast_DeleteTaskList_Handler,
},
{
MethodName: "UpdateCastTag",
Handler: _Cast_UpdateCastTag_Handler,
},
{
MethodName: "ListCastTags",
Handler: _Cast_ListCastTags_Handler,
},
{
MethodName: "UpdateCastTagBatch",
Handler: _Cast_UpdateCastTagBatch_Handler,
},
{
MethodName: "BatchUpdateCastTags",
Handler: _Cast_BatchUpdateCastTags_Handler,
},
{
MethodName: "UpdateCastTagStatus",
Handler: _Cast_UpdateCastTagStatus_Handler,
},
{
MethodName: "RecalculateCastTagQuoteCount",
Handler: _Cast_RecalculateCastTagQuoteCount_Handler,
},
{
MethodName: "CreateCompetitiveReport",
Handler: _Cast_CreateCompetitiveReport_Handler,
},
{
MethodName: "ImportCompetitiveReportBatch",
Handler: _Cast_ImportCompetitiveReportBatch_Handler,
},
{
MethodName: "UpdateCompetitiveReportStatus",
Handler: _Cast_UpdateCompetitiveReportStatus_Handler,
},
{
MethodName: "GetCompetitiveReport",
Handler: _Cast_GetCompetitiveReport_Handler,
},
{
MethodName: "GetCompetitiveReportForApp",
Handler: _Cast_GetCompetitiveReportForApp_Handler,
},
{
MethodName: "ListCompetitiveReport",
Handler: _Cast_ListCompetitiveReport_Handler,
},
{
MethodName: "DeleteCompetitiveReport",
Handler: _Cast_DeleteCompetitiveReport_Handler,
},
{
MethodName: "UpdateCompetitiveReportApprovalID",
Handler: _Cast_UpdateCompetitiveReportApprovalID_Handler,
},
{
MethodName: "CountCompetitiveReportByWorkUuids",
Handler: _Cast_CountCompetitiveReportByWorkUuids_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "pb/fiee/cast.proto",

View File

@ -9,7 +9,6 @@ package cron
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@ -1050,7 +1049,7 @@ type UpdateScheduleTaskRequest struct {
ExecuteStartTime string `protobuf:"bytes,8,opt,name=execute_start_time,json=executeStartTime,proto3" json:"execute_start_time"` // 执行开始时间
ExecuteEndTime string `protobuf:"bytes,9,opt,name=execute_end_time,json=executeEndTime,proto3" json:"execute_end_time"` // 执行结束时间
Remark string `protobuf:"bytes,10,opt,name=remark,proto3" json:"remark"` // 备注
TaskDetail *TaskDetailRequest `protobuf:"bytes,11,opt,name=task_detail,json=taskDetail,proto3" json:"task_detail"` // 任务详情
TaskDetail *UpdateScheduleTaskRequestTaskDetail `protobuf:"bytes,11,opt,name=task_detail,json=taskDetail,proto3" json:"task_detail"` // 任务详情
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1155,13 +1154,97 @@ func (x *UpdateScheduleTaskRequest) GetRemark() string {
return ""
}
func (x *UpdateScheduleTaskRequest) GetTaskDetail() *TaskDetailRequest {
func (x *UpdateScheduleTaskRequest) GetTaskDetail() *UpdateScheduleTaskRequestTaskDetail {
if x != nil {
return x.TaskDetail
}
return nil
}
type UpdateScheduleTaskRequestTaskDetail struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int32 `protobuf:"varint,5,opt,name=id,proto3" json:"id"`
TaskId int32 `protobuf:"varint,6,opt,name=task_id,json=taskId,proto3" json:"task_id"`
ArtistCount int32 `protobuf:"varint,1,opt,name=artist_count,json=artistCount,proto3" json:"artist_count"` // 艺人数量
Artists []*ArtistInfo `protobuf:"bytes,2,rep,name=artists,proto3" json:"artists"` // 艺人信息列表
Num int32 `protobuf:"varint,3,opt,name=num,proto3" json:"num"` // 任务数量
ContentType int32 `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3" json:"content_type"` // 内容类型
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateScheduleTaskRequestTaskDetail) Reset() {
*x = UpdateScheduleTaskRequestTaskDetail{}
mi := &file_pb_cron_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateScheduleTaskRequestTaskDetail) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateScheduleTaskRequestTaskDetail) ProtoMessage() {}
func (x *UpdateScheduleTaskRequestTaskDetail) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateScheduleTaskRequestTaskDetail.ProtoReflect.Descriptor instead.
func (*UpdateScheduleTaskRequestTaskDetail) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{11}
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetArtistCount() int32 {
if x != nil {
return x.ArtistCount
}
return 0
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetArtists() []*ArtistInfo {
if x != nil {
return x.Artists
}
return nil
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetNum() int32 {
if x != nil {
return x.Num
}
return 0
}
func (x *UpdateScheduleTaskRequestTaskDetail) GetContentType() int32 {
if x != nil {
return x.ContentType
}
return 0
}
type UpdateScheduleTaskResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` // 响应码
@ -1173,7 +1256,7 @@ type UpdateScheduleTaskResponse struct {
func (x *UpdateScheduleTaskResponse) Reset() {
*x = UpdateScheduleTaskResponse{}
mi := &file_pb_cron_proto_msgTypes[11]
mi := &file_pb_cron_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1185,7 +1268,7 @@ func (x *UpdateScheduleTaskResponse) String() string {
func (*UpdateScheduleTaskResponse) ProtoMessage() {}
func (x *UpdateScheduleTaskResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[11]
mi := &file_pb_cron_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1198,7 +1281,7 @@ func (x *UpdateScheduleTaskResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateScheduleTaskResponse.ProtoReflect.Descriptor instead.
func (*UpdateScheduleTaskResponse) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{11}
return file_pb_cron_proto_rawDescGZIP(), []int{12}
}
func (x *UpdateScheduleTaskResponse) GetCode() int32 {
@ -1232,13 +1315,14 @@ type GetListScheduleTaskRequest struct {
EndTime string `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time"` // 结束日期
Status int32 `protobuf:"varint,7,opt,name=Status,proto3" json:"Status"` // 任务状态
ContentType int32 `protobuf:"varint,8,opt,name=content_type,json=contentType,proto3" json:"content_type"` // 内容类型
Sorts map[string]string `protobuf:"bytes,9,rep,name=sorts,proto3" json:"sorts" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetListScheduleTaskRequest) Reset() {
*x = GetListScheduleTaskRequest{}
mi := &file_pb_cron_proto_msgTypes[12]
mi := &file_pb_cron_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1250,7 +1334,7 @@ func (x *GetListScheduleTaskRequest) String() string {
func (*GetListScheduleTaskRequest) ProtoMessage() {}
func (x *GetListScheduleTaskRequest) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[12]
mi := &file_pb_cron_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1263,7 +1347,7 @@ func (x *GetListScheduleTaskRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListScheduleTaskRequest.ProtoReflect.Descriptor instead.
func (*GetListScheduleTaskRequest) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{12}
return file_pb_cron_proto_rawDescGZIP(), []int{13}
}
func (x *GetListScheduleTaskRequest) GetPage() int32 {
@ -1322,6 +1406,13 @@ func (x *GetListScheduleTaskRequest) GetContentType() int32 {
return 0
}
func (x *GetListScheduleTaskRequest) GetSorts() map[string]string {
if x != nil {
return x.Sorts
}
return nil
}
type GetListScheduleTaskResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` // 响应码
@ -1336,7 +1427,7 @@ type GetListScheduleTaskResponse struct {
func (x *GetListScheduleTaskResponse) Reset() {
*x = GetListScheduleTaskResponse{}
mi := &file_pb_cron_proto_msgTypes[13]
mi := &file_pb_cron_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1348,7 +1439,7 @@ func (x *GetListScheduleTaskResponse) String() string {
func (*GetListScheduleTaskResponse) ProtoMessage() {}
func (x *GetListScheduleTaskResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[13]
mi := &file_pb_cron_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1361,7 +1452,7 @@ func (x *GetListScheduleTaskResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListScheduleTaskResponse.ProtoReflect.Descriptor instead.
func (*GetListScheduleTaskResponse) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{13}
return file_pb_cron_proto_rawDescGZIP(), []int{14}
}
func (x *GetListScheduleTaskResponse) GetCode() int32 {
@ -1422,7 +1513,7 @@ type GetListExecutionRecordRequest struct {
func (x *GetListExecutionRecordRequest) Reset() {
*x = GetListExecutionRecordRequest{}
mi := &file_pb_cron_proto_msgTypes[14]
mi := &file_pb_cron_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1434,7 +1525,7 @@ func (x *GetListExecutionRecordRequest) String() string {
func (*GetListExecutionRecordRequest) ProtoMessage() {}
func (x *GetListExecutionRecordRequest) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[14]
mi := &file_pb_cron_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1447,7 +1538,7 @@ func (x *GetListExecutionRecordRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListExecutionRecordRequest.ProtoReflect.Descriptor instead.
func (*GetListExecutionRecordRequest) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{14}
return file_pb_cron_proto_rawDescGZIP(), []int{15}
}
func (x *GetListExecutionRecordRequest) GetPage() int32 {
@ -1520,7 +1611,7 @@ type GetListExecutionRecordResponse struct {
func (x *GetListExecutionRecordResponse) Reset() {
*x = GetListExecutionRecordResponse{}
mi := &file_pb_cron_proto_msgTypes[15]
mi := &file_pb_cron_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1532,7 +1623,7 @@ func (x *GetListExecutionRecordResponse) String() string {
func (*GetListExecutionRecordResponse) ProtoMessage() {}
func (x *GetListExecutionRecordResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[15]
mi := &file_pb_cron_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1545,7 +1636,7 @@ func (x *GetListExecutionRecordResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListExecutionRecordResponse.ProtoReflect.Descriptor instead.
func (*GetListExecutionRecordResponse) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{15}
return file_pb_cron_proto_rawDescGZIP(), []int{16}
}
func (x *GetListExecutionRecordResponse) GetCode() int32 {
@ -1607,7 +1698,7 @@ type GetListExecutionResultRequest struct {
func (x *GetListExecutionResultRequest) Reset() {
*x = GetListExecutionResultRequest{}
mi := &file_pb_cron_proto_msgTypes[16]
mi := &file_pb_cron_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1619,7 +1710,7 @@ func (x *GetListExecutionResultRequest) String() string {
func (*GetListExecutionResultRequest) ProtoMessage() {}
func (x *GetListExecutionResultRequest) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[16]
mi := &file_pb_cron_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1632,7 +1723,7 @@ func (x *GetListExecutionResultRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListExecutionResultRequest.ProtoReflect.Descriptor instead.
func (*GetListExecutionResultRequest) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{16}
return file_pb_cron_proto_rawDescGZIP(), []int{17}
}
func (x *GetListExecutionResultRequest) GetPage() int32 {
@ -1712,7 +1803,7 @@ type GetListExecutionResultResponse struct {
func (x *GetListExecutionResultResponse) Reset() {
*x = GetListExecutionResultResponse{}
mi := &file_pb_cron_proto_msgTypes[17]
mi := &file_pb_cron_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1724,7 +1815,7 @@ func (x *GetListExecutionResultResponse) String() string {
func (*GetListExecutionResultResponse) ProtoMessage() {}
func (x *GetListExecutionResultResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[17]
mi := &file_pb_cron_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1737,7 +1828,7 @@ func (x *GetListExecutionResultResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetListExecutionResultResponse.ProtoReflect.Descriptor instead.
func (*GetListExecutionResultResponse) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{17}
return file_pb_cron_proto_rawDescGZIP(), []int{18}
}
func (x *GetListExecutionResultResponse) GetCode() int32 {
@ -1792,7 +1883,7 @@ type TaskStatus struct {
func (x *TaskStatus) Reset() {
*x = TaskStatus{}
mi := &file_pb_cron_proto_msgTypes[18]
mi := &file_pb_cron_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1804,7 +1895,7 @@ func (x *TaskStatus) String() string {
func (*TaskStatus) ProtoMessage() {}
func (x *TaskStatus) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[18]
mi := &file_pb_cron_proto_msgTypes[19]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1817,7 +1908,7 @@ func (x *TaskStatus) ProtoReflect() protoreflect.Message {
// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead.
func (*TaskStatus) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{18}
return file_pb_cron_proto_rawDescGZIP(), []int{19}
}
func (x *TaskStatus) GetKey() int32 {
@ -1845,7 +1936,7 @@ type GetScheduleTaskStatusResponse struct {
func (x *GetScheduleTaskStatusResponse) Reset() {
*x = GetScheduleTaskStatusResponse{}
mi := &file_pb_cron_proto_msgTypes[19]
mi := &file_pb_cron_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1857,7 +1948,7 @@ func (x *GetScheduleTaskStatusResponse) String() string {
func (*GetScheduleTaskStatusResponse) ProtoMessage() {}
func (x *GetScheduleTaskStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_pb_cron_proto_msgTypes[19]
mi := &file_pb_cron_proto_msgTypes[20]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1870,7 +1961,7 @@ func (x *GetScheduleTaskStatusResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetScheduleTaskStatusResponse.ProtoReflect.Descriptor instead.
func (*GetScheduleTaskStatusResponse) Descriptor() ([]byte, []int) {
return file_pb_cron_proto_rawDescGZIP(), []int{19}
return file_pb_cron_proto_rawDescGZIP(), []int{20}
}
func (x *GetScheduleTaskStatusResponse) GetCode() int32 {
@ -1898,7 +1989,7 @@ var File_pb_cron_proto protoreflect.FileDescriptor
const file_pb_cron_proto_rawDesc = "" +
"\n" +
"\rpb/cron.proto\x12\x04cron\x1a\x1bgoogle/protobuf/empty.proto\"!\n" +
"\rpb/cron.proto\x12\x04cron\"!\n" +
"\x0fCommonIDRequest\x12\x0e\n" +
"\x02id\x18\x01 \x01(\rR\x02id\">\n" +
"\x0eCommonResponse\x12\x12\n" +
@ -2018,7 +2109,7 @@ const file_pb_cron_proto_rawDesc = "" +
"\x1aCreateScheduleTaskResponse\x12\x12\n" +
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
"\amessage\x18\x02 \x01(\tR\amessage\x12&\n" +
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\x9c\x03\n" +
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\xae\x03\n" +
"\x19UpdateScheduleTaskRequest\x12\x17\n" +
"\atask_id\x18\x01 \x01(\x04R\x06taskId\x12\x1d\n" +
"\n" +
@ -2034,13 +2125,20 @@ const file_pb_cron_proto_rawDesc = "" +
"\x12execute_start_time\x18\b \x01(\tR\x10executeStartTime\x12(\n" +
"\x10execute_end_time\x18\t \x01(\tR\x0eexecuteEndTime\x12\x16\n" +
"\x06remark\x18\n" +
" \x01(\tR\x06remark\x128\n" +
"\vtask_detail\x18\v \x01(\v2\x17.cron.TaskDetailRequestR\n" +
"taskDetail\"r\n" +
" \x01(\tR\x06remark\x12J\n" +
"\vtask_detail\x18\v \x01(\v2).cron.UpdateScheduleTaskRequestTaskDetailR\n" +
"taskDetail\"\xd2\x01\n" +
"#UpdateScheduleTaskRequestTaskDetail\x12\x0e\n" +
"\x02id\x18\x05 \x01(\x05R\x02id\x12\x17\n" +
"\atask_id\x18\x06 \x01(\x05R\x06taskId\x12!\n" +
"\fartist_count\x18\x01 \x01(\x05R\vartistCount\x12*\n" +
"\aartists\x18\x02 \x03(\v2\x10.cron.ArtistInfoR\aartists\x12\x10\n" +
"\x03num\x18\x03 \x01(\x05R\x03num\x12!\n" +
"\fcontent_type\x18\x04 \x01(\x05R\vcontentType\"r\n" +
"\x1aUpdateScheduleTaskResponse\x12\x12\n" +
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
"\amessage\x18\x02 \x01(\tR\amessage\x12&\n" +
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\x82\x02\n" +
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\xff\x02\n" +
"\x1aGetListScheduleTaskRequest\x12\x12\n" +
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x1b\n" +
"\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
@ -2052,7 +2150,12 @@ const file_pb_cron_proto_rawDesc = "" +
"start_time\x18\x05 \x01(\tR\tstartTime\x12\x19\n" +
"\bend_time\x18\x06 \x01(\tR\aendTime\x12\x16\n" +
"\x06Status\x18\a \x01(\x05R\x06Status\x12!\n" +
"\fcontent_type\x18\b \x01(\x05R\vcontentType\"\xb1\x01\n" +
"\fcontent_type\x18\b \x01(\x05R\vcontentType\x12A\n" +
"\x05sorts\x18\t \x03(\v2+.cron.GetListScheduleTaskRequest.SortsEntryR\x05sorts\x1a8\n" +
"\n" +
"SortsEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb1\x01\n" +
"\x1bGetListScheduleTaskResponse\x12\x12\n" +
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
"\amessage\x18\x02 \x01(\tR\amessage\x12\x14\n" +
@ -2120,7 +2223,7 @@ func file_pb_cron_proto_rawDescGZIP() []byte {
return file_pb_cron_proto_rawDescData
}
var file_pb_cron_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_pb_cron_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_pb_cron_proto_goTypes = []any{
(*CommonIDRequest)(nil), // 0: cron.CommonIDRequest
(*CommonResponse)(nil), // 1: cron.CommonResponse
@ -2133,15 +2236,17 @@ var file_pb_cron_proto_goTypes = []any{
(*TaskDetailRequest)(nil), // 8: cron.TaskDetailRequest
(*CreateScheduleTaskResponse)(nil), // 9: cron.CreateScheduleTaskResponse
(*UpdateScheduleTaskRequest)(nil), // 10: cron.UpdateScheduleTaskRequest
(*UpdateScheduleTaskResponse)(nil), // 11: cron.UpdateScheduleTaskResponse
(*GetListScheduleTaskRequest)(nil), // 12: cron.GetListScheduleTaskRequest
(*GetListScheduleTaskResponse)(nil), // 13: cron.GetListScheduleTaskResponse
(*GetListExecutionRecordRequest)(nil), // 14: cron.GetListExecutionRecordRequest
(*GetListExecutionRecordResponse)(nil), // 15: cron.GetListExecutionRecordResponse
(*GetListExecutionResultRequest)(nil), // 16: cron.GetListExecutionResultRequest
(*GetListExecutionResultResponse)(nil), // 17: cron.GetListExecutionResultResponse
(*TaskStatus)(nil), // 18: cron.TaskStatus
(*GetScheduleTaskStatusResponse)(nil), // 19: cron.GetScheduleTaskStatusResponse
(*UpdateScheduleTaskRequestTaskDetail)(nil), // 11: cron.UpdateScheduleTaskRequestTaskDetail
(*UpdateScheduleTaskResponse)(nil), // 12: cron.UpdateScheduleTaskResponse
(*GetListScheduleTaskRequest)(nil), // 13: cron.GetListScheduleTaskRequest
(*GetListScheduleTaskResponse)(nil), // 14: cron.GetListScheduleTaskResponse
(*GetListExecutionRecordRequest)(nil), // 15: cron.GetListExecutionRecordRequest
(*GetListExecutionRecordResponse)(nil), // 16: cron.GetListExecutionRecordResponse
(*GetListExecutionResultRequest)(nil), // 17: cron.GetListExecutionResultRequest
(*GetListExecutionResultResponse)(nil), // 18: cron.GetListExecutionResultResponse
(*TaskStatus)(nil), // 19: cron.TaskStatus
(*GetScheduleTaskStatusResponse)(nil), // 20: cron.GetScheduleTaskStatusResponse
nil, // 21: cron.GetListScheduleTaskRequest.SortsEntry
}
var file_pb_cron_proto_depIdxs = []int32{
3, // 0: cron.ScheduleTask.task_detail:type_name -> cron.TaskDetail
@ -2151,17 +2256,19 @@ var file_pb_cron_proto_depIdxs = []int32{
8, // 4: cron.CreateScheduleTaskRequest.task_detail:type_name -> cron.TaskDetailRequest
4, // 5: cron.TaskDetailRequest.artists:type_name -> cron.ArtistInfo
2, // 6: cron.CreateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
8, // 7: cron.UpdateScheduleTaskRequest.task_detail:type_name -> cron.TaskDetailRequest
2, // 8: cron.UpdateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
2, // 9: cron.GetListScheduleTaskResponse.data:type_name -> cron.ScheduleTask
5, // 10: cron.GetListExecutionRecordResponse.data:type_name -> cron.ExecutionRecord
6, // 11: cron.GetListExecutionResultResponse.data:type_name -> cron.ExecutionResult
18, // 12: cron.GetScheduleTaskStatusResponse.data:type_name -> cron.TaskStatus
13, // [13:13] is the sub-list for method output_type
13, // [13:13] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
11, // 7: cron.UpdateScheduleTaskRequest.task_detail:type_name -> cron.UpdateScheduleTaskRequestTaskDetail
4, // 8: cron.UpdateScheduleTaskRequestTaskDetail.artists:type_name -> cron.ArtistInfo
2, // 9: cron.UpdateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
21, // 10: cron.GetListScheduleTaskRequest.sorts:type_name -> cron.GetListScheduleTaskRequest.SortsEntry
2, // 11: cron.GetListScheduleTaskResponse.data:type_name -> cron.ScheduleTask
5, // 12: cron.GetListExecutionRecordResponse.data:type_name -> cron.ExecutionRecord
6, // 13: cron.GetListExecutionResultResponse.data:type_name -> cron.ExecutionResult
19, // 14: cron.GetScheduleTaskStatusResponse.data:type_name -> cron.TaskStatus
15, // [15:15] is the sub-list for method output_type
15, // [15:15] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
}
func init() { file_pb_cron_proto_init() }
@ -2175,7 +2282,7 @@ func file_pb_cron_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pb_cron_proto_rawDesc), len(file_pb_cron_proto_rawDesc)),
NumEnums: 0,
NumMessages: 20,
NumMessages: 22,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -7,7 +7,6 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/protobuf/types/known/emptypb"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
@ -97,6 +96,16 @@ func (this *UpdateScheduleTaskRequest) Validate() error {
}
return nil
}
func (this *UpdateScheduleTaskRequestTaskDetail) Validate() error {
for _, item := range this.Artists {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Artists", err)
}
}
}
return nil
}
func (this *UpdateScheduleTaskResponse) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
@ -106,6 +115,7 @@ func (this *UpdateScheduleTaskResponse) Validate() error {
return nil
}
func (this *GetListScheduleTaskRequest) Validate() error {
// Validation of proto3 map<> fields is unsupported.
return nil
}
func (this *GetListScheduleTaskResponse) Validate() error {

Binary file not shown.

View File

@ -11,6 +11,7 @@ import (
bundleModel "fonchain-fiee/pkg/model/bundle"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
serverCast "fonchain-fiee/pkg/service/cast"
"log"
"math/rand"
@ -31,6 +32,7 @@ func InitTasks() error {
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
err = cm.AddTask("refreshArtistOrder", "0 */30 * * * *", RefreshArtistOrderTask)
// 每天 00:30 和 12:30 执行 Ayrshare 指标采集任务
// err = cm.AddTask("ayrshareMetricsCollector", "0 30 0,12 * * *", AyrshareMetricsCollectorTask)
@ -137,6 +139,17 @@ func AutoManuallyConfirmWorkTask() {
continue
}
if balanceInfoRes.BundleStatus == common.BundleExpired {
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark,
ConfirmStatus: 3,
})
log.Printf("套餐已过期,作品uuid:"+req.WorkUuid, zap.Error(err))
continue
}
wordInfoRes, err := service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{
WorkUuid: req.WorkUuid,
})
@ -491,3 +504,7 @@ func ArtistAutoConfirmAnalysisTask() {
func AyrshareMetricsCollectorTask() {
serverCast.ExecuteAyrshareMetricsCollector()
}
func RefreshArtistOrderTask() {
service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "refreshArtistOrder"})
}

View File

@ -24,7 +24,7 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
// 表头
headers := []interface{}{
"艺人", "手机号", "用户编号", "作品标题", "脚本", "作品类型", "类型", "Ins", "Tiktok", "DM", "作品状态", "验收确认类型",
"艺人", "手机号", "用户编号", "作品标题", "脚本", "作品类型", "类型", "Ins", "Tiktok", "DM", "Youtube", "Bulesky", "作品状态", "验收确认类型",
"说明", "发布账号", "管理人", "上传时间", "待艺人确认时间", "验收确认通过时间", "发布成功时间",
}
if err := sw.SetRow("A1", headers); err != nil {
@ -72,12 +72,14 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.InsStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.TiktokStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.DmStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.YoutubeStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.BlueskyStatus)],
modelCast.WorkStatusMM[int(info.WorkStatus)],
modelCast.ConfirmTypeMM[int(info.ConfirmType)],
info.Remark,
mediaAccountNames,
managerNames,
info.Status1Time,
info.SubmitTime,
info.Status4Time,
info.Status9Time,
info.Status6Time,

View File

@ -70,6 +70,7 @@ func CheckLogin(provider *api.AccountFieeClientImpl) gin.HandlerFunc {
TelNum: jwt.Phone,
SubscriberNumber: infoRes.SubscriberNumber,
IdNumber: infoRes.IdNumber,
InviterID: infoRes.InviterId,
}
ctx.Set("jwtInfo", loginInfo)

View File

@ -17,17 +17,16 @@ const (
var PlatformNameKv = map[uint32]string{
1: "tiktok",
2: "youtube",
3: "instagram",
4: "DM",
5: "bluesky",
}
var NamePlatformIDKv = map[string]uint32{
"tiktok": 1,
"youtube": 2,
"instagram": 3,
"DM": 4,
}
var PlatformIDStrKv = map[string]uint8{
"TIKTOK": 1,
"INS": 2,
"DM": 4,
"bluesky": 5,
}

View File

@ -29,6 +29,7 @@ type Info struct {
TelNum string `json:"telNum"`
SubscriberNumber string `json:"subscriberNumber"`
IdNumber string `json:"idNumber"`
InviterID uint64 `json:"inviterId"`
}
func GetUserInfoFromC(c *gin.Context) Info {

View File

@ -23,6 +23,7 @@ func cronRouter(r *gin.RouterGroup) {
cron.POST("exportExcelExecutionResult", cronService.ExportExcelExecutionResult)
cron.POST("getListExecutionRecord", cronService.GetListExecutionRecord)
cron.POST("getScheduleTaskStatus", cronService.GetScheduleTaskStatus)
cron.POST("getImportData", cronService.GetImportData)
}
}

View File

@ -62,6 +62,7 @@ func MediaRouter(r *gin.RouterGroup) {
task := auth.Group("task")
{
task.POST("list", serviceCast.TaskList)
task.POST("delete", serviceCast.DeleteTasK)
}
layout := auth.Group("layout")

View File

@ -7,6 +7,7 @@ import (
"fonchain-fiee/pkg/service/account"
"fonchain-fiee/pkg/service/asChat"
"fonchain-fiee/pkg/service/auth"
"fonchain-fiee/pkg/service/bundle"
"fonchain-fiee/pkg/service/file"
"fonchain-fiee/pkg/service/governance"
imports "fonchain-fiee/pkg/service/import"
@ -69,6 +70,7 @@ func NewRouter() *gin.Engine {
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
acRoute := privateGroup.Group("/user")
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
{
@ -83,6 +85,7 @@ func NewRouter() *gin.Engine {
{
webAcRouter.POST("list", account.UserList) //用户列表
webAcRouter.POST("approval", account.UserApproval) //实名审核
webAcRouter.POST("admin-update", account.AdminUpdate) //更新用户信息
webAcRouter.POST("excel/download", account.UserExcelDownload) //excel下载
}
}
@ -215,6 +218,10 @@ func NewRouter() *gin.Engine {
importRoute.GET("generate/photo/test2", imports.Test2)
}
{
//健康检测
v1.GET("health", bundle.HealthCheck)
}
//静态文件
r.StaticFS("/api/fiee/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) {

View File

@ -130,6 +130,37 @@ func UserUpdate(c *gin.Context) {
Domain: req.Domain,
Language: req.Language,
NickName: req.NickName,
Email: req.Email,
AbroadTel: req.AbroadTel,
AbroadTelAreaCode: req.AbroadTelAreaCode,
})
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
func AdminUpdate(c *gin.Context) {
var req account.UpdateRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
if req.ID == 0 {
service.Error(c, errors.New("用户ID不能为空"))
return
}
req.Domain = "app"
res, err := service.AccountFieeProvider.Update(c, &account.UpdateRequest{
ID: req.ID,
Domain: req.Domain,
//Language: req.Language,
//NickName: req.NickName,
Email: req.Email,
AbroadTel: req.AbroadTel,
AbroadTelAreaCode: req.AbroadTelAreaCode,
})
if err != nil {
service.Error(c, err)
@ -409,6 +440,31 @@ func ValidateCaptcha(c *gin.Context) {
service.Success(c, res)
}
func CheckRegister(c *gin.Context) {
type CheckRegisterRes struct {
IsRegister bool `json:"is_register"`
}
req := account.UserByTelRequest{}
req.Domain = "app"
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
data, err := service.AccountFieeProvider.UserByTel(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
var res CheckRegisterRes
if data.Id == 0 {
res.IsRegister = false
} else {
res.IsRegister = true
}
service.Success(c, res)
return
}
func UserLogout(c *gin.Context) {
req := account.DecryptJwtRequest{}
req.Token = c.GetHeader(e.Authorization)
@ -428,6 +484,16 @@ func UserRegister(c *gin.Context) {
return
}
req.Domain = "app"
if req.InviterCode != "" {
codeRes, err := service.AccountFieeProvider.GetInviterInfo(context.Background(), &account.InviterInfoRequest{
Code: req.InviterCode,
})
if err != nil || codeRes.Id == 0 {
service.Error(c, errors.New("邀请码错误"))
return
}
req.InviterID = codeRes.Id
}
res, err := service.AccountFieeProvider.Register(context.Background(), &req)
if err != nil {
service.Error(c, err)

View File

@ -197,6 +197,18 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
service.Error(c, errors.New(common.GetWorkDetailFailed))
return
}
if balanceInfoRes.BundleStatus == common.BundleExpired {
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark,
ConfirmStatus: 3,
})
service.Error(c, errors.New("套餐已过期"))
return
}
if wordInfoRes.WorkStatus != 4 {
service.Error(c, errors.New("作品不是待确认状态"))
return
@ -209,6 +221,12 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
case 1:
{
if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark,
ConfirmStatus: 3,
})
service.Error(c, errors.New("图文余量不足"))
return
}
@ -217,6 +235,12 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
case 2:
{
if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark,
ConfirmStatus: 3,
})
service.Error(c, errors.New("视频余量不足"))
return
}
@ -428,6 +452,7 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
"当月消耗套餐金额($)", "当月消耗增值金额($)",
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
@ -471,80 +496,92 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
// 当月视频消耗金额($)
monthlyBundleVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyBundleVideoConsumptionPrice, 64)
if err != nil {
return err
}
monthlyIncreaseVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyIncreaseVideoConsumptionPrice, 64)
if err != nil {
return err
}
_ = write(15, fmt.Sprintf("%.2f", monthlyBundleVideoConsumptionPrice))
_ = write(16, fmt.Sprintf("%.2f", monthlyIncreaseVideoConsumptionPrice))
// 账号类
_ = write(15, int(it.BundleAccountNumber))
_ = write(16, int(it.IncreaseAccountNumber))
_ = write(17, int(it.BundleAccountConsumptionNumber))
_ = write(18, int(it.IncreaseAccountConsumptionNumber))
_ = write(17, int(it.BundleAccountNumber))
_ = write(18, int(it.IncreaseAccountNumber))
_ = write(19, int(it.BundleAccountConsumptionNumber))
_ = write(20, int(it.IncreaseAccountConsumptionNumber))
// 视频类
_ = write(19, int(it.MonthlyBundleVideoNumber))
_ = write(20, int(it.MonthlyIncreaseVideoNumber))
_ = write(21, int(it.BundleVideoConsumptionNumber))
_ = write(22, int(it.IncreaseVideoConsumptionNumber))
_ = write(23, int(it.InvalidBundleVideoNumber))
_ = write(24, int(it.InvalidIncreaseVideoNumber))
_ = write(25, int(it.MonthlyNewBundleVideoNumber))
_ = write(26, int(it.MonthlyNewIncreaseVideoNumber))
_ = write(27, int(it.MonthlyBundleVideoConsumptionNumber))
_ = write(28, int(it.MonthlyIncreaseVideoConsumptionNumber))
_ = write(29, int(it.MonthlyInvalidBundleVideoNumber))
_ = write(30, int(it.MonthlyInvalidIncreaseVideoNumber))
_ = write(21, int(it.MonthlyBundleVideoNumber))
_ = write(22, int(it.MonthlyIncreaseVideoNumber))
_ = write(23, int(it.BundleVideoConsumptionNumber))
_ = write(24, int(it.IncreaseVideoConsumptionNumber))
_ = write(25, int(it.InvalidBundleVideoNumber))
_ = write(26, int(it.InvalidIncreaseVideoNumber))
_ = write(27, int(it.MonthlyNewBundleVideoNumber))
_ = write(28, int(it.MonthlyNewIncreaseVideoNumber))
_ = write(29, int(it.MonthlyBundleVideoConsumptionNumber))
_ = write(30, int(it.MonthlyIncreaseVideoConsumptionNumber))
_ = write(31, int(it.MonthlyInvalidBundleVideoNumber))
_ = write(32, int(it.MonthlyInvalidIncreaseVideoNumber))
// 图文类
_ = write(31, int(it.MonthlyBundleImageNumber))
_ = write(32, int(it.MonthlyIncreaseImageNumber))
_ = write(33, int(it.BundleImageConsumptionNumber))
_ = write(34, int(it.IncreaseImageConsumptionNumber))
_ = write(35, int(it.InvalidBundleImageNumber))
_ = write(36, int(it.InvalidIncreaseImageNumber))
_ = write(37, int(it.MonthlyNewBundleImageNumber))
_ = write(38, int(it.MonthlyNewIncreaseImageNumber))
_ = write(39, int(it.MonthlyBundleImageConsumptionNumber))
_ = write(40, int(it.MonthlyIncreaseImageConsumptionNumber))
_ = write(41, int(it.MonthlyInvalidBundleImageNumber))
_ = write(42, int(it.MonthlyInvalidIncreaseImageNumber))
_ = write(33, int(it.MonthlyBundleImageNumber))
_ = write(34, int(it.MonthlyIncreaseImageNumber))
_ = write(35, int(it.BundleImageConsumptionNumber))
_ = write(36, int(it.IncreaseImageConsumptionNumber))
_ = write(37, int(it.InvalidBundleImageNumber))
_ = write(38, int(it.InvalidIncreaseImageNumber))
_ = write(39, int(it.MonthlyNewBundleImageNumber))
_ = write(40, int(it.MonthlyNewIncreaseImageNumber))
_ = write(41, int(it.MonthlyBundleImageConsumptionNumber))
_ = write(42, int(it.MonthlyIncreaseImageConsumptionNumber))
_ = write(43, int(it.MonthlyInvalidBundleImageNumber))
_ = write(44, int(it.MonthlyInvalidIncreaseImageNumber))
// 数据分析类
_ = write(43, int(it.MonthlyBundleDataAnalysisNumber))
_ = write(44, int(it.MonthlyIncreaseDataAnalysisNumber))
_ = write(45, int(it.BundleDataAnalysisConsumptionNumber))
_ = write(46, int(it.IncreaseDataAnalysisConsumptionNumber))
_ = write(47, int(it.InvalidBundleDataAnalysisNumber))
_ = write(48, int(it.InvalidIncreaseDataAnalysisNumber))
_ = write(49, int(it.MonthlyNewBundleDataAnalysisNumber))
_ = write(50, int(it.MonthlyNewIncreaseDataAnalysisNumber))
_ = write(51, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
_ = write(52, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
_ = write(53, int(it.MonthlyInvalidBundleDataAnalysisNumber))
_ = write(54, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
_ = write(45, int(it.MonthlyBundleDataAnalysisNumber))
_ = write(46, int(it.MonthlyIncreaseDataAnalysisNumber))
_ = write(47, int(it.BundleDataAnalysisConsumptionNumber))
_ = write(48, int(it.IncreaseDataAnalysisConsumptionNumber))
_ = write(49, int(it.InvalidBundleDataAnalysisNumber))
_ = write(50, int(it.InvalidIncreaseDataAnalysisNumber))
_ = write(51, int(it.MonthlyNewBundleDataAnalysisNumber))
_ = write(52, int(it.MonthlyNewIncreaseDataAnalysisNumber))
_ = write(53, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
_ = write(54, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
_ = write(55, int(it.MonthlyInvalidBundleDataAnalysisNumber))
_ = write(56, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
// 竞品数
_ = write(55, int(it.MonthlyBundleCompetitiveNumber))
_ = write(56, int(it.MonthlyIncreaseCompetitiveNumber))
_ = write(57, int(it.BundleCompetitiveConsumptionNumber))
_ = write(58, int(it.IncreaseCompetitiveConsumptionNumber))
_ = write(59, int(it.InvalidBundleCompetitiveNumber))
_ = write(60, int(it.InvalidIncreaseCompetitiveNumber))
_ = write(61, int(it.MonthlyNewBundleCompetitiveNumber))
_ = write(62, int(it.MonthlyNewIncreaseCompetitiveNumber))
_ = write(63, int(it.MonthlyBundleCompetitiveConsumptionNumber))
_ = write(64, int(it.MonthlyIncreaseCompetitiveConsumptionNumber))
_ = write(65, int(it.MonthlyInvalidBundleCompetitiveNumber))
_ = write(66, int(it.MonthlyInvalidIncreaseCompetitiveNumber))
_ = write(57, int(it.MonthlyBundleCompetitiveNumber))
_ = write(58, int(it.MonthlyIncreaseCompetitiveNumber))
_ = write(59, int(it.BundleCompetitiveConsumptionNumber))
_ = write(60, int(it.IncreaseCompetitiveConsumptionNumber))
_ = write(61, int(it.InvalidBundleCompetitiveNumber))
_ = write(62, int(it.InvalidIncreaseCompetitiveNumber))
_ = write(63, int(it.MonthlyNewBundleCompetitiveNumber))
_ = write(64, int(it.MonthlyNewIncreaseCompetitiveNumber))
_ = write(65, int(it.MonthlyBundleCompetitiveConsumptionNumber))
_ = write(66, int(it.MonthlyIncreaseCompetitiveConsumptionNumber))
_ = write(67, int(it.MonthlyInvalidBundleCompetitiveNumber))
_ = write(68, int(it.MonthlyInvalidIncreaseCompetitiveNumber))
// 手动扩展类
_ = write(67, int(it.MonthlyNewManualAccountNumber))
_ = write(68, int(it.MonthlyNewManualVideoNumber))
_ = write(69, int(it.MonthlyNewManualImageNumber))
_ = write(70, int(it.MonthlyNewManualDataAnalysisNumber))
_ = write(71, int(it.MonthlyNewDurationNumber))
_ = write(72, int(it.MonthlyManualAccountConsumptionNumber))
_ = write(73, int(it.MonthlyManualVideoConsumptionNumber))
_ = write(74, int(it.MonthlyManualImageConsumptionNumber))
_ = write(75, int(it.MonthlyManualDataAnalysisConsumptionNumber))
_ = write(76, int(it.MonthlyNewManualCompetitiveNumber))
_ = write(77, int(it.MonthlyManualCompetitiveConsumptionNumber))
_ = write(69, int(it.MonthlyNewManualAccountNumber))
_ = write(70, int(it.MonthlyNewManualVideoNumber))
_ = write(71, int(it.MonthlyNewManualImageNumber))
_ = write(72, int(it.MonthlyNewManualDataAnalysisNumber))
_ = write(73, int(it.MonthlyNewDurationNumber))
_ = write(74, int(it.MonthlyManualAccountConsumptionNumber))
_ = write(75, int(it.MonthlyManualVideoConsumptionNumber))
_ = write(76, int(it.MonthlyManualImageConsumptionNumber))
_ = write(77, int(it.MonthlyManualDataAnalysisConsumptionNumber))
_ = write(78, int(it.MonthlyNewManualCompetitiveNumber))
_ = write(79, int(it.MonthlyManualCompetitiveConsumptionNumber))
}
@ -564,7 +601,7 @@ func GetAccountBundleBalance(c *gin.Context) {
service.Error(c, err)
return
}
req.Month = time.Now().Format("2006-01")
req.Month = []string{time.Now().Format("2006-01")}
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.GetBundleBalanceListFailed))

View File

@ -17,7 +17,6 @@ import (
"strings"
"time"
"github.com/duke-git/lancet/v2/datetime"
"github.com/shopspring/decimal"
"github.com/gin-gonic/gin"
@ -93,9 +92,30 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
sumFee := decimal.Zero
for _, i := range data {
sumPayment = sumPayment.Add(decimal.NewFromFloat(float64(i.PaymentAmount)))
sumFinal = sumFinal.Add(decimal.NewFromFloat(float64(i.FinalAmount)))
sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
s := fmt.Sprintf("%.2f", i.PaymentAmount)
d, err := decimal.NewFromString(s)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return
}
sumPayment = sumPayment.Add(d)
s = fmt.Sprintf("%.2f", i.FinalAmount)
d, err = decimal.NewFromString(s)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return
}
sumFinal = sumFinal.Add(d)
s = fmt.Sprintf("%.2f", i.FeeAmount)
d, err = decimal.NewFromString(s)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return
}
sumFee = sumFee.Add(d)
}
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "合计支付金额(美元)")
@ -171,7 +191,7 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
sheet := "Sheet1"
f := excelize.NewFile()
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "DM账号状态", "Instagram账号名", "Instagram账号状态", "TikTok账号名", "TikTok账号状态"}
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "DM账号状态", "Instagram账号名", "Instagram账号状态", "TikTok账号名", "TikTok账号状态", "Bluesky账号名", "Bluesky账号状态", "Youtube账号名", "Youtube账号状态"}
for i, h := range headers {
col, _ := excelize.ColumnNumberToName(i + 1)
cell := col + "1"
@ -206,6 +226,10 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
_ = write(7, authStatus[it.InsAuthStatus])
_ = write(8, it.TiktokNickname)
_ = write(9, authStatus[it.TiktokAuthStatus])
_ = write(10, it.BlueskyNickname)
_ = write(11, authStatus[it.BlueskyAuthStatus])
_ = write(12, it.YoutubeNickname)
_ = write(13, authStatus[it.YoutubeAuthStatus])
}
// 可选:设置列宽,使表格更美观
_ = f.SetColWidth(sheet, "A", "AZ", 18)
@ -232,11 +256,9 @@ func MetricsVideoSubmitExport(ctx *gin.Context) {
return
}
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
t, err := time.Parse("2006-01", req.Month)
if err == nil {
if len(req.Month) > 0 {
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime),
SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime),
SubmitTimeMonths: req.Month,
Page: 1,
PageSize: 99999,
})

View File

@ -246,10 +246,16 @@ func CreateBundleOrderSignature(c *gin.Context) {
service.Error(c, err)
return
}
if userInfo.InviterID != 0 && logic.CheckUserFirstOrder(userInfo.ID) {
req.InviterId = userInfo.InviterID
}
// 组装订单信息
req = logic.BuildOrderRequest(req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract)
// 校验发布平台
if len(req.PlatformIds) == 0 {
req.PlatformIds = []uint32{1, 4, 5}
}
// 创建订单
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
if err != nil {
@ -514,7 +520,6 @@ func OrderRecordsListV2(c *gin.Context) {
for id := range userIdSet {
userIds = append(userIds, id)
}
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds,
Domain: "app",
@ -536,6 +541,10 @@ func OrderRecordsListV2(c *gin.Context) {
item.CustomerName = u.Name
item.TelNum = u.TelNum
item.SubNum = u.SubNum
if item.InviterId != 0 {
item.InviterCode = u.InviterCode
item.InviterName = u.InviterName
}
}
}
}
@ -618,6 +627,10 @@ func OrderRecordsListDownload(c *gin.Context) {
item.CustomerName = u.Name
item.TelNum = u.TelNum
item.SubNum = u.SubNum
if item.InviterId != 0 {
item.InviterCode = u.InviterCode
item.InviterName = u.InviterName
}
}
}
}
@ -642,7 +655,7 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
headers := []string{
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态", "邀请码", "邀请码所属人",
}
for i, h := range headers {
cell := fmt.Sprintf("%s%d", string(rune('A'+i)), 1)
@ -676,6 +689,8 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt)
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.PayTime)
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount)
f.SetCellValue(sheetName, fmt.Sprintf("Q%d", rowIndex), bundleInfo.InviterCode)
f.SetCellValue(sheetName, fmt.Sprintf("R%d", rowIndex), bundleInfo.InviterName)
if addCount > 0 {
for i, add := range bundleInfo.AddBundleInfo {

View File

@ -105,6 +105,8 @@ const (
GetWorkDetailFailed = "获取作品详情失败"
)
//用户套餐状态
// 余量
const (
BundleExtendFailed = "套餐扩展失败"
@ -122,9 +124,10 @@ const (
InsufficientBalance = "余量不足"
)
//用户套餐状态
const (
BundleExpired = 1
BundleNotExpired = 0
BundleExpired = 1 //已过期
BundleNotExpired = 0 //未过期
)
// 数据指标

View File

@ -0,0 +1,180 @@
package bundle
import (
"context"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast"
"fonchain-fiee/api/files"
"fonchain-fiee/api/governance"
"fonchain-fiee/api/order"
"fonchain-fiee/api/payment"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/service"
"net/http"
"time"
"github.com/gin-gonic/gin"
)
// HealthCheck 健康检测接口
func HealthCheck(c *gin.Context) {
healthStatus := gin.H{
"status": "ok",
"timestamp": time.Now().Unix(),
"checks": make(map[string]interface{}),
}
// 检查 Redis 连接
redisStatus := "ok"
redisErr := ""
if cache.RedisClient != nil {
_, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
_, err := cache.RedisClient.Ping().Result()
if err != nil {
redisStatus = "failed"
redisErr = err.Error()
}
} else {
redisStatus = "failed"
redisErr = "Redis client is nil"
}
healthStatus["checks"].(map[string]interface{})["redis"] = gin.H{
"status": redisStatus,
"error": redisErr,
}
// 检查微服务连接(调用一个简单的服务方法)
serviceStatus := "ok"
serviceErr := ""
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
// 调用 BundleProvider 的简单方法进行健康检测
_, err := service.BundleProvider.GetBundleBalanceByUserId(ctx, &bundle.GetBundleBalanceByUserIdReq{
UserId: 0, // 使用一个不存在的用户ID只检测服务连通性
})
if err != nil {
// 检查是否是超时或连接错误
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Bundle Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["bundleService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
//调用 OrderProvider 的简单方法进行健康检测
_, err = service.OrderProvider.GetOrder(ctx, &order.CommonRequest{
ID: 0,
Domain: "",
SeriesUid: "", // 使用一个不存在的订单ID只检测服务连通性
})
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Order Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["orderService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
//调用 FilesProvider 的简单方法进行健康检测
_, err = service.FilesProvider.List(ctx, &files.FileListReq{
Path: "/",
UserSpacePath: "/fiee",
Page: 1,
PageSize: 50,
})
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Filesbrowser Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["filesbrowserService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
//调用 PaymentProvider 的简单方法进行健康检测
_, err = service.PaymentProvider.QueryPayByOutTradeNo(ctx, &payment.PayQueryRequest{
PayType: "2",
OutTradeNo: "1234567890",
})
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Payment Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["paymentService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
//调用 CastProvider 的简单方法进行健康检测
_, err = service.CastProvider.WorkList(ctx, &cast.WorkListReq{
Page: 1,
PageSize: 10,
})
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Cast Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["castService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
//调用 GovernanceProvider 的简单方法进行健康检测
_, err = service.GovernanceProvider.List(ctx, &governance.ListReq{
Page: 1,
PageSize: 10,
})
if err != nil {
if ctx.Err() == context.DeadlineExceeded {
serviceStatus = "Document Service timeout"
serviceErr = "Service timeout"
} else {
// 其他错误(如业务错误)认为服务是可用的
serviceStatus = "ok"
serviceErr = ""
}
}
healthStatus["checks"].(map[string]interface{})["documentService"] = gin.H{
"status": serviceStatus,
"error": serviceErr,
}
// 如果所有检查都通过,返回 200否则返回 503
httpStatus := http.StatusOK
if redisStatus != "ok" || serviceStatus != "ok" {
httpStatus = http.StatusServiceUnavailable
healthStatus["status"] = "degraded"
}
c.JSON(httpStatus, healthStatus)
}

View File

@ -63,6 +63,24 @@ func CheckUserOrder(userID uint64) error {
return nil
}
// 校验用户是否首次购买
func CheckUserFirstOrder(userID uint64) bool {
req := bundle.OrderRecordsDetailRequest{
CustomerID: strconv.FormatUint(userID, 10),
Status: 2,
}
records, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
// 用户没有任何订单记录
if records.OrderRecord == nil {
return true
}
// 检查订单是否属于该用户
if records.OrderRecord.CustomerID != strconv.FormatUint(userID, 10) {
return true
}
return false
}
// 获取最后一次合同编号
func GetLastContractNo() (string, error) {
records, err := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{

View File

@ -277,6 +277,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
var TotalPrice float32
var expirationDay string
numMap := make(map[string]int32)
numMap["1500.00"] = 0
numMap["3150.00"] = 3
numMap["4200.00"] = 5
numMap["5600.00"] = 8
@ -289,6 +290,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
numMap["18300.00"] = 40
numMap["26700.00"] = 60
incrMap := make(map[string]float32)
incrMap["1500.00"] = 0
incrMap["3150.00"] = 1650
incrMap["4200.00"] = 2700
incrMap["5600.00"] = 4100
@ -364,7 +366,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
ValueUid: accountUuid,
CurrencyType: 2, //美元
Amount: 0, //增值服务金额
Num: 3,
Num: 5,
Unit: "个",
Source: 1,
PaymentStatus: 1,
@ -416,6 +418,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
orderReq.OrderNo = unfinishInfo.OrderNo
//expirationTime := t.AddDate(10, 0, 0).Format("2006-01-02 15:04:05")
//orderReq.ExpirationTime = expirationTime
orderReq.PlatformIds = []uint32{1, 4, 5}
_, err = service.BundleProvider.CreateOrderRecord(context.Background(), &orderReq)
if err != nil {
service.Error(c, err)

View File

@ -44,6 +44,7 @@ func MediaUserList(ctx *gin.Context) {
service.Error(ctx, err)
return
}
if req.NeedStats {
var statResp *bundle.ArtistUploadStatsResponse
zap.L().Info("MediaUserList 1")
//取出艺人num
@ -65,7 +66,6 @@ func MediaUserList(ctx *gin.Context) {
service.Error(ctx, err)
return
}
if req.NeedStats {
for _, v := range resp.Data {
for _, vv := range statResp.Items {
if v.ArtistSubNum == vv.SubNum {
@ -325,6 +325,7 @@ func OAuth2Callback(ctx *gin.Context) {
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
return
}
req.State = state
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
if err != nil {
@ -381,6 +382,7 @@ func SyncAsAuth(artistUuid string) error {
InstagramDetails: true,
})
if err != nil {
zap.L().Error("SyncAsAuth error", zap.Error(err))
return errors.New("获取艺人绑定信息错误")
}
authReq := &cast.UpdateOAuthReq{Data: make([]*cast.UpdateOAuthReq_Info, 0)}
@ -407,10 +409,14 @@ func SyncAsAuth(artistUuid string) error {
if platformIDENUM == cast.PlatformIDENUM_UNKNOWN {
continue
}
asID := v.Id
if platformIDENUM == cast.PlatformIDENUM_BULESKY && asID == "" {
asID = v.Username
}
authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{
ArtistUuid: artistUuid,
PlatformID: platformIDENUM,
AsID: v.Id,
AsID: asID,
PlatformUserName: v.Username,
AutInfo: string(asInfoB),
})
@ -606,7 +612,7 @@ func ImportMediaAccount(ctx *gin.Context) {
excelSetRemark(excelData, line, "艺人不存在")
continue
}
var tiktokName, insName, dmName string
var tiktokName, insName, dmName, youtubeName, blueskyName string
if len(row) >= 3 {
tiktokName = strings.TrimSpace(row[2])
}
@ -616,7 +622,13 @@ func ImportMediaAccount(ctx *gin.Context) {
if len(row) >= 5 {
dmName = strings.TrimSpace(row[4])
}
if tiktokName == "" && insName == "" && dmName == "" {
if len(row) >= 6 {
youtubeName = strings.TrimSpace(row[5])
}
if len(row) >= 7 {
blueskyName = strings.TrimSpace(row[6])
}
if tiktokName == "" && insName == "" && dmName == "" && youtubeName == "" && blueskyName == "" {
excelSetRemark(excelData, line, "请填写账号")
continue
}
@ -635,6 +647,17 @@ func ImportMediaAccount(ctx *gin.Context) {
excelSetRemark(excelData, line, fmt.Sprintf("%s:%s", dmName, err.Error()))
}
}
if youtubeName != "" {
if err = updateMediaAccount(youtubeName, cast.PlatformIDENUM_YOUTUBE, subInfoResp, loginInfo); err != nil {
excelSetRemark(excelData, line, fmt.Sprintf("%s:%s", youtubeName, err.Error()))
}
}
if blueskyName != "" {
if err = updateMediaAccount(blueskyName, cast.PlatformIDENUM_BULESKY, subInfoResp, loginInfo); err != nil {
excelSetRemark(excelData, line, fmt.Sprintf("%s:%s", blueskyName, err.Error()))
}
}
_ = CheckAsProfile(subInfoResp)
}
// 保存Excel文件到磁盘
resultPath := fmt.Sprintf("./runtime/media/%s", fileName)
@ -658,14 +681,14 @@ func ImportMediaAccount(ctx *gin.Context) {
// 记录需要删除的行(从后往前删除,避免行号变化)
rowsToDelete := make([]int, 0)
for line := 1; line < len(rows); line++ { // 从第2行开始跳过表头
remarkCell := fmt.Sprintf("F%d", line+1)
remarkCell := fmt.Sprintf("H%d", line+1) // 备注列已移动到H列
remark, _ := excelData.GetCellValue("Sheet1", remarkCell)
if remark == "" {
// F列没有数据,表示成功
// H列没有数据,表示成功
successCount++
rowsToDelete = append(rowsToDelete, line+1)
} else {
// F列有值,表示失败
// H列有值,表示失败
failCount++
}
}
@ -698,11 +721,11 @@ func ImportMediaAccount(ctx *gin.Context) {
func excelSetRemark(excelData *excelize.File, line int, remark string) {
zap.L().Info("设置备注", zap.Int("line", line), zap.String("remark", remark))
oldRemark, _ := excelData.GetCellValue("Sheet1", fmt.Sprintf("%s%d", "F", line+1))
oldRemark, _ := excelData.GetCellValue("Sheet1", fmt.Sprintf("%s%d", "H", line+1))
if oldRemark != "" {
remark = fmt.Sprintf("%s\n%s", oldRemark, remark)
}
excelData.SetCellValue("Sheet1", fmt.Sprintf("%s%d", "F", line+1), remark)
excelData.SetCellValue("Sheet1", fmt.Sprintf("%s%d", "H", line+1), remark)
}
func updateMediaAccount(platformName string, platformId cast.PlatformIDENUM, subInfoResp *accountFiee.UserInfoResponse, loginInfo login.Info) error {

View File

@ -26,3 +26,21 @@ func TaskList(ctx *gin.Context) {
}
service.Success(ctx, resp)
}
func DeleteTasK(ctx *gin.Context) {
var req *cast.DeleteTaskListReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
//loginInfo := login.GetUserInfoFromC(ctx)
//req.OperatorID = fmt.Sprint(loginInfo.ID)
resp, err := service.CastProvider.DeleteTaskList(context.Background(), req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}

View File

@ -71,10 +71,10 @@ func Test(ctx *gin.Context) {
}
if action == "" {
profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
ProfileKey: profileKey,
InstagramDetails: true,
resp, err := service.CastProvider.WorkList(context.Background(), &cast.WorkListReq{
Page: 1,
PageSize: 1000,
SubmitTimeMonths: []string{"2026-01", "2025-12"},
})
if err != nil {
service.Error(ctx, err)
@ -156,6 +156,15 @@ func Test(ctx *gin.Context) {
}
service.Success(ctx, "ok")
}
if action == "SyncAsAuth" {
artistUuid := ctx.PostForm("artistUuid")
err := SyncAsAuth(artistUuid)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, "ok")
}
service.Success(ctx, "unknow")
return

View File

@ -48,21 +48,16 @@ import (
"go.uber.org/zap"
)
func UpdateWorkImage(ctx *gin.Context) {
var req *cast.UpdateWorkImageReq
// UpdateWorkImageCore 更新作品图片的核心逻辑,可以被其他函数复用
func UpdateWorkImageCore(ctx *gin.Context, req *cast.UpdateWorkImageReq) (*cast.UpdateWorkImageResp, error) {
var infoResp *accountFiee.UserInfoResponse
var err error
var ok bool
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
loginInfo := login.GetUserInfoFromC(ctx)
lockKey := fmt.Sprintf("lock_update_work_image_%d", loginInfo.ID)
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), time.Second*5)
if !reply.Val() {
service.Error(ctx, errors.New("请勿重复提交"))
return
return nil, errors.New("请勿重复提交")
}
defer func() {
cache.RedisClient.Del(lockKey)
@ -72,37 +67,30 @@ func UpdateWorkImage(ctx *gin.Context) {
/*for _, v := range req.Images {
ok, err = check.SecurityFile(v)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("图片鉴定未通过"))
return
return nil, errors.New("图片鉴定未通过")
}
}
ok, err = check.SecurityText(req.Title)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("标题鉴定未通过"))
return
return nil, errors.New("标题鉴定未通过")
}
ok, err = check.SecurityText(req.Content)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("内容鉴定未通过"))
return
return nil, errors.New("内容鉴定未通过")
}*/
if req.From != "ai" {
for _, v := range req.Images {
if filepath.Ext(v) != ".jpg" && filepath.Ext(v) != ".jpeg" {
service.Error(ctx, errors.New("图片格式只支持jpg"))
return
return nil, errors.New("图片格式只支持jpg")
}
}
}
@ -112,8 +100,7 @@ func UpdateWorkImage(ctx *gin.Context) {
for _, v := range images {
imageUrl, err = checkAndReuploadImage(v, "image")
if err != nil {
service.Error(ctx, errors.New("图片转换错误"))
return
return nil, errors.New("图片转换错误")
}
req.Images = append(req.Images, imageUrl)
}
@ -124,8 +111,7 @@ func UpdateWorkImage(ctx *gin.Context) {
})
zap.L().Info("UpdateWorkImage infoResp", zap.Any("infoResp", infoResp))
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
req.ArtistName = infoResp.Name
@ -134,13 +120,26 @@ func UpdateWorkImage(ctx *gin.Context) {
req.ArtistSubNum = infoResp.SubNum
//artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
// service.Error(ctx, err)
// return
// return nil, err
//}
newCtx := NewCtxWithUserInfo(ctx)
req.Source = 1
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
zap.L().Info("UpdateWorkImage resp", zap.Any("resp", resp))
if err != nil {
return nil, err
}
return resp, nil
}
func UpdateWorkImage(ctx *gin.Context) {
var req *cast.UpdateWorkImageReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := UpdateWorkImageCore(ctx, req)
if err != nil {
service.Error(ctx, err)
return
@ -171,27 +170,21 @@ func UpdateWorkImage(ctx *gin.Context) {
return
}
func UpdateWorkVideo(ctx *gin.Context) {
var req *cast.UpdateWorkVideoReq
// UpdateWorkVideoCore 更新作品视频的核心逻辑,可以被其他函数复用
func UpdateWorkVideoCore(ctx *gin.Context, req *cast.UpdateWorkVideoReq) (*cast.UpdateWorkVideoResp, error) {
var infoResp *accountFiee.UserInfoResponse
var err error
var ok bool
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
if req.CoverUrl != "" {
if filepath.Ext(req.CoverUrl) != ".jpg" && filepath.Ext(req.CoverUrl) != ".jpeg" {
service.Error(ctx, errors.New("图片格式只支持jpg"))
return
return nil, errors.New("图片格式只支持jpg")
}
}
loginInfo := login.GetUserInfoFromC(ctx)
lockKey := fmt.Sprintf("lock_update_work_video_%d", loginInfo.ID)
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), time.Second*5)
if !reply.Val() {
service.Error(ctx, errors.New("请勿重复提交"))
return
return nil, errors.New("请勿重复提交")
}
defer func() {
cache.RedisClient.Del(lockKey)
@ -199,44 +192,36 @@ func UpdateWorkVideo(ctx *gin.Context) {
fmt.Println(ok)
/* ok, err = check.SecurityText(req.Title)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("标题鉴定未通过"))
return
return nil, errors.New("标题鉴定未通过")
}
ok, err = check.SecurityText(req.Content)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("内容鉴定未通过"))
return
return nil, errors.New("内容鉴定未通过")
}
ok, err = check.SecurityFile(req.CoverUrl)
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
if !ok {
service.Error(ctx, errors.New("图片鉴定未通过"))
return
return nil, errors.New("图片鉴定未通过")
}*/
if req.VideoUrl != "" {
if req.VideoUrl != "" && false {
//请求接口判断
fileResp, errs := service.FilesProvider.GetFileSecurityStatus(ctx, &files.GetFileSecurityStatusReq{
Url: req.VideoUrl,
FileName: "",
})
if errs != nil {
service.Error(ctx, err)
return
return nil, errs
}
if fileResp.SecurityStatus == "high" {
service.Error(ctx, errors.New("视频鉴定未通过"))
return
return nil, errors.New("视频鉴定未通过")
}
}
if config.AppConfig.System.AppMode != "dev" {
@ -247,8 +232,7 @@ func UpdateWorkVideo(ctx *gin.Context) {
})
zap.L().Info("UpdateWorkVideo", zap.Any("infoResp", infoResp))
if err != nil {
service.Error(ctx, err)
return
return nil, err
}
} else {
infoResp = &accountFiee.UserInfoResponse{
@ -259,8 +243,7 @@ func UpdateWorkVideo(ctx *gin.Context) {
}
//artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
//if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil {
// service.Error(ctx, err)
// return
// return nil, err
//}
req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum
@ -270,6 +253,20 @@ func UpdateWorkVideo(ctx *gin.Context) {
req.Source = 1
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
zap.L().Info("UpdateWorkVideo", zap.Any("resp", resp))
if err != nil {
return nil, err
}
return resp, nil
}
func UpdateWorkVideo(ctx *gin.Context) {
var req *cast.UpdateWorkVideoReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := UpdateWorkVideoCore(ctx, req)
if err != nil {
service.Error(ctx, err)
return
@ -629,6 +626,29 @@ func PostAS(workUuid string) error {
ThumbNail: "",
Visibility: "",
}
case cast.PlatformIDENUM_YOUTUBE:
// YouTube 发布选项配置
postReq.YouTubeOptions = &aryshare.YouTubeOptions{
Title: workDetail.Title,
Visibility: "public", // 可见性设置public/unlisted/private
Tags: nil,
// CategoryId: 0, // YouTube 分类 ID例如24 = Entertainment
MadeForKids: false,
ThumbNail: coverUrl,
PlaylistId: "",
NotifySubscribers: true,
Shorts: false,
ContainsSyntheticMedia: false,
PublishAt: "",
SubTitleUrl: "",
SubTitleLanguage: "",
SubTitleName: "",
}
case cast.PlatformIDENUM_BULESKY: // BLUESKY
// Bluesky 发布选项配置
postReq.BlueskyOptions = &aryshare.BlueskyOptions{
AltText: nil, // 图片或视频的替代文本数组(用于屏幕阅读器的无障碍功能)
}
}
zap.L().Info("post 6", zap.Any("workUuid", workUuid), zap.Any("platformID", platformID))
zap.L().Info("Publish Ayrshare PostReq", zap.Any("workUuid", workDetail.WorkUuid), zap.Any("postReq", postReq), zap.Any("workDetail", workDetail))
@ -710,6 +730,10 @@ func PostAS(workUuid string) error {
pid = 1
case "instagram":
pid = 3
case "youtube":
pid = 2
case "bluesky":
pid = 5
}
publishStatus := cast.PublishStatusENUM_PublishMediaStatus_NO
if postInfo.Status == "success" {
@ -1290,8 +1314,8 @@ func ImportWorkBatch(ctx *gin.Context) {
temp.ArtistPhone = subInfoResp.TelNum
temp.ArtistPhoneAreaCode = subInfoResp.TelAreaCode
}
if len(row) > 5 {
temp.Title = utils.CleanString(row[5])
if len(row) > 7 {
temp.Title = utils.CleanString(row[7])
ok, _err := check.SecurityText(temp.Title)
if _err != nil {
temp.Remark = _err.Error()
@ -1304,8 +1328,8 @@ func ImportWorkBatch(ctx *gin.Context) {
break
}
}
if len(row) > 6 {
temp.Content = utils.CleanString(row[6])
if len(row) > 8 {
temp.Content = utils.CleanString(row[8])
if temp.Content != "" {
ok, _err := check.SecurityText(temp.Content)
if _err != nil {
@ -1320,8 +1344,7 @@ func ImportWorkBatch(ctx *gin.Context) {
}
}
}
// 图片
for i := 8; i <= 18; i++ {
for i := 10; i <= 20; i++ {
if len(row) > i {
if utils.CleanString(row[i]) != "" {
ok, _err := check.SecurityFile(row[i])
@ -1331,7 +1354,7 @@ func ImportWorkBatch(ctx *gin.Context) {
break
}
if !ok {
temp.Remark = fmt.Sprintf("图片%d黄反审核未通过", i-7)
temp.Remark = fmt.Sprintf("图片%d黄反审核未通过", i-9)
req.ImageWorks = append(req.ImageWorks, temp)
break
}
@ -1422,6 +1445,60 @@ func ImportWorkBatch(ctx *gin.Context) {
temp.MediaAccountNames = append(temp.MediaAccountNames, utils.CleanString(row[4]))
temp.MediaAccountUuids = append(temp.MediaAccountUuids, mediaInfoResp.Info.MediaAccountUuid)*/
}
// YouTube账号第F列row[5]
if len(row) > 5 && utils.CleanString(row[5]) != "" {
temp.Remark = fmt.Sprintf("Youtube不能发图文")
zap.L().Error("CastProvider.MediaInfo", zap.Error(err))
req.ImageWorks = append(req.ImageWorks, temp)
continue
// mediaInfoResp, err = service.CastProvider.MediaInfo(context.Background(), &cast.MediaInfoReq{
// ArtistUuid: temp.ArtistUuid,
// PlatformID: cast.PlatformIDENUM_YOUTUBE,
// PlatformUserName: utils.CleanString(row[5]),
// })
// if err != nil || mediaInfoResp.Info.MediaAccountUuid == "" {
// temp.Remark = fmt.Sprintf("YouTube账号名不存在")
// zap.L().Error("CastProvider.MediaInfo", zap.Error(err))
// req.ImageWorks = append(req.ImageWorks, temp)
// continue
// }
// temp.PublishConfig1 = &cast.PublishConfig{
// ForbidComment: 1,
// PublicType: 1,
// CanJoin: 1,
// CanQuote: 1,
// CanComment: 1,
// IsAI: 1,
// }
// temp.PlatformIDs = append(temp.PlatformIDs, cast.PlatformIDENUM_YOUTUBE)
// temp.MediaAccountNames = append(temp.MediaAccountNames, utils.CleanString(row[5]))
// temp.MediaAccountUuids = append(temp.MediaAccountUuids, mediaInfoResp.Info.MediaAccountUuid)
}
// Bluesky账号第G列row[6]
if len(row) > 6 && utils.CleanString(row[6]) != "" {
mediaInfoResp, err = service.CastProvider.MediaInfo(context.Background(), &cast.MediaInfoReq{
ArtistUuid: temp.ArtistUuid,
PlatformID: cast.PlatformIDENUM_BULESKY,
PlatformUserName: utils.CleanString(row[6]),
})
if err != nil || mediaInfoResp.Info.MediaAccountUuid == "" {
temp.Remark = fmt.Sprintf("Bluesky账号名不存在")
zap.L().Error("CastProvider.MediaInfo", zap.Error(err))
req.ImageWorks = append(req.ImageWorks, temp)
continue
}
temp.PublishConfig1 = &cast.PublishConfig{
ForbidComment: 1,
PublicType: 1,
CanJoin: 1,
CanQuote: 1,
CanComment: 1,
IsAI: 1,
}
temp.PlatformIDs = append(temp.PlatformIDs, cast.PlatformIDENUM_BULESKY)
temp.MediaAccountNames = append(temp.MediaAccountNames, utils.CleanString(row[6]))
temp.MediaAccountUuids = append(temp.MediaAccountUuids, mediaInfoResp.Info.MediaAccountUuid)
}
if artistNum == "" {
temp.Remark = "艺人编号不能为空"
req.ImageWorks = append(req.ImageWorks, temp)
@ -1452,6 +1529,12 @@ func ImportWorkBatch(ctx *gin.Context) {
req.ImageWorks = append(req.ImageWorks, temp)
continue
}
// 判断图片数量是否超过4
if len(temp.Images) > 4 {
temp.Remark = "Bluesky 图片数量不能超过4"
req.ImageWorks = append(req.ImageWorks, temp)
continue
}
req.ImageWorks = append(req.ImageWorks, temp)
}
if len(req.ImageWorks) == 0 {
@ -1470,7 +1553,7 @@ func ImportWorkBatch(ctx *gin.Context) {
for _, v := range resp.ImageWorks {
if !v.Success {
rowNum := int(v.LineNo) + 1
excelData.SetCellValue("Sheet1", fmt.Sprintf("H%d", rowNum), v.Remark)
excelData.SetCellValue("Sheet1", fmt.Sprintf("J%d", rowNum), v.Remark)
hasValueRows[rowNum] = true
}
}

View File

@ -56,6 +56,7 @@ func ImageCheckByte(file *multipart.FileHeader) (bool, error) {
}
func SecurityFile(textVal string) (bool, error) {
return true, nil
if textVal == "" {
return true, nil
}
@ -79,6 +80,7 @@ func SecurityFile(textVal string) (bool, error) {
return true, nil
}
func SecurityText(textVal string) (bool, error) {
return true, nil
aliConfig, err := pkgSecurity.GetGlobalConfig("./data/alibabacloud.env")
if err != nil {
return false, err

View File

@ -4,13 +4,19 @@ import (
"context"
"errors"
"fmt"
account "fonchain-fiee/api/accountFiee"
"fonchain-fiee/api/cron"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"log"
"os"
"path/filepath"
"strings"
"time"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/xuri/excelize/v2"
"google.golang.org/protobuf/types/known/emptypb"
)
@ -112,6 +118,17 @@ func ExportExcelExecutionResult(c *gin.Context) {
service.Error(c, errors.New("网络超时,请重试"))
return
}
userListRes, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
Domain: "app",
})
if err != nil {
service.Error(c, errors.New("用户查询失败"))
return
}
idFindSubName := make(map[uint64]string)
for _, v := range userListRes.UserList {
idFindSubName[v.Id] = v.SubNum
}
titleList := []string{
"任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因",
@ -120,7 +137,7 @@ func ExportExcelExecutionResult(c *gin.Context) {
for _, task := range res.Data {
data := []interface{}{
task.TaskTitle,
task.ArtistId,
idFindSubName[uint64(task.ArtistId)],
task.ArtistName,
task.ContentTypeDescription,
task.WorkTitle,
@ -205,3 +222,160 @@ func GetScheduleTaskStatus(c *gin.Context) {
}
service.Success(c, res)
}
func GetImportData(c *gin.Context) {
defer func() {
if r := recover(); r != nil {
service.Error(c, errors.New("操作失败"))
}
}()
// 导入excel
excelFile, err := c.FormFile("excel")
if err != nil {
service.Error(c, errors.New("缺少excel文件"))
return
}
// 创建临时文件
tempDir := "tmp"
if err = os.MkdirAll(tempDir, 0755); err != nil {
service.Error(c, errors.New("创建临时目录失败"))
return
}
defer os.RemoveAll(tempDir)
// 保存excel
excelPath := filepath.Join(tempDir, "excel.xlsx")
if err = c.SaveUploadedFile(excelFile, excelPath); err != nil {
service.Error(c, errors.New("保存excel文件失败"))
return
}
// 读取excel
readExcelResult, err := readExcel(excelPath)
if err != nil {
service.Error(c, fmt.Errorf("读取excel失败: %v", err))
return
}
if len(readExcelResult) == 0 {
service.Error(c, errors.New("请检查excel文件"))
return
}
//去重操作
set := make(map[string]struct{})
var uniqueExcelData []excelData
for _, data := range readExcelResult {
if _, exists := set[data.SubName]; !exists {
set[data.SubName] = struct{}{}
uniqueExcelData = append(uniqueExcelData, data)
}
}
res, err := service.AccountFieeProvider.UserList(context.Background(), &account.UserListRequest{
Domain: "app",
})
if err != nil {
service.Error(c, errors.New("用户查询失败"))
return
}
//检查subname是否正确是否存在
subNames := make(map[string]struct{}, len(res.UserList))
for _, v := range res.UserList {
subNames[v.SubNum] = struct{}{}
}
for _, v := range uniqueExcelData {
if _, ok := subNames[v.SubName]; !ok {
service.Error(c, errors.New(fmt.Sprintf("第 %d 行数据错误,请检查数据!", v.Line)))
return
}
}
//检查subname和name是否匹配
subNameFindExcelData := make(map[string]excelData, len(uniqueExcelData))
for _, v := range uniqueExcelData {
subNameFindExcelData[v.SubName] = v
}
subNameFindID := make(map[string]uint64, len(uniqueExcelData))
result := make([]excelDataResult, 0, len(uniqueExcelData))
for _, v := range res.UserList {
subNameFindID[v.SubNum] = v.Id
if subNameFindExcelData[v.SubNum].Name != v.Name && subNameFindExcelData[v.SubNum].Name != "" {
fmt.Println(subNameFindExcelData[v.SubNum], v.Name)
service.Error(c, errors.New(fmt.Sprintf("第 %d 行数据错误,请检查数据!", subNameFindExcelData[v.SubNum].Line)))
return
}
}
for _, v := range uniqueExcelData {
result = append(result, excelDataResult{
Id: subNameFindID[v.SubName],
Name: v.Name,
})
}
service.Success(c, result)
return
}
type excelData struct {
Line uint `json:"line"`
SubName string `json:"subName"`
Name string `json:"name"`
}
type excelDataResult struct {
Id uint64 `json:"id"`
Name string `json:"name"`
}
func readExcel(excelPath string) ([]excelData, error) {
//打开excel
f, err := excelize.OpenFile(excelPath)
if err != nil {
return nil, err
}
defer f.Close()
//读取第一页
sheetName := f.GetSheetName(0)
if sheetName == "" {
return nil, errors.New("excel文件中没有工作表")
}
//读取数据
rows, err := f.GetRows(sheetName)
if err != nil {
return nil, fmt.Errorf("读取工作表失败: %v", err)
}
if len(rows) <= 1 {
return nil, errors.New("excel文件没有数据行只有表头或为空")
}
var result []excelData
for i := 1; i < len(rows); i++ { // 从第2行开始跳过表头
row := rows[i]
if len(row) == 0 {
continue
}
subName := getCellValue(f, sheetName, i, 0)
name := getCellValue(f, sheetName, i, 1)
data := excelData{
Line: uint(i + 1),
SubName: subName,
Name: name,
}
result = append(result, data)
}
return result, nil
}
func getCellValue(f *excelize.File, sheetName string, rowIndex, colIndex int) string {
colName, _ := excelize.ColumnNumberToName(colIndex + 1)
cell := fmt.Sprintf("%s%d", colName, rowIndex+1)
value, err := f.GetCellValue(sheetName, cell)
if err != nil {
log.Printf("读取单元格 %s 失败: %v", cell, err)
return ""
}
return strings.TrimSpace(value)
}

View File

@ -4,6 +4,7 @@ import (
"bytes"
"context"
"errors"
"fmt"
"fonchain-fiee/api/files"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
@ -102,6 +103,15 @@ func Create(ctx *gin.Context) {
}
func Delete(ctx *gin.Context) {
path := ctx.DefaultQuery("path", "/")
nowYear := time.Now().Year()
nowMonth := time.Now().Month()
nowYearPath := fmt.Sprintf("/fiee/video/%d", nowYear)
nowMonthPath := fmt.Sprintf("/fiee/video/%d/%d-%d", nowYear, nowYear, nowMonth)
if path == nowYearPath || path == nowMonthPath || path == "/fiee" || path == "/fiee/video" || path == "/fiee/video/old" {
service.Error(ctx, errors.New("无法删除该目录"))
return
}
resp, err := service.FilesProvider.Delete(ctx, &files.DeleteReq{
Path: ctx.DefaultQuery("path", "/"),
UserSpacePath: getUserSpacePath(ctx),

View File

@ -30,6 +30,8 @@ type excelData struct {
SubNum string //用户编号 必须字段
TikTok string
Instagram string
YouTube string
BlueSky string
Youtube string
Desc string //艺人简介
TitleRequire string //标题要求 必须字段
@ -178,27 +180,30 @@ func readExcel(excelPath string) ([]excelData, error) {
if subNum == "" {
return nil, fmt.Errorf("第%d行应该有编号", i+1)
}
tikTok := getCellValue(f, sheetName, i, 2)
blueSky := getCellValue(f, sheetName, i, 2)
if blueSky == "" {
return nil, fmt.Errorf("第%d行应该有bluesky账号昵称", i+1)
}
tikTok := getCellValue(f, sheetName, i, 3)
if tikTok == "" {
return nil, fmt.Errorf("第%d行应该有tiktok账号昵称", i+1)
}
instagram := getCellValue(f, sheetName, i, 3)
if instagram == "" {
return nil, fmt.Errorf("第%d行应该有ins账号昵称", i+1)
}
desc := getCellValue(f, sheetName, i, 4)
titleRequire := getCellValue(f, sheetName, i, 5)
instagram := getCellValue(f, sheetName, i, 4)
desc := getCellValue(f, sheetName, i, 5)
titleRequire := getCellValue(f, sheetName, i, 6)
if titleRequire == "" {
return nil, fmt.Errorf("第%d行应该有标题要求", i+1)
}
contentRequire := getCellValue(f, sheetName, i, 6)
contentRequire := getCellValue(f, sheetName, i, 7)
if contentRequire == "" {
return nil, fmt.Errorf("第%d行应该有内容要求", i+1)
}
photoRequire := getCellValue(f, sheetName, i, 7)
photoUrl := getCellValue(f, sheetName, i, 8)
photoNumStr := getCellValue(f, sheetName, i, 9)
photoDpi := getCellValue(f, sheetName, i, 10)
photoRequire := getCellValue(f, sheetName, i, 8)
photoUrl := getCellValue(f, sheetName, i, 9)
photoNumStr := getCellValue(f, sheetName, i, 10)
photoDpi := getCellValue(f, sheetName, i, 11)
var num int
if photoUrl == "" { //如果没有关联画作,数量必须有,需求必须有
//需求必须有
@ -220,6 +225,7 @@ func readExcel(excelPath string) ([]excelData, error) {
data := excelData{
ArtistName: artistName,
SubNum: subNum,
BlueSky: blueSky,
TikTok: tikTok,
Instagram: instagram,
Desc: desc,

View File

@ -293,6 +293,7 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
if !tiktokFound {
return fmt.Errorf("未找到匹配的TikTok账号: %s", req.TikTok)
}
// 获取 Instagram 自媒体账号
accountListIns, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
ArtistVal: req.ArtistName,
@ -307,7 +308,6 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
if accountListIns == nil || len(accountListIns.Data) == 0 {
return fmt.Errorf("ins自媒体账号数量为0")
}
// 查找 Instagram 账号
insFound := false
for _, user := range accountListIns.Data {
@ -322,6 +322,34 @@ func (p *BatchProcessor) submitTask(req *excelData) error {
return fmt.Errorf("未找到匹配的Instagram账号: %s", req.Instagram)
}
// 获取 Bluesky 自媒体账号
accountListBlueSky, err := service.CastProvider.MediaUserList(context.Background(), &apiCast.MediaUserListReq{
ArtistVal: req.ArtistName,
PlatformID: 5, // Bluesky platform ID
Page: 1,
PageSize: 10,
ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
})
if err != nil {
return fmt.Errorf("获取 Bluesky 账号失败: %s", err.Error())
}
if accountListBlueSky == nil || len(accountListBlueSky.Data) == 0 {
return fmt.Errorf("bluesky自媒体账号数量为0")
}
// 查找 Bluesky 账号
blueSkyFound := false
for _, user := range accountListBlueSky.Data {
if user.PlatformUserName == req.BlueSky {
req.MediaAccountNames = append(req.MediaAccountNames, user.PlatformUserName)
req.MediaAccountUuids = append(req.MediaAccountUuids, user.MediaAccountUuid)
blueSkyFound = true
break
}
}
if !blueSkyFound {
return fmt.Errorf("未找到匹配的Bluesky账号: %s", req.BlueSky)
}
switch {
case req.PhotoUrl == "": // 如果没有提供照片 URL生成标题和内容
// 生成标题和内容

View File

@ -376,6 +376,11 @@ func UpdateWorkImageWithTaskUUID(ctx *gin.Context) {
service.Error(ctx, errors.New("任务已中止,不能上传图文"))
return
}
resp, err := castService.UpdateWorkImageCore(ctx, req.UpdateWorkImageReq)
if err != nil {
service.Error(ctx, err)
return
}
if config.AppConfig.System.AppMode != "dev" {
artistId, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
@ -393,21 +398,6 @@ func UpdateWorkImageWithTaskUUID(ctx *gin.Context) {
TelAreaCode: "86",
}
}
req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
// artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
// if _, err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
// service.Error(ctx, err)
// return
// }
newCtx := castService.NewCtxWithUserInfo(ctx)
req.Source = 1
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req.UpdateWorkImageReq)
if err != nil {
service.Error(ctx, err)
return
}
// EmployeeName 和 EmployeeNum 从 toekn 里面拿
userInfo := login.GetUserInfoFromC(ctx)
// 调用员工实际任务状态更新
@ -474,6 +464,11 @@ func UpdateWorkVideoWithUUID(ctx *gin.Context) {
service.Error(ctx, errors.New("任务已中止,不能上传视频"))
return
}
resp, err := castService.UpdateWorkVideoCore(ctx, req.UpdateWorkVideoReq)
if err != nil {
service.Error(ctx, err)
return
}
if config.AppConfig.System.AppMode != "dev" {
artistId, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
@ -491,21 +486,6 @@ func UpdateWorkVideoWithUUID(ctx *gin.Context) {
TelAreaCode: "86",
}
}
// artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
// if _, err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil {
// service.Error(ctx, err)
// return
// }
req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
newCtx := castService.NewCtxWithUserInfo(ctx)
req.Source = 1
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req.UpdateWorkVideoReq)
if err != nil {
service.Error(ctx, err)
return
}
// EmployeeName 和 EmployeeNum 从 toekn 里面拿
userInfo := login.GetUserInfoFromC(ctx)
// 调用员工实际任务状态更新