Compare commits

..

1 Commits

Author SHA1 Message Date
jiaji.H
70f692a308 Updata:增加余量不足数据推送 2026-01-08 15:40:24 +08:00
125 changed files with 11723 additions and 74569 deletions

View File

@ -4,7 +4,7 @@
13111111112 测试-陆嘉骅2 视频 17315042007 测试-陆嘉骅2 视频
13196788678 Aa.123456 脚本 13196788678 Aa.123456 脚本

File diff suppressed because it is too large Load Diff

View File

@ -66,9 +66,6 @@ service AccountFiee {
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // -- rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}//
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // -- rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} // --
rpc GetInviterInfo(InviterInfoRequest) returns(InviterInfoResponse) {} //
rpc GetInviterList(InviterListRequest) returns(InviterListResponse) {} //
rpc WriteOff (WriteOffRequest) returns (RemoveResponse) {} //
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// , rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// ,
@ -104,21 +101,7 @@ service AccountFiee {
rpc GetChatAutoReplyRulerDetail ( GetChatAutoReplyRulerByIdRequest )returns( ChatAutoReplyRulerData ){} // rpc GetChatAutoReplyRulerDetail ( GetChatAutoReplyRulerByIdRequest )returns( ChatAutoReplyRulerData ){} //
rpc GetChatAutoReplyRulerList ( GetChatAutoReplyRulerListRequest )returns( GetChatAutoReplyRulerListResp ){} // 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 { message VerifySliderStatusRequest {
string nonceStr = 1; string nonceStr = 1;
} }
@ -200,11 +183,6 @@ message UserListInfo{
string idNumber = 21; string idNumber = 21;
string dateOfBirth = 22; string dateOfBirth = 22;
string age = 23; string age = 23;
string email = 24;
string AbroadTelAreaCode = 25;
string AbroadTel = 26;
string inviterName = 27;
string inviterCode = 28;
} }
message UserListRequest{ message UserListRequest{
string domain = 1; string domain = 1;
@ -243,11 +221,6 @@ message UserInfoResponse{
string telAreaCode = 19; string telAreaCode = 19;
string idNumber = 20; string idNumber = 20;
string dateOfBirth = 21; string dateOfBirth = 21;
string email = 22;
string AbroadTelAreaCode = 23;
string AbroadTel = 24;
uint64 inviterId = 25;
} }
message RealNameResponse{ message RealNameResponse{
uint64 id = 1; uint64 id = 1;
@ -527,6 +500,20 @@ message RemoveRequest {
} }
message WriteOffRequest{ message WriteOffRequest{
uint64 id = 1; uint64 id = 1;
string domain = 2;
uint64 userId = 3;
string tel = 4;
string jonNum = 5;
string userName = 6;
string enterDate = 7;
string positionName =8;
uint64 positionId = 9;
string siteName = 10;
uint64 siteId =11;
string authUrl =12;
string type =13;
uint32 status =14;
string submitDate=15;
} }
message WriteOffListRequest{ message WriteOffListRequest{
uint64 page = 1; uint64 page = 1;
@ -554,9 +541,6 @@ message UpdateRequest {
string Domain = 2 [json_name = "domain"]; string Domain = 2 [json_name = "domain"];
string Language = 3 [json_name = "language"]; string Language = 3 [json_name = "language"];
string NickName = 4 [json_name = "nickName"]; 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 { message Operator {
@ -648,8 +632,6 @@ message RegistRequest {
string telAreaCode = 5; string telAreaCode = 5;
string language = 6; string language = 6;
string nickName = 7; string nickName = 7;
uint64 inviterID = 8;
string inviterCode = 9;
} }
message LoginRequest { message LoginRequest {
@ -727,7 +709,6 @@ message AccountInfo {
string updatedAt = 41; string updatedAt = 41;
string SecurityCode = 42 [json_name = "securityCode"]; string SecurityCode = 42 [json_name = "securityCode"];
string BlockAddr = 43 [json_name = "blockAddr"]; string BlockAddr = 43 [json_name = "blockAddr"];
bool WriteOff = 44 [json_name = "writeOff"];
} }
message UserInfoV2 { message UserInfoV2 {

View File

@ -17,25 +17,6 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf 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 { func (this *VerifySliderStatusRequest) Validate() error {
return nil return nil
} }

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -6,10 +6,11 @@ package aryshare
import ( import (
fmt "fmt" fmt "fmt"
math "math" math "math"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators" _ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
) )
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -33,12 +34,6 @@ func (this *InstagramOptions) Validate() error {
func (this *TikTokOptions) Validate() error { func (this *TikTokOptions) Validate() error {
return nil return nil
} }
func (this *YouTubeOptions) Validate() error {
return nil
}
func (this *BlueskyOptions) Validate() error {
return nil
}
func (this *PostRequest) Validate() error { func (this *PostRequest) Validate() error {
if this.Post == "" { if this.Post == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Post", fmt.Errorf(`post内容不能为空`)) return github_com_mwitkow_go_proto_validators.FieldError("Post", fmt.Errorf(`post内容不能为空`))
@ -46,11 +41,6 @@ func (this *PostRequest) Validate() error {
if len(this.Platforms) < 1 { if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`)) return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
} }
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
if this.InstagramOptions != nil { if this.InstagramOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.InstagramOptions); err != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.InstagramOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("InstagramOptions", err) return github_com_mwitkow_go_proto_validators.FieldError("InstagramOptions", err)
@ -61,16 +51,6 @@ func (this *PostRequest) Validate() error {
return github_com_mwitkow_go_proto_validators.FieldError("TikTokOptions", err) return github_com_mwitkow_go_proto_validators.FieldError("TikTokOptions", err)
} }
} }
if this.YouTubeOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.YouTubeOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("YouTubeOptions", err)
}
}
if this.BlueskyOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.BlueskyOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("BlueskyOptions", err)
}
}
return nil return nil
} }
func (this *PostId) Validate() error { func (this *PostId) Validate() error {
@ -193,6 +173,12 @@ func (this *Email) Validate() error {
return nil return nil
} }
func (this *GenerateJWTRequest) Validate() error { func (this *GenerateJWTRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`domain不能为空`))
}
if this.PrivateKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("PrivateKey", fmt.Errorf(`privateKey不能为空`))
}
if this.ProfileKey == "" { if this.ProfileKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("ProfileKey", fmt.Errorf(`profileKey不能为空`)) return github_com_mwitkow_go_proto_validators.FieldError("ProfileKey", fmt.Errorf(`profileKey不能为空`))
} }
@ -206,711 +192,3 @@ func (this *GenerateJWTRequest) Validate() error {
func (this *GenerateJWTResponse) Validate() error { func (this *GenerateJWTResponse) Validate() error {
return nil return nil
} }
func (this *HistoryPostId) Validate() error {
return nil
}
func (this *HistoryItem) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
if this.ScheduleDate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ScheduleDate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ScheduleDate", err)
}
}
return nil
}
func (this *GetHistoryRequest) Validate() error {
return nil
}
func (this *GetHistoryResponse) Validate() error {
for _, item := range this.History {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("History", err)
}
}
}
return nil
}
func (this *GetHistoryByIdRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`帖子ID不能为空`))
}
return nil
}
func (this *GetHistoryByIdResponse) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
if this.ScheduleDate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ScheduleDate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ScheduleDate", err)
}
}
return nil
}
func (this *PlatformPost) Validate() error {
return nil
}
func (this *GetHistoryByPlatformRequest) Validate() error {
if this.Platform == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platform", fmt.Errorf(`平台名称不能为空`))
}
return nil
}
func (this *GetHistoryByPlatformResponse) Validate() error {
for _, item := range this.Posts {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Posts", err)
}
}
}
return nil
}
func (this *SendMessageRequest) Validate() error {
if this.Platform == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platform", fmt.Errorf(`平台不能为空`))
}
if this.RecipientId == "" {
return github_com_mwitkow_go_proto_validators.FieldError("RecipientId", fmt.Errorf(`接收者ID不能为空`))
}
return nil
}
func (this *MessageItem) Validate() error {
return nil
}
func (this *SendMessageResponse) Validate() error {
for _, item := range this.Messages {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Messages", err)
}
}
}
return nil
}
func (this *GetMessagesRequest) Validate() error {
if this.Platform == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platform", fmt.Errorf(`平台不能为空`))
}
return nil
}
func (this *MessageAttachment) Validate() error {
return nil
}
func (this *MessageSenderDetails) Validate() error {
return nil
}
func (this *MessageRecipientDetails) Validate() error {
return nil
}
func (this *MessageReaction) Validate() error {
return nil
}
func (this *GetMessagesItem) Validate() error {
if this.SenderDetails != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.SenderDetails); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SenderDetails", err)
}
}
if this.RecipientDetails != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.RecipientDetails); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("RecipientDetails", err)
}
}
for _, item := range this.Attachments {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
}
}
}
for _, item := range this.Reactions {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Reactions", err)
}
}
}
return nil
}
func (this *ConversationParticipant) Validate() error {
return nil
}
func (this *ConversationDetail) Validate() error {
if this.Participant != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Participant); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Participant", err)
}
}
return nil
}
func (this *GetMessagesResponse) Validate() error {
for _, item := range this.Messages {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Messages", err)
}
}
}
for _, item := range this.ConversationsDetails {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ConversationsDetails", err)
}
}
}
return nil
}
func (this *PostCommentRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`id不能为空`))
}
if this.Comment == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Comment", fmt.Errorf(`comment不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
return nil
}
func (this *InstagramCommentResponse) Validate() error {
return nil
}
func (this *TikTokCommentResponse) Validate() error {
return nil
}
func (this *BlueskyCommentResponse) Validate() error {
return nil
}
func (this *FacebookCommentResponse) Validate() error {
return nil
}
func (this *LinkedInCommentResponse) Validate() error {
return nil
}
func (this *TwitterCommentResponse) Validate() error {
return nil
}
func (this *YouTubeCommentResponse) Validate() error {
return nil
}
func (this *PlatformError) Validate() error {
return nil
}
func (this *PostCommentResponse) Validate() error {
if this.Instagram != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Instagram); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Instagram", err)
}
}
if this.Tiktok != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Tiktok); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Tiktok", err)
}
}
for _, item := range this.Errors {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Errors", err)
}
}
}
if this.Bluesky != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bluesky); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Bluesky", err)
}
}
if this.Facebook != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Facebook); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Facebook", err)
}
}
if this.Linkedin != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Linkedin); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Linkedin", err)
}
}
if this.Twitter != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Twitter); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Twitter", err)
}
}
if this.Youtube != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Youtube); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Youtube", err)
}
}
return nil
}
func (this *GetCommentRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`id不能为空`))
}
return nil
}
func (this *InstagramUser) Validate() error {
return nil
}
func (this *InstagramUserInfo) Validate() error {
return nil
}
func (this *InstagramComment) Validate() error {
if this.From != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.From); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("From", err)
}
}
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
if this.User != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.User); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("User", err)
}
}
return nil
}
func (this *TikTokComment) Validate() error {
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
return nil
}
func (this *BlueskyComment) Validate() error {
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
return nil
}
func (this *FacebookUser) Validate() error {
return nil
}
func (this *FacebookParent) Validate() error {
if this.From != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.From); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("From", err)
}
}
return nil
}
func (this *FacebookComment) Validate() error {
if this.From != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.From); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("From", err)
}
}
if this.Parent != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Parent); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Parent", err)
}
}
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
return nil
}
func (this *LinkedInMedia) Validate() error {
return nil
}
func (this *LinkedInFrom) Validate() error {
return nil
}
func (this *LinkedInComment) Validate() error {
if this.From != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.From); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("From", err)
}
}
for _, item := range this.Media {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Media", err)
}
}
}
return nil
}
func (this *RedditUser) Validate() error {
return nil
}
func (this *RedditComment) Validate() error {
if this.From != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.From); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("From", err)
}
}
return nil
}
func (this *ThreadsComment) Validate() error {
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
return nil
}
func (this *TwitterPublicMetrics) Validate() error {
return nil
}
func (this *TwitterReferencedTweet) Validate() error {
return nil
}
func (this *TwitterReplyTo) Validate() error {
if this.PublicMetrics != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.PublicMetrics); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PublicMetrics", err)
}
}
return nil
}
func (this *TwitterComment) Validate() error {
if this.PublicMetrics != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.PublicMetrics); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PublicMetrics", err)
}
}
for _, item := range this.ReferencedTweets {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ReferencedTweets", err)
}
}
}
if this.ReplyTo != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ReplyTo); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ReplyTo", err)
}
}
return nil
}
func (this *YouTubeReply) Validate() error {
return nil
}
func (this *YouTubeComment) Validate() error {
for _, item := range this.Replies {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Replies", err)
}
}
}
return nil
}
func (this *GetCommentResponse) Validate() error {
for _, item := range this.Instagram {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Instagram", err)
}
}
}
for _, item := range this.Tiktok {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Tiktok", err)
}
}
}
for _, item := range this.Bluesky {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Bluesky", err)
}
}
}
for _, item := range this.Facebook {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Facebook", err)
}
}
}
for _, item := range this.Linkedin {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Linkedin", err)
}
}
}
for _, item := range this.Reddit {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Reddit", err)
}
}
}
for _, item := range this.Threads {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Threads", err)
}
}
}
for _, item := range this.Twitter {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Twitter", err)
}
}
}
for _, item := range this.Youtube {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Youtube", err)
}
}
}
return nil
}
func (this *DeleteCommentRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`id不能为空`))
}
return nil
}
func (this *InstagramDeleteResponse) Validate() error {
return nil
}
func (this *TikTokDeleteResponse) Validate() error {
return nil
}
func (this *DeleteCommentResponse) Validate() error {
return nil
}
func (this *ReplyCommentRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`id不能为空`))
}
if this.Comment == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Comment", fmt.Errorf(`comment不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
return nil
}
func (this *InstagramReplyResponse) Validate() error {
return nil
}
func (this *TikTokReplyResponse) Validate() error {
return nil
}
func (this *BlueskyReplyResponse) Validate() error {
return nil
}
func (this *FacebookReplyResponse) Validate() error {
return nil
}
func (this *LinkedInReplyResponse) Validate() error {
return nil
}
func (this *TwitterReplyResponse) Validate() error {
return nil
}
func (this *YouTubeReplyResponse) Validate() error {
return nil
}
func (this *ReplyCommentResponse) Validate() error {
if this.Instagram != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Instagram); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Instagram", err)
}
}
if this.Tiktok != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Tiktok); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Tiktok", err)
}
}
if this.Bluesky != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bluesky); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Bluesky", err)
}
}
if this.Facebook != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Facebook); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Facebook", err)
}
}
if this.Linkedin != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Linkedin); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Linkedin", err)
}
}
if this.Twitter != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Twitter); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Twitter", err)
}
}
if this.Youtube != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Youtube); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Youtube", err)
}
}
return nil
}
func (this *GetPostAnalyticsRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`帖子ID不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
return nil
}
func (this *GetPostAnalyticsBySocialIDRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`Social Post ID不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
return nil
}
func (this *GetPostAnalyticsResponse) Validate() error {
return nil
}
func (this *GetSocialAnalyticsRequest) Validate() error {
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
for _, item := range this.Platforms {
if item == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
}
return nil
}
func (this *GetSocialAnalyticsResponse) Validate() error {
return nil
}
func (this *AutoHashtagsRequest) Validate() error {
if this.Post == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Post", fmt.Errorf(`post内容不能为空`))
}
return nil
}
func (this *AutoHashtagsResponse) Validate() error {
return nil
}
func (this *CheckBannedHashtagRequest) Validate() error {
if this.Hashtag == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Hashtag", fmt.Errorf(`hashtag不能为空`))
}
return nil
}
func (this *CheckBannedHashtagResponse) Validate() error {
return nil
}
func (this *HashtagRecommendation) Validate() error {
return nil
}
func (this *RecommendHashtagsRequest) Validate() error {
if this.Keyword == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Keyword", fmt.Errorf(`keyword不能为空`))
}
return nil
}
func (this *RecommendHashtagsResponse) Validate() error {
for _, item := range this.Recommendations {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Recommendations", err)
}
}
}
return nil
}
func (this *SearchHashtagsRequest) Validate() error {
if this.Keyword == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Keyword", fmt.Errorf(`keyword不能为空`))
}
return nil
}
func (this *SearchHashtagInfo) Validate() error {
return nil
}
func (this *SearchHashtagChild) Validate() error {
return nil
}
func (this *SearchHashtagChildren) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *SearchHashtagMedia) Validate() error {
if this.Children != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Children); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Children", err)
}
}
return nil
}
func (this *SearchHashtagsResponse) Validate() error {
if this.Hashtag != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Hashtag); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Hashtag", err)
}
}
for _, item := range this.SearchResults {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SearchResults", err)
}
}
}
return nil
}

View File

@ -37,27 +37,6 @@ type AyrshareClient interface {
CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment)
GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment) GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment)
GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment) GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment)
// 历史记录相关 api
GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc_go.CallOption) (*GetHistoryResponse, common.ErrorWithAttachment)
GetHistoryById(ctx context.Context, in *GetHistoryByIdRequest, opts ...grpc_go.CallOption) (*GetHistoryByIdResponse, common.ErrorWithAttachment)
GetHistoryByPlatform(ctx context.Context, in *GetHistoryByPlatformRequest, opts ...grpc_go.CallOption) (*GetHistoryByPlatformResponse, common.ErrorWithAttachment)
// 消息相关 api
SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc_go.CallOption) (*SendMessageResponse, common.ErrorWithAttachment)
GetMessages(ctx context.Context, in *GetMessagesRequest, opts ...grpc_go.CallOption) (*GetMessagesResponse, common.ErrorWithAttachment)
// 评论相关 api
PostComment(ctx context.Context, in *PostCommentRequest, opts ...grpc_go.CallOption) (*PostCommentResponse, common.ErrorWithAttachment)
GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc_go.CallOption) (*GetCommentResponse, common.ErrorWithAttachment)
DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc_go.CallOption) (*DeleteCommentResponse, common.ErrorWithAttachment)
ReplyComment(ctx context.Context, in *ReplyCommentRequest, opts ...grpc_go.CallOption) (*ReplyCommentResponse, common.ErrorWithAttachment)
// 分析相关 api
GetPostAnalytics(ctx context.Context, in *GetPostAnalyticsRequest, opts ...grpc_go.CallOption) (*GetPostAnalyticsResponse, common.ErrorWithAttachment)
GetPostAnalyticsBySocialID(ctx context.Context, in *GetPostAnalyticsBySocialIDRequest, opts ...grpc_go.CallOption) (*GetPostAnalyticsResponse, common.ErrorWithAttachment)
GetSocialAnalytics(ctx context.Context, in *GetSocialAnalyticsRequest, opts ...grpc_go.CallOption) (*GetSocialAnalyticsResponse, common.ErrorWithAttachment)
// Hashtags 相关 api
AutoHashtags(ctx context.Context, in *AutoHashtagsRequest, opts ...grpc_go.CallOption) (*AutoHashtagsResponse, common.ErrorWithAttachment)
CheckBannedHashtag(ctx context.Context, in *CheckBannedHashtagRequest, opts ...grpc_go.CallOption) (*CheckBannedHashtagResponse, common.ErrorWithAttachment)
RecommendHashtags(ctx context.Context, in *RecommendHashtagsRequest, opts ...grpc_go.CallOption) (*RecommendHashtagsResponse, common.ErrorWithAttachment)
SearchHashtags(ctx context.Context, in *SearchHashtagsRequest, opts ...grpc_go.CallOption) (*SearchHashtagsResponse, common.ErrorWithAttachment)
} }
type ayrshareClient struct { type ayrshareClient struct {
@ -71,22 +50,6 @@ type AyrshareClientImpl struct {
CreateProfile func(ctx context.Context, in *CreateProfileRequest) (*CreateProfileResponse, error) CreateProfile func(ctx context.Context, in *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles func(ctx context.Context, in *GetProfilesRequest) (*GetProfilesResponse, error) GetProfiles func(ctx context.Context, in *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT func(ctx context.Context, in *GenerateJWTRequest) (*GenerateJWTResponse, error) GenerateJWT func(ctx context.Context, in *GenerateJWTRequest) (*GenerateJWTResponse, error)
GetHistory func(ctx context.Context, in *GetHistoryRequest) (*GetHistoryResponse, error)
GetHistoryById func(ctx context.Context, in *GetHistoryByIdRequest) (*GetHistoryByIdResponse, error)
GetHistoryByPlatform func(ctx context.Context, in *GetHistoryByPlatformRequest) (*GetHistoryByPlatformResponse, error)
SendMessage func(ctx context.Context, in *SendMessageRequest) (*SendMessageResponse, error)
GetMessages func(ctx context.Context, in *GetMessagesRequest) (*GetMessagesResponse, error)
PostComment func(ctx context.Context, in *PostCommentRequest) (*PostCommentResponse, error)
GetComment func(ctx context.Context, in *GetCommentRequest) (*GetCommentResponse, error)
DeleteComment func(ctx context.Context, in *DeleteCommentRequest) (*DeleteCommentResponse, error)
ReplyComment func(ctx context.Context, in *ReplyCommentRequest) (*ReplyCommentResponse, error)
GetPostAnalytics func(ctx context.Context, in *GetPostAnalyticsRequest) (*GetPostAnalyticsResponse, error)
GetPostAnalyticsBySocialID func(ctx context.Context, in *GetPostAnalyticsBySocialIDRequest) (*GetPostAnalyticsResponse, error)
GetSocialAnalytics func(ctx context.Context, in *GetSocialAnalyticsRequest) (*GetSocialAnalyticsResponse, error)
AutoHashtags func(ctx context.Context, in *AutoHashtagsRequest) (*AutoHashtagsResponse, error)
CheckBannedHashtag func(ctx context.Context, in *CheckBannedHashtagRequest) (*CheckBannedHashtagResponse, error)
RecommendHashtags func(ctx context.Context, in *RecommendHashtagsRequest) (*RecommendHashtagsResponse, error)
SearchHashtags func(ctx context.Context, in *SearchHashtagsRequest) (*SearchHashtagsResponse, error)
} }
func (c *AyrshareClientImpl) GetDubboStub(cc *triple.TripleConn) AyrshareClient { func (c *AyrshareClientImpl) GetDubboStub(cc *triple.TripleConn) AyrshareClient {
@ -137,102 +100,6 @@ func (c *ayrshareClient) GenerateJWT(ctx context.Context, in *GenerateJWTRequest
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateJWT", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateJWT", in, out)
} }
func (c *ayrshareClient) GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc_go.CallOption) (*GetHistoryResponse, common.ErrorWithAttachment) {
out := new(GetHistoryResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetHistory", in, out)
}
func (c *ayrshareClient) GetHistoryById(ctx context.Context, in *GetHistoryByIdRequest, opts ...grpc_go.CallOption) (*GetHistoryByIdResponse, common.ErrorWithAttachment) {
out := new(GetHistoryByIdResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetHistoryById", in, out)
}
func (c *ayrshareClient) GetHistoryByPlatform(ctx context.Context, in *GetHistoryByPlatformRequest, opts ...grpc_go.CallOption) (*GetHistoryByPlatformResponse, common.ErrorWithAttachment) {
out := new(GetHistoryByPlatformResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetHistoryByPlatform", in, out)
}
func (c *ayrshareClient) SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc_go.CallOption) (*SendMessageResponse, common.ErrorWithAttachment) {
out := new(SendMessageResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendMessage", in, out)
}
func (c *ayrshareClient) GetMessages(ctx context.Context, in *GetMessagesRequest, opts ...grpc_go.CallOption) (*GetMessagesResponse, common.ErrorWithAttachment) {
out := new(GetMessagesResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetMessages", in, out)
}
func (c *ayrshareClient) PostComment(ctx context.Context, in *PostCommentRequest, opts ...grpc_go.CallOption) (*PostCommentResponse, common.ErrorWithAttachment) {
out := new(PostCommentResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PostComment", in, out)
}
func (c *ayrshareClient) GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc_go.CallOption) (*GetCommentResponse, common.ErrorWithAttachment) {
out := new(GetCommentResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetComment", in, out)
}
func (c *ayrshareClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc_go.CallOption) (*DeleteCommentResponse, common.ErrorWithAttachment) {
out := new(DeleteCommentResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteComment", in, out)
}
func (c *ayrshareClient) ReplyComment(ctx context.Context, in *ReplyCommentRequest, opts ...grpc_go.CallOption) (*ReplyCommentResponse, common.ErrorWithAttachment) {
out := new(ReplyCommentResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ReplyComment", in, out)
}
func (c *ayrshareClient) GetPostAnalytics(ctx context.Context, in *GetPostAnalyticsRequest, opts ...grpc_go.CallOption) (*GetPostAnalyticsResponse, common.ErrorWithAttachment) {
out := new(GetPostAnalyticsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPostAnalytics", in, out)
}
func (c *ayrshareClient) GetPostAnalyticsBySocialID(ctx context.Context, in *GetPostAnalyticsBySocialIDRequest, opts ...grpc_go.CallOption) (*GetPostAnalyticsResponse, common.ErrorWithAttachment) {
out := new(GetPostAnalyticsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPostAnalyticsBySocialID", in, out)
}
func (c *ayrshareClient) GetSocialAnalytics(ctx context.Context, in *GetSocialAnalyticsRequest, opts ...grpc_go.CallOption) (*GetSocialAnalyticsResponse, common.ErrorWithAttachment) {
out := new(GetSocialAnalyticsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetSocialAnalytics", in, out)
}
func (c *ayrshareClient) AutoHashtags(ctx context.Context, in *AutoHashtagsRequest, opts ...grpc_go.CallOption) (*AutoHashtagsResponse, common.ErrorWithAttachment) {
out := new(AutoHashtagsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AutoHashtags", in, out)
}
func (c *ayrshareClient) CheckBannedHashtag(ctx context.Context, in *CheckBannedHashtagRequest, opts ...grpc_go.CallOption) (*CheckBannedHashtagResponse, common.ErrorWithAttachment) {
out := new(CheckBannedHashtagResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CheckBannedHashtag", in, out)
}
func (c *ayrshareClient) RecommendHashtags(ctx context.Context, in *RecommendHashtagsRequest, opts ...grpc_go.CallOption) (*RecommendHashtagsResponse, common.ErrorWithAttachment) {
out := new(RecommendHashtagsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RecommendHashtags", in, out)
}
func (c *ayrshareClient) SearchHashtags(ctx context.Context, in *SearchHashtagsRequest, opts ...grpc_go.CallOption) (*SearchHashtagsResponse, common.ErrorWithAttachment) {
out := new(SearchHashtagsResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SearchHashtags", in, out)
}
// AyrshareServer is the server API for Ayrshare service. // AyrshareServer is the server API for Ayrshare service.
// All implementations must embed UnimplementedAyrshareServer // All implementations must embed UnimplementedAyrshareServer
// for forward compatibility // for forward compatibility
@ -246,27 +113,6 @@ type AyrshareServer interface {
CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error) GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error)
// 历史记录相关 api
GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
GetHistoryById(context.Context, *GetHistoryByIdRequest) (*GetHistoryByIdResponse, error)
GetHistoryByPlatform(context.Context, *GetHistoryByPlatformRequest) (*GetHistoryByPlatformResponse, error)
// 消息相关 api
SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error)
GetMessages(context.Context, *GetMessagesRequest) (*GetMessagesResponse, error)
// 评论相关 api
PostComment(context.Context, *PostCommentRequest) (*PostCommentResponse, error)
GetComment(context.Context, *GetCommentRequest) (*GetCommentResponse, error)
DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error)
ReplyComment(context.Context, *ReplyCommentRequest) (*ReplyCommentResponse, error)
// 分析相关 api
GetPostAnalytics(context.Context, *GetPostAnalyticsRequest) (*GetPostAnalyticsResponse, error)
GetPostAnalyticsBySocialID(context.Context, *GetPostAnalyticsBySocialIDRequest) (*GetPostAnalyticsResponse, error)
GetSocialAnalytics(context.Context, *GetSocialAnalyticsRequest) (*GetSocialAnalyticsResponse, error)
// Hashtags 相关 api
AutoHashtags(context.Context, *AutoHashtagsRequest) (*AutoHashtagsResponse, error)
CheckBannedHashtag(context.Context, *CheckBannedHashtagRequest) (*CheckBannedHashtagResponse, error)
RecommendHashtags(context.Context, *RecommendHashtagsRequest) (*RecommendHashtagsResponse, error)
SearchHashtags(context.Context, *SearchHashtagsRequest) (*SearchHashtagsResponse, error)
mustEmbedUnimplementedAyrshareServer() mustEmbedUnimplementedAyrshareServer()
} }
@ -293,54 +139,6 @@ func (UnimplementedAyrshareServer) GetProfiles(context.Context, *GetProfilesRequ
func (UnimplementedAyrshareServer) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) { func (UnimplementedAyrshareServer) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateJWT not implemented") return nil, status.Errorf(codes.Unimplemented, "method GenerateJWT not implemented")
} }
func (UnimplementedAyrshareServer) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHistory not implemented")
}
func (UnimplementedAyrshareServer) GetHistoryById(context.Context, *GetHistoryByIdRequest) (*GetHistoryByIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHistoryById not implemented")
}
func (UnimplementedAyrshareServer) GetHistoryByPlatform(context.Context, *GetHistoryByPlatformRequest) (*GetHistoryByPlatformResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHistoryByPlatform not implemented")
}
func (UnimplementedAyrshareServer) SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented")
}
func (UnimplementedAyrshareServer) GetMessages(context.Context, *GetMessagesRequest) (*GetMessagesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMessages not implemented")
}
func (UnimplementedAyrshareServer) PostComment(context.Context, *PostCommentRequest) (*PostCommentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PostComment not implemented")
}
func (UnimplementedAyrshareServer) GetComment(context.Context, *GetCommentRequest) (*GetCommentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetComment not implemented")
}
func (UnimplementedAyrshareServer) DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented")
}
func (UnimplementedAyrshareServer) ReplyComment(context.Context, *ReplyCommentRequest) (*ReplyCommentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplyComment not implemented")
}
func (UnimplementedAyrshareServer) GetPostAnalytics(context.Context, *GetPostAnalyticsRequest) (*GetPostAnalyticsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPostAnalytics not implemented")
}
func (UnimplementedAyrshareServer) GetPostAnalyticsBySocialID(context.Context, *GetPostAnalyticsBySocialIDRequest) (*GetPostAnalyticsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPostAnalyticsBySocialID not implemented")
}
func (UnimplementedAyrshareServer) GetSocialAnalytics(context.Context, *GetSocialAnalyticsRequest) (*GetSocialAnalyticsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSocialAnalytics not implemented")
}
func (UnimplementedAyrshareServer) AutoHashtags(context.Context, *AutoHashtagsRequest) (*AutoHashtagsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AutoHashtags not implemented")
}
func (UnimplementedAyrshareServer) CheckBannedHashtag(context.Context, *CheckBannedHashtagRequest) (*CheckBannedHashtagResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckBannedHashtag not implemented")
}
func (UnimplementedAyrshareServer) RecommendHashtags(context.Context, *RecommendHashtagsRequest) (*RecommendHashtagsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RecommendHashtags not implemented")
}
func (UnimplementedAyrshareServer) SearchHashtags(context.Context, *SearchHashtagsRequest) (*SearchHashtagsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SearchHashtags not implemented")
}
func (s *UnimplementedAyrshareServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedAyrshareServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
} }
@ -543,470 +341,6 @@ func _Ayrshare_GenerateJWT_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Ayrshare_GetHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetHistoryRequest)
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("GetHistory", 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 _Ayrshare_GetHistoryById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetHistoryByIdRequest)
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("GetHistoryById", 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 _Ayrshare_GetHistoryByPlatform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetHistoryByPlatformRequest)
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("GetHistoryByPlatform", 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 _Ayrshare_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMessageRequest)
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("SendMessage", 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 _Ayrshare_GetMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMessagesRequest)
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("GetMessages", 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 _Ayrshare_PostComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(PostCommentRequest)
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("PostComment", 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 _Ayrshare_GetComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCommentRequest)
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("GetComment", 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 _Ayrshare_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCommentRequest)
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("DeleteComment", 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 _Ayrshare_ReplyComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplyCommentRequest)
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("ReplyComment", 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 _Ayrshare_GetPostAnalytics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostAnalyticsRequest)
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("GetPostAnalytics", 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 _Ayrshare_GetPostAnalyticsBySocialID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostAnalyticsBySocialIDRequest)
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("GetPostAnalyticsBySocialID", 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 _Ayrshare_GetSocialAnalytics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSocialAnalyticsRequest)
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("GetSocialAnalytics", 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 _Ayrshare_AutoHashtags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AutoHashtagsRequest)
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("AutoHashtags", 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 _Ayrshare_CheckBannedHashtag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckBannedHashtagRequest)
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("CheckBannedHashtag", 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 _Ayrshare_RecommendHashtags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(RecommendHashtagsRequest)
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("RecommendHashtags", 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 _Ayrshare_SearchHashtags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchHashtagsRequest)
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("SearchHashtags", 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)
}
// Ayrshare_ServiceDesc is the grpc_go.ServiceDesc for Ayrshare service. // Ayrshare_ServiceDesc is the grpc_go.ServiceDesc for Ayrshare service.
// It's only intended for direct use with grpc_go.RegisterService, // It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -1038,70 +372,6 @@ var Ayrshare_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "GenerateJWT", MethodName: "GenerateJWT",
Handler: _Ayrshare_GenerateJWT_Handler, Handler: _Ayrshare_GenerateJWT_Handler,
}, },
{
MethodName: "GetHistory",
Handler: _Ayrshare_GetHistory_Handler,
},
{
MethodName: "GetHistoryById",
Handler: _Ayrshare_GetHistoryById_Handler,
},
{
MethodName: "GetHistoryByPlatform",
Handler: _Ayrshare_GetHistoryByPlatform_Handler,
},
{
MethodName: "SendMessage",
Handler: _Ayrshare_SendMessage_Handler,
},
{
MethodName: "GetMessages",
Handler: _Ayrshare_GetMessages_Handler,
},
{
MethodName: "PostComment",
Handler: _Ayrshare_PostComment_Handler,
},
{
MethodName: "GetComment",
Handler: _Ayrshare_GetComment_Handler,
},
{
MethodName: "DeleteComment",
Handler: _Ayrshare_DeleteComment_Handler,
},
{
MethodName: "ReplyComment",
Handler: _Ayrshare_ReplyComment_Handler,
},
{
MethodName: "GetPostAnalytics",
Handler: _Ayrshare_GetPostAnalytics_Handler,
},
{
MethodName: "GetPostAnalyticsBySocialID",
Handler: _Ayrshare_GetPostAnalyticsBySocialID_Handler,
},
{
MethodName: "GetSocialAnalytics",
Handler: _Ayrshare_GetSocialAnalytics_Handler,
},
{
MethodName: "AutoHashtags",
Handler: _Ayrshare_AutoHashtags_Handler,
},
{
MethodName: "CheckBannedHashtag",
Handler: _Ayrshare_CheckBannedHashtag_Handler,
},
{
MethodName: "RecommendHashtags",
Handler: _Ayrshare_RecommendHashtags_Handler,
},
{
MethodName: "SearchHashtags",
Handler: _Ayrshare_SearchHashtags_Handler,
},
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "pb/ayrshare.proto", Metadata: "pb/ayrshare.proto",

File diff suppressed because it is too large Load Diff

View File

@ -17,32 +17,6 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (this *QueryTheOrderSnapshotInformationReq) Validate() error {
return nil
}
func (this *QueryTheOrderSnapshotInformationResp) Validate() error {
for _, item := range this.BundleOrder {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("BundleOrder", err)
}
}
}
for _, item := range this.AddBundleOrder {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleOrder", err)
}
}
}
return nil
}
func (this *ServiceInformation) Validate() error {
return nil
}
func (this *ReSignTheContractRequest) Validate() error {
return nil
}
func (this *DeleteValueAddServiceRequest) Validate() error { func (this *DeleteValueAddServiceRequest) Validate() error {
return nil return nil
} }
@ -740,9 +714,6 @@ func (this *SetPendingTaskLayoutReq) Validate() error {
func (this *SetPendingTaskLayoutResp) Validate() error { func (this *SetPendingTaskLayoutResp) Validate() error {
return nil return nil
} }
func (this *CreateTaskWorkLogRequest) Validate() error {
return nil
}
func (this *MetricsBusinessReq) Validate() error { func (this *MetricsBusinessReq) Validate() error {
return nil return nil
} }

View File

@ -50,7 +50,6 @@ type BundleClient interface {
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment) OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment) OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment) OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
// 增值套餐 // 增值套餐
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment) ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
@ -110,7 +109,6 @@ type BundleClient interface {
GetPendingAssign(ctx context.Context, in *PendingAssignRequest, opts ...grpc_go.CallOption) (*PendingAssignResponse, common.ErrorWithAttachment) GetPendingAssign(ctx context.Context, in *PendingAssignRequest, opts ...grpc_go.CallOption) (*PendingAssignResponse, common.ErrorWithAttachment)
RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment) RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment) AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
CreateTaskWorkLog(ctx context.Context, in *CreateTaskWorkLogRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
// 数据指标 // 数据指标
MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment) MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment)
MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment) MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment)
@ -118,7 +116,6 @@ type BundleClient interface {
MetricsBundlePurchaseExport(ctx context.Context, in *MetricsBundlePurchaseExportReq, opts ...grpc_go.CallOption) (*MetricsBundlePurchaseExportResp, common.ErrorWithAttachment) MetricsBundlePurchaseExport(ctx context.Context, in *MetricsBundlePurchaseExportReq, opts ...grpc_go.CallOption) (*MetricsBundlePurchaseExportResp, common.ErrorWithAttachment)
MetricsArtistAccountExport(ctx context.Context, in *MetricsArtistAccountExportReq, opts ...grpc_go.CallOption) (*MetricsArtistAccountExportResp, common.ErrorWithAttachment) MetricsArtistAccountExport(ctx context.Context, in *MetricsArtistAccountExportReq, opts ...grpc_go.CallOption) (*MetricsArtistAccountExportResp, common.ErrorWithAttachment)
MetricsVideoSubmitExport(ctx context.Context, in *MetricsVideoSubmitExportReq, opts ...grpc_go.CallOption) (*MetricsVideoSubmitExportResp, common.ErrorWithAttachment) MetricsVideoSubmitExport(ctx context.Context, in *MetricsVideoSubmitExportReq, opts ...grpc_go.CallOption) (*MetricsVideoSubmitExportResp, common.ErrorWithAttachment)
QueryTheOrderSnapshotInformation(ctx context.Context, in *QueryTheOrderSnapshotInformationReq, opts ...grpc_go.CallOption) (*QueryTheOrderSnapshotInformationResp, common.ErrorWithAttachment)
} }
type bundleClient struct { type bundleClient struct {
@ -148,7 +145,6 @@ type BundleClientImpl struct {
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error) OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
ReSignTheContract func(ctx context.Context, in *ReSignTheContractRequest) (*CommonResponse, error)
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error) ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error) ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
@ -201,14 +197,12 @@ type BundleClientImpl struct {
GetPendingAssign func(ctx context.Context, in *PendingAssignRequest) (*PendingAssignResponse, error) GetPendingAssign func(ctx context.Context, in *PendingAssignRequest) (*PendingAssignResponse, error)
RevertTaskCompletionByUUIDItem func(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error) RevertTaskCompletionByUUIDItem func(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
AddHiddenTaskAssignee func(ctx context.Context, in *AddHiddenTaskAssigneeRequest) (*ComResponse, error) AddHiddenTaskAssignee func(ctx context.Context, in *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
CreateTaskWorkLog func(ctx context.Context, in *CreateTaskWorkLogRequest) (*CommonResponse, error)
MetricsBusiness func(ctx context.Context, in *MetricsBusinessReq) (*MetricsBusinessResp, error) MetricsBusiness func(ctx context.Context, in *MetricsBusinessReq) (*MetricsBusinessResp, error)
MetricsOperatingCreate func(ctx context.Context, in *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error) MetricsOperatingCreate func(ctx context.Context, in *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
MetricsOperatingStatus func(ctx context.Context, in *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error) MetricsOperatingStatus func(ctx context.Context, in *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error)
MetricsBundlePurchaseExport func(ctx context.Context, in *MetricsBundlePurchaseExportReq) (*MetricsBundlePurchaseExportResp, error) MetricsBundlePurchaseExport func(ctx context.Context, in *MetricsBundlePurchaseExportReq) (*MetricsBundlePurchaseExportResp, error)
MetricsArtistAccountExport func(ctx context.Context, in *MetricsArtistAccountExportReq) (*MetricsArtistAccountExportResp, error) MetricsArtistAccountExport func(ctx context.Context, in *MetricsArtistAccountExportReq) (*MetricsArtistAccountExportResp, error)
MetricsVideoSubmitExport func(ctx context.Context, in *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error) MetricsVideoSubmitExport func(ctx context.Context, in *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error)
QueryTheOrderSnapshotInformation func(ctx context.Context, in *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error)
} }
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient { func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
@ -355,12 +349,6 @@ func (c *bundleClient) OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAd
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out)
} }
func (c *bundleClient) ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ReSignTheContract", in, out)
}
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) { func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
out := new(CreateValueAddBundleResponse) out := new(CreateValueAddBundleResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string) interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -673,12 +661,6 @@ func (c *bundleClient) AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenT
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddHiddenTaskAssignee", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddHiddenTaskAssignee", in, out)
} }
func (c *bundleClient) CreateTaskWorkLog(ctx context.Context, in *CreateTaskWorkLogRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateTaskWorkLog", in, out)
}
func (c *bundleClient) MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment) { func (c *bundleClient) MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment) {
out := new(MetricsBusinessResp) out := new(MetricsBusinessResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string) interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -715,12 +697,6 @@ func (c *bundleClient) MetricsVideoSubmitExport(ctx context.Context, in *Metrics
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MetricsVideoSubmitExport", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MetricsVideoSubmitExport", in, out)
} }
func (c *bundleClient) QueryTheOrderSnapshotInformation(ctx context.Context, in *QueryTheOrderSnapshotInformationReq, opts ...grpc_go.CallOption) (*QueryTheOrderSnapshotInformationResp, common.ErrorWithAttachment) {
out := new(QueryTheOrderSnapshotInformationResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/QueryTheOrderSnapshotInformation", in, out)
}
// BundleServer is the server API for Bundle service. // BundleServer is the server API for Bundle service.
// All implementations must embed UnimplementedBundleServer // All implementations must embed UnimplementedBundleServer
// for forward compatibility // for forward compatibility
@ -747,7 +723,6 @@ type BundleServer interface {
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error) OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error)
// 增值套餐 // 增值套餐
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error) ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
@ -807,7 +782,6 @@ type BundleServer interface {
GetPendingAssign(context.Context, *PendingAssignRequest) (*PendingAssignResponse, error) GetPendingAssign(context.Context, *PendingAssignRequest) (*PendingAssignResponse, error)
RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error) RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
CreateTaskWorkLog(context.Context, *CreateTaskWorkLogRequest) (*CommonResponse, error)
// 数据指标 // 数据指标
MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error) MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error)
MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error) MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
@ -815,7 +789,6 @@ type BundleServer interface {
MetricsBundlePurchaseExport(context.Context, *MetricsBundlePurchaseExportReq) (*MetricsBundlePurchaseExportResp, error) MetricsBundlePurchaseExport(context.Context, *MetricsBundlePurchaseExportReq) (*MetricsBundlePurchaseExportResp, error)
MetricsArtistAccountExport(context.Context, *MetricsArtistAccountExportReq) (*MetricsArtistAccountExportResp, error) MetricsArtistAccountExport(context.Context, *MetricsArtistAccountExportReq) (*MetricsArtistAccountExportResp, error)
MetricsVideoSubmitExport(context.Context, *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error) MetricsVideoSubmitExport(context.Context, *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error)
QueryTheOrderSnapshotInformation(context.Context, *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error)
mustEmbedUnimplementedBundleServer() mustEmbedUnimplementedBundleServer()
} }
@ -890,9 +863,6 @@ func (UnimplementedBundleServer) OrderListByOrderNo(context.Context, *OrderInfoB
func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) { func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented") return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented")
} }
func (UnimplementedBundleServer) ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReSignTheContract not implemented")
}
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) { func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented") return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
} }
@ -1049,9 +1019,6 @@ func (UnimplementedBundleServer) RevertTaskCompletionByUUIDItem(context.Context,
func (UnimplementedBundleServer) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) { func (UnimplementedBundleServer) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddHiddenTaskAssignee not implemented") return nil, status.Errorf(codes.Unimplemented, "method AddHiddenTaskAssignee not implemented")
} }
func (UnimplementedBundleServer) CreateTaskWorkLog(context.Context, *CreateTaskWorkLogRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTaskWorkLog not implemented")
}
func (UnimplementedBundleServer) MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error) { func (UnimplementedBundleServer) MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method MetricsBusiness not implemented") return nil, status.Errorf(codes.Unimplemented, "method MetricsBusiness not implemented")
} }
@ -1070,9 +1037,6 @@ func (UnimplementedBundleServer) MetricsArtistAccountExport(context.Context, *Me
func (UnimplementedBundleServer) MetricsVideoSubmitExport(context.Context, *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error) { func (UnimplementedBundleServer) MetricsVideoSubmitExport(context.Context, *MetricsVideoSubmitExportReq) (*MetricsVideoSubmitExportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method MetricsVideoSubmitExport not implemented") return nil, status.Errorf(codes.Unimplemented, "method MetricsVideoSubmitExport not implemented")
} }
func (UnimplementedBundleServer) QueryTheOrderSnapshotInformation(context.Context, *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method QueryTheOrderSnapshotInformation not implemented")
}
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
} }
@ -1739,35 +1703,6 @@ func _Bundle_OnlyAddValueListByOrderNo_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bundle_ReSignTheContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ReSignTheContractRequest)
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("ReSignTheContract", 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 _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateValueAddBundleRequest) in := new(CreateValueAddBundleRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -3276,35 +3211,6 @@ func _Bundle_AddHiddenTaskAssignee_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bundle_CreateTaskWorkLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTaskWorkLogRequest)
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("CreateTaskWorkLog", 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 _Bundle_MetricsBusiness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { func _Bundle_MetricsBusiness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(MetricsBusinessReq) in := new(MetricsBusinessReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -3479,35 +3385,6 @@ func _Bundle_MetricsVideoSubmitExport_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bundle_QueryTheOrderSnapshotInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryTheOrderSnapshotInformationReq)
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("QueryTheOrderSnapshotInformation", 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)
}
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service. // Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
// It's only intended for direct use with grpc_go.RegisterService, // It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -3603,10 +3480,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "OnlyAddValueListByOrderNo", MethodName: "OnlyAddValueListByOrderNo",
Handler: _Bundle_OnlyAddValueListByOrderNo_Handler, Handler: _Bundle_OnlyAddValueListByOrderNo_Handler,
}, },
{
MethodName: "ReSignTheContract",
Handler: _Bundle_ReSignTheContract_Handler,
},
{ {
MethodName: "CreateValueAddBundle", MethodName: "CreateValueAddBundle",
Handler: _Bundle_CreateValueAddBundle_Handler, Handler: _Bundle_CreateValueAddBundle_Handler,
@ -3815,10 +3688,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "AddHiddenTaskAssignee", MethodName: "AddHiddenTaskAssignee",
Handler: _Bundle_AddHiddenTaskAssignee_Handler, Handler: _Bundle_AddHiddenTaskAssignee_Handler,
}, },
{
MethodName: "CreateTaskWorkLog",
Handler: _Bundle_CreateTaskWorkLog_Handler,
},
{ {
MethodName: "MetricsBusiness", MethodName: "MetricsBusiness",
Handler: _Bundle_MetricsBusiness_Handler, Handler: _Bundle_MetricsBusiness_Handler,
@ -3843,10 +3712,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "MetricsVideoSubmitExport", MethodName: "MetricsVideoSubmitExport",
Handler: _Bundle_MetricsVideoSubmitExport_Handler, Handler: _Bundle_MetricsVideoSubmitExport_Handler,
}, },
{
MethodName: "QueryTheOrderSnapshotInformation",
Handler: _Bundle_QueryTheOrderSnapshotInformation_Handler,
},
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "pb/bundle.proto", Metadata: "pb/bundle.proto",

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

@ -1,169 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: pb/cron.proto
package cron
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *CommonIDRequest) Validate() error {
return nil
}
func (this *CommonResponse) Validate() error {
return nil
}
func (this *ScheduleTask) Validate() error {
if this.TaskDetail != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TaskDetail); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TaskDetail", err)
}
}
for _, item := range this.ExecutionRecords {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ExecutionRecords", err)
}
}
}
return nil
}
func (this *TaskDetail) 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 *ArtistInfo) Validate() error {
return nil
}
func (this *ExecutionRecord) Validate() error {
for _, item := range this.ExecutionResults {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ExecutionResults", err)
}
}
}
return nil
}
func (this *ExecutionResult) Validate() error {
return nil
}
func (this *CreateScheduleTaskRequest) Validate() error {
if this.TaskDetail != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TaskDetail); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TaskDetail", err)
}
}
return nil
}
func (this *TaskDetailRequest) 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 *CreateScheduleTaskResponse) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *UpdateScheduleTaskRequest) Validate() error {
if this.TaskDetail != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TaskDetail); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TaskDetail", err)
}
}
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 {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *GetListScheduleTaskRequest) Validate() error {
// Validation of proto3 map<> fields is unsupported.
return nil
}
func (this *GetListScheduleTaskResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetListExecutionRecordRequest) Validate() error {
return nil
}
func (this *GetListExecutionRecordResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetListExecutionResultRequest) Validate() error {
return nil
}
func (this *GetListExecutionResultResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *TaskStatus) Validate() error {
return nil
}
func (this *GetScheduleTaskStatusResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}

View File

@ -1,508 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v6.32.0
// source: pb/cron.proto
package cron
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// CronClient is the client API for Cron service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CronClient interface {
CreateScheduleTask(ctx context.Context, in *CreateScheduleTaskRequest, opts ...grpc_go.CallOption) (*CreateScheduleTaskResponse, common.ErrorWithAttachment)
UpdateScheduleTask(ctx context.Context, in *UpdateScheduleTaskRequest, opts ...grpc_go.CallOption) (*UpdateScheduleTaskResponse, common.ErrorWithAttachment)
GetListScheduleTask(ctx context.Context, in *GetListScheduleTaskRequest, opts ...grpc_go.CallOption) (*GetListScheduleTaskResponse, common.ErrorWithAttachment)
GetListExecutionRecord(ctx context.Context, in *GetListExecutionRecordRequest, opts ...grpc_go.CallOption) (*GetListExecutionRecordResponse, common.ErrorWithAttachment)
GetListExecutionResult(ctx context.Context, in *GetListExecutionResultRequest, opts ...grpc_go.CallOption) (*GetListExecutionResultResponse, common.ErrorWithAttachment)
PauseScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
StartScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment)
}
type cronClient struct {
cc *triple.TripleConn
}
type CronClientImpl struct {
CreateScheduleTask func(ctx context.Context, in *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
UpdateScheduleTask func(ctx context.Context, in *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
GetListScheduleTask func(ctx context.Context, in *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error)
GetListExecutionRecord func(ctx context.Context, in *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error)
GetListExecutionResult func(ctx context.Context, in *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error)
PauseScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
StartScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
DeleteScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
GetScheduleTaskStatus func(ctx context.Context, in *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
}
func (c *CronClientImpl) GetDubboStub(cc *triple.TripleConn) CronClient {
return NewCronClient(cc)
}
func (c *CronClientImpl) XXX_InterfaceName() string {
return "cron.Cron"
}
func NewCronClient(cc *triple.TripleConn) CronClient {
return &cronClient{cc}
}
func (c *cronClient) CreateScheduleTask(ctx context.Context, in *CreateScheduleTaskRequest, opts ...grpc_go.CallOption) (*CreateScheduleTaskResponse, common.ErrorWithAttachment) {
out := new(CreateScheduleTaskResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateScheduleTask", in, out)
}
func (c *cronClient) UpdateScheduleTask(ctx context.Context, in *UpdateScheduleTaskRequest, opts ...grpc_go.CallOption) (*UpdateScheduleTaskResponse, common.ErrorWithAttachment) {
out := new(UpdateScheduleTaskResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateScheduleTask", in, out)
}
func (c *cronClient) GetListScheduleTask(ctx context.Context, in *GetListScheduleTaskRequest, opts ...grpc_go.CallOption) (*GetListScheduleTaskResponse, common.ErrorWithAttachment) {
out := new(GetListScheduleTaskResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetListScheduleTask", in, out)
}
func (c *cronClient) GetListExecutionRecord(ctx context.Context, in *GetListExecutionRecordRequest, opts ...grpc_go.CallOption) (*GetListExecutionRecordResponse, common.ErrorWithAttachment) {
out := new(GetListExecutionRecordResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetListExecutionRecord", in, out)
}
func (c *cronClient) GetListExecutionResult(ctx context.Context, in *GetListExecutionResultRequest, opts ...grpc_go.CallOption) (*GetListExecutionResultResponse, common.ErrorWithAttachment) {
out := new(GetListExecutionResultResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetListExecutionResult", in, out)
}
func (c *cronClient) PauseScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PauseScheduleTask", in, out)
}
func (c *cronClient) StartScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/StartScheduleTask", in, out)
}
func (c *cronClient) DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteScheduleTask", in, out)
}
func (c *cronClient) GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, common.ErrorWithAttachment) {
out := new(GetScheduleTaskStatusResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetScheduleTaskStatus", in, out)
}
// CronServer is the server API for Cron service.
// All implementations must embed UnimplementedCronServer
// for forward compatibility
type CronServer interface {
CreateScheduleTask(context.Context, *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error)
GetListExecutionRecord(context.Context, *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error)
GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error)
PauseScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
StartScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
mustEmbedUnimplementedCronServer()
}
// UnimplementedCronServer must be embedded to have forward compatible implementations.
type UnimplementedCronServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedCronServer) CreateScheduleTask(context.Context, *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateScheduleTask not implemented")
}
func (UnimplementedCronServer) UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateScheduleTask not implemented")
}
func (UnimplementedCronServer) GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetListScheduleTask not implemented")
}
func (UnimplementedCronServer) GetListExecutionRecord(context.Context, *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetListExecutionRecord not implemented")
}
func (UnimplementedCronServer) GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetListExecutionResult not implemented")
}
func (UnimplementedCronServer) PauseScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PauseScheduleTask not implemented")
}
func (UnimplementedCronServer) StartScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StartScheduleTask not implemented")
}
func (UnimplementedCronServer) DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteScheduleTask not implemented")
}
func (UnimplementedCronServer) GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetScheduleTaskStatus not implemented")
}
func (s *UnimplementedCronServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedCronServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedCronServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Cron_ServiceDesc
}
func (s *UnimplementedCronServer) XXX_InterfaceName() string {
return "cron.Cron"
}
func (UnimplementedCronServer) mustEmbedUnimplementedCronServer() {}
// UnsafeCronServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CronServer will
// result in compilation errors.
type UnsafeCronServer interface {
mustEmbedUnimplementedCronServer()
}
func RegisterCronServer(s grpc_go.ServiceRegistrar, srv CronServer) {
s.RegisterService(&Cron_ServiceDesc, srv)
}
func _Cron_CreateScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateScheduleTaskRequest)
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("CreateScheduleTask", 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 _Cron_UpdateScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateScheduleTaskRequest)
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("UpdateScheduleTask", 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 _Cron_GetListScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetListScheduleTaskRequest)
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("GetListScheduleTask", 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 _Cron_GetListExecutionRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetListExecutionRecordRequest)
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("GetListExecutionRecord", 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 _Cron_GetListExecutionResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetListExecutionResultRequest)
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("GetListExecutionResult", 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 _Cron_PauseScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CommonIDRequest)
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("PauseScheduleTask", 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 _Cron_StartScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CommonIDRequest)
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("StartScheduleTask", 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 _Cron_DeleteScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CommonIDRequest)
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("DeleteScheduleTask", 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 _Cron_GetScheduleTaskStatus_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("GetScheduleTaskStatus", 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)
}
// Cron_ServiceDesc is the grpc_go.ServiceDesc for Cron service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Cron_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "cron.Cron",
HandlerType: (*CronServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "CreateScheduleTask",
Handler: _Cron_CreateScheduleTask_Handler,
},
{
MethodName: "UpdateScheduleTask",
Handler: _Cron_UpdateScheduleTask_Handler,
},
{
MethodName: "GetListScheduleTask",
Handler: _Cron_GetListScheduleTask_Handler,
},
{
MethodName: "GetListExecutionRecord",
Handler: _Cron_GetListExecutionRecord_Handler,
},
{
MethodName: "GetListExecutionResult",
Handler: _Cron_GetListExecutionResult_Handler,
},
{
MethodName: "PauseScheduleTask",
Handler: _Cron_PauseScheduleTask_Handler,
},
{
MethodName: "StartScheduleTask",
Handler: _Cron_StartScheduleTask_Handler,
},
{
MethodName: "DeleteScheduleTask",
Handler: _Cron_DeleteScheduleTask_Handler,
},
{
MethodName: "GetScheduleTaskStatus",
Handler: _Cron_GetScheduleTaskStatus_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "pb/cron.proto",
}

View File

@ -1,644 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v5.26.0
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type EmailAlertsSubmitReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName"`
LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
}
func (x *EmailAlertsSubmitReq) Reset() {
*x = EmailAlertsSubmitReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailAlertsSubmitReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailAlertsSubmitReq) ProtoMessage() {}
func (x *EmailAlertsSubmitReq) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EmailAlertsSubmitReq.ProtoReflect.Descriptor instead.
func (*EmailAlertsSubmitReq) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{0}
}
func (x *EmailAlertsSubmitReq) GetFirstName() string {
if x != nil {
return x.FirstName
}
return ""
}
func (x *EmailAlertsSubmitReq) GetLastName() string {
if x != nil {
return x.LastName
}
return ""
}
func (x *EmailAlertsSubmitReq) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *EmailAlertsSubmitReq) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
func (x *EmailAlertsSubmitReq) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
type EmailAlertsSubmitResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
}
func (x *EmailAlertsSubmitResp) Reset() {
*x = EmailAlertsSubmitResp{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailAlertsSubmitResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailAlertsSubmitResp) ProtoMessage() {}
func (x *EmailAlertsSubmitResp) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EmailAlertsSubmitResp.ProtoReflect.Descriptor instead.
func (*EmailAlertsSubmitResp) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{1}
}
func (x *EmailAlertsSubmitResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
// ========================= EmailInformatio ==============================
type Filtrate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company"`
}
func (x *Filtrate) Reset() {
*x = Filtrate{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Filtrate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Filtrate) ProtoMessage() {}
func (x *Filtrate) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Filtrate.ProtoReflect.Descriptor instead.
func (*Filtrate) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{2}
}
func (x *Filtrate) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Filtrate) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *Filtrate) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
type GetEmailInformationListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
Filtrate *Filtrate `protobuf:"bytes,3,opt,name=filtrate,proto3" json:"filtrate"`
}
func (x *GetEmailInformationListReq) Reset() {
*x = GetEmailInformationListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetEmailInformationListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetEmailInformationListReq) ProtoMessage() {}
func (x *GetEmailInformationListReq) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetEmailInformationListReq.ProtoReflect.Descriptor instead.
func (*GetEmailInformationListReq) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{3}
}
func (x *GetEmailInformationListReq) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetEmailInformationListReq) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetEmailInformationListReq) GetFiltrate() *Filtrate {
if x != nil {
return x.Filtrate
}
return nil
}
type GetEmailInformationListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize"`
Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total"`
Data []*EmailInformation `protobuf:"bytes,5,rep,name=data,proto3" json:"data"`
}
func (x *GetEmailInformationListResp) Reset() {
*x = GetEmailInformationListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetEmailInformationListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetEmailInformationListResp) ProtoMessage() {}
func (x *GetEmailInformationListResp) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetEmailInformationListResp.ProtoReflect.Descriptor instead.
func (*GetEmailInformationListResp) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{4}
}
func (x *GetEmailInformationListResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *GetEmailInformationListResp) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetEmailInformationListResp) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetEmailInformationListResp) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
func (x *GetEmailInformationListResp) GetData() []*EmailInformation {
if x != nil {
return x.Data
}
return nil
}
type EmailInformation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt"`
}
func (x *EmailInformation) Reset() {
*x = EmailInformation{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailInformation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailInformation) ProtoMessage() {}
func (x *EmailInformation) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EmailInformation.ProtoReflect.Descriptor instead.
func (*EmailInformation) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{5}
}
func (x *EmailInformation) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *EmailInformation) GetFullName() string {
if x != nil {
return x.FullName
}
return ""
}
func (x *EmailInformation) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *EmailInformation) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
func (x *EmailInformation) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *EmailInformation) GetCreatedAt() string {
if x != nil {
return x.CreatedAt
}
return ""
}
var File_api_emailAlerts_emailAlerts_proto protoreflect.FileDescriptor
var file_api_emailAlerts_emailAlerts_proto_rawDesc = []byte{
0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
0x73, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72,
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69,
0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70,
0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x45, 0x6d, 0x61,
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x22, 0x4e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x22, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72,
0x74, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c,
0x74, 0x72, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61,
0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49,
0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0xa2, 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61,
0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xd7, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41,
0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x6d, 0x61,
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69,
0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66,
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d,
0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65,
0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42,
0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_emailAlerts_emailAlerts_proto_rawDescOnce sync.Once
file_api_emailAlerts_emailAlerts_proto_rawDescData = file_api_emailAlerts_emailAlerts_proto_rawDesc
)
func file_api_emailAlerts_emailAlerts_proto_rawDescGZIP() []byte {
file_api_emailAlerts_emailAlerts_proto_rawDescOnce.Do(func() {
file_api_emailAlerts_emailAlerts_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_emailAlerts_emailAlerts_proto_rawDescData)
})
return file_api_emailAlerts_emailAlerts_proto_rawDescData
}
var file_api_emailAlerts_emailAlerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_api_emailAlerts_emailAlerts_proto_goTypes = []interface{}{
(*EmailAlertsSubmitReq)(nil), // 0: emailAlerts.EmailAlertsSubmitReq
(*EmailAlertsSubmitResp)(nil), // 1: emailAlerts.EmailAlertsSubmitResp
(*Filtrate)(nil), // 2: emailAlerts.Filtrate
(*GetEmailInformationListReq)(nil), // 3: emailAlerts.GetEmailInformationListReq
(*GetEmailInformationListResp)(nil), // 4: emailAlerts.GetEmailInformationListResp
(*EmailInformation)(nil), // 5: emailAlerts.EmailInformation
}
var file_api_emailAlerts_emailAlerts_proto_depIdxs = []int32{
2, // 0: emailAlerts.GetEmailInformationListReq.filtrate:type_name -> emailAlerts.Filtrate
5, // 1: emailAlerts.GetEmailInformationListResp.data:type_name -> emailAlerts.EmailInformation
0, // 2: emailAlerts.EmailAlerts.EmailAlertsSubmit:input_type -> emailAlerts.EmailAlertsSubmitReq
3, // 3: emailAlerts.EmailAlerts.GetEmailInformationList:input_type -> emailAlerts.GetEmailInformationListReq
1, // 4: emailAlerts.EmailAlerts.EmailAlertsSubmit:output_type -> emailAlerts.EmailAlertsSubmitResp
4, // 5: emailAlerts.EmailAlerts.GetEmailInformationList:output_type -> emailAlerts.GetEmailInformationListResp
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_api_emailAlerts_emailAlerts_proto_init() }
func file_api_emailAlerts_emailAlerts_proto_init() {
if File_api_emailAlerts_emailAlerts_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_emailAlerts_emailAlerts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailAlertsSubmitReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailAlertsSubmitResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Filtrate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetEmailInformationListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetEmailInformationListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailInformation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_emailAlerts_emailAlerts_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_emailAlerts_emailAlerts_proto_goTypes,
DependencyIndexes: file_api_emailAlerts_emailAlerts_proto_depIdxs,
MessageInfos: file_api_emailAlerts_emailAlerts_proto_msgTypes,
}.Build()
File_api_emailAlerts_emailAlerts_proto = out.File
file_api_emailAlerts_emailAlerts_proto_rawDesc = nil
file_api_emailAlerts_emailAlerts_proto_goTypes = nil
file_api_emailAlerts_emailAlerts_proto_depIdxs = nil
}

View File

@ -1,47 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *EmailAlertsSubmitReq) Validate() error {
return nil
}
func (this *EmailAlertsSubmitResp) Validate() error {
return nil
}
func (this *Filtrate) Validate() error {
return nil
}
func (this *GetEmailInformationListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetEmailInformationListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *EmailInformation) Validate() error {
return nil
}

View File

@ -1,194 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// EmailAlertsClient is the client API for EmailAlerts service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EmailAlertsClient interface {
EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment)
// ========================= EmailInformatio ==============================
GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment)
}
type emailAlertsClient struct {
cc *triple.TripleConn
}
type EmailAlertsClientImpl struct {
EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
}
func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient {
return NewEmailAlertsClient(cc)
}
func (c *EmailAlertsClientImpl) XXX_InterfaceName() string {
return "emailAlerts.EmailAlerts"
}
func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient {
return &emailAlertsClient{cc}
}
func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) {
out := new(EmailAlertsSubmitResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out)
}
func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) {
out := new(GetEmailInformationListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out)
}
// EmailAlertsServer is the server API for EmailAlerts service.
// All implementations must embed UnimplementedEmailAlertsServer
// for forward compatibility
type EmailAlertsServer interface {
EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
// ========================= EmailInformatio ==============================
GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
mustEmbedUnimplementedEmailAlertsServer()
}
// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations.
type UnimplementedEmailAlertsServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented")
}
func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented")
}
func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &EmailAlerts_ServiceDesc
}
func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string {
return "emailAlerts.EmailAlerts"
}
func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {}
// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EmailAlertsServer will
// result in compilation errors.
type UnsafeEmailAlertsServer interface {
mustEmbedUnimplementedEmailAlertsServer()
}
func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) {
s.RegisterService(&EmailAlerts_ServiceDesc, srv)
}
func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EmailAlertsSubmitReq)
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("EmailAlertsSubmit", 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 _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEmailInformationListReq)
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("GetEmailInformationList", 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)
}
// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "emailAlerts.EmailAlerts",
HandlerType: (*EmailAlertsServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "EmailAlertsSubmit",
Handler: _EmailAlerts_EmailAlertsSubmit_Handler,
},
{
MethodName: "GetEmailInformationList",
Handler: _EmailAlerts_GetEmailInformationList_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/emailAlerts/emailAlerts.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -126,44 +126,3 @@ func (this *UsageReq) Validate() error {
func (this *UsageResp) Validate() error { func (this *UsageResp) Validate() error {
return nil return nil
} }
func (this *SecurityStatusData) Validate() error {
return nil
}
func (this *SecurityScanReq) Validate() error {
return nil
}
func (this *SecurityScanResp) Validate() error {
return nil
}
func (this *UpdateFileSecurityStatusReq) Validate() error {
for _, item := range this.SecurityStatusData {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SecurityStatusData", err)
}
}
}
return nil
}
func (this *UpdateFileSecurityStatusResp) Validate() error {
return nil
}
func (this *ManualAntiReq) Validate() error {
for _, item := range this.SecurityStatusData {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SecurityStatusData", err)
}
}
}
return nil
}
func (this *ManualAntiResp) Validate() error {
return nil
}
func (this *GetFileSecurityStatusReq) Validate() error {
return nil
}
func (this *GetFileSecurityStatusResp) Validate() error {
return nil
}

View File

@ -42,10 +42,6 @@ type FileClient interface {
Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment) Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment)
DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error) DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error)
Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment) Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment)
SecurityScan(ctx context.Context, in *SecurityScanReq, opts ...grpc_go.CallOption) (*SecurityScanResp, common.ErrorWithAttachment)
UpdateFileSecurityStatus(ctx context.Context, in *UpdateFileSecurityStatusReq, opts ...grpc_go.CallOption) (*UpdateFileSecurityStatusResp, common.ErrorWithAttachment)
ManualAnti(ctx context.Context, in *ManualAntiReq, opts ...grpc_go.CallOption) (*ManualAntiResp, common.ErrorWithAttachment)
GetFileSecurityStatus(ctx context.Context, in *GetFileSecurityStatusReq, opts ...grpc_go.CallOption) (*GetFileSecurityStatusResp, common.ErrorWithAttachment)
} }
type fileClient struct { type fileClient struct {
@ -66,10 +62,6 @@ type FileClientImpl struct {
Action func(ctx context.Context, in *ActionReq) (*ActionResp, error) Action func(ctx context.Context, in *ActionReq) (*ActionResp, error)
DirDownload func(ctx context.Context, in *DirDownloadReq) (File_DirDownloadClient, error) DirDownload func(ctx context.Context, in *DirDownloadReq) (File_DirDownloadClient, error)
Usage func(ctx context.Context, in *UsageReq) (*UsageResp, error) Usage func(ctx context.Context, in *UsageReq) (*UsageResp, error)
SecurityScan func(ctx context.Context, in *SecurityScanReq) (*SecurityScanResp, error)
UpdateFileSecurityStatus func(ctx context.Context, in *UpdateFileSecurityStatusReq) (*UpdateFileSecurityStatusResp, error)
ManualAnti func(ctx context.Context, in *ManualAntiReq) (*ManualAntiResp, error)
GetFileSecurityStatus func(ctx context.Context, in *GetFileSecurityStatusReq) (*GetFileSecurityStatusResp, error)
} }
func (c *FileClientImpl) GetDubboStub(cc *triple.TripleConn) FileClient { func (c *FileClientImpl) GetDubboStub(cc *triple.TripleConn) FileClient {
@ -189,30 +181,6 @@ func (c *fileClient) Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.Ca
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Usage", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Usage", in, out)
} }
func (c *fileClient) SecurityScan(ctx context.Context, in *SecurityScanReq, opts ...grpc_go.CallOption) (*SecurityScanResp, common.ErrorWithAttachment) {
out := new(SecurityScanResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SecurityScan", in, out)
}
func (c *fileClient) UpdateFileSecurityStatus(ctx context.Context, in *UpdateFileSecurityStatusReq, opts ...grpc_go.CallOption) (*UpdateFileSecurityStatusResp, common.ErrorWithAttachment) {
out := new(UpdateFileSecurityStatusResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateFileSecurityStatus", in, out)
}
func (c *fileClient) ManualAnti(ctx context.Context, in *ManualAntiReq, opts ...grpc_go.CallOption) (*ManualAntiResp, common.ErrorWithAttachment) {
out := new(ManualAntiResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ManualAnti", in, out)
}
func (c *fileClient) GetFileSecurityStatus(ctx context.Context, in *GetFileSecurityStatusReq, opts ...grpc_go.CallOption) (*GetFileSecurityStatusResp, common.ErrorWithAttachment) {
out := new(GetFileSecurityStatusResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetFileSecurityStatus", in, out)
}
// FileServer is the server API for File service. // FileServer is the server API for File service.
// All implementations must embed UnimplementedFileServer // All implementations must embed UnimplementedFileServer
// for forward compatibility // for forward compatibility
@ -230,10 +198,6 @@ type FileServer interface {
Action(context.Context, *ActionReq) (*ActionResp, error) Action(context.Context, *ActionReq) (*ActionResp, error)
DirDownload(*DirDownloadReq, File_DirDownloadServer) error DirDownload(*DirDownloadReq, File_DirDownloadServer) error
Usage(context.Context, *UsageReq) (*UsageResp, error) Usage(context.Context, *UsageReq) (*UsageResp, error)
SecurityScan(context.Context, *SecurityScanReq) (*SecurityScanResp, error)
UpdateFileSecurityStatus(context.Context, *UpdateFileSecurityStatusReq) (*UpdateFileSecurityStatusResp, error)
ManualAnti(context.Context, *ManualAntiReq) (*ManualAntiResp, error)
GetFileSecurityStatus(context.Context, *GetFileSecurityStatusReq) (*GetFileSecurityStatusResp, error)
mustEmbedUnimplementedFileServer() mustEmbedUnimplementedFileServer()
} }
@ -281,18 +245,6 @@ func (UnimplementedFileServer) DirDownload(*DirDownloadReq, File_DirDownloadServ
func (UnimplementedFileServer) Usage(context.Context, *UsageReq) (*UsageResp, error) { func (UnimplementedFileServer) Usage(context.Context, *UsageReq) (*UsageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Usage not implemented") return nil, status.Errorf(codes.Unimplemented, "method Usage not implemented")
} }
func (UnimplementedFileServer) SecurityScan(context.Context, *SecurityScanReq) (*SecurityScanResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SecurityScan not implemented")
}
func (UnimplementedFileServer) UpdateFileSecurityStatus(context.Context, *UpdateFileSecurityStatusReq) (*UpdateFileSecurityStatusResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateFileSecurityStatus not implemented")
}
func (UnimplementedFileServer) ManualAnti(context.Context, *ManualAntiReq) (*ManualAntiResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ManualAnti not implemented")
}
func (UnimplementedFileServer) GetFileSecurityStatus(context.Context, *GetFileSecurityStatusReq) (*GetFileSecurityStatusResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetFileSecurityStatus not implemented")
}
func (s *UnimplementedFileServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedFileServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
} }
@ -696,122 +648,6 @@ func _File_Usage_Handler(srv interface{}, ctx context.Context, dec func(interfac
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _File_SecurityScan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SecurityScanReq)
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("SecurityScan", 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 _File_UpdateFileSecurityStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateFileSecurityStatusReq)
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("UpdateFileSecurityStatus", 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 _File_ManualAnti_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ManualAntiReq)
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("ManualAnti", 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 _File_GetFileSecurityStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFileSecurityStatusReq)
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("GetFileSecurityStatus", 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)
}
// File_ServiceDesc is the grpc_go.ServiceDesc for File service. // File_ServiceDesc is the grpc_go.ServiceDesc for File service.
// It's only intended for direct use with grpc_go.RegisterService, // It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -867,22 +703,6 @@ var File_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "Usage", MethodName: "Usage",
Handler: _File_Usage_Handler, Handler: _File_Usage_Handler,
}, },
{
MethodName: "SecurityScan",
Handler: _File_SecurityScan_Handler,
},
{
MethodName: "UpdateFileSecurityStatus",
Handler: _File_UpdateFileSecurityStatus_Handler,
},
{
MethodName: "ManualAnti",
Handler: _File_ManualAnti_Handler,
},
{
MethodName: "GetFileSecurityStatus",
Handler: _File_GetFileSecurityStatus_Handler,
},
}, },
Streams: []grpc_go.StreamDesc{ Streams: []grpc_go.StreamDesc{
{ {

File diff suppressed because it is too large Load Diff

View File

@ -9,53 +9,20 @@ service Governance{
rpc List(ListReq) returns (ListResp) {} rpc List(ListReq) returns (ListResp) {}
rpc Delete(DeleteReq) returns (DeleteResp) {} rpc Delete(DeleteReq) returns (DeleteResp) {}
rpc Edit(EditReq) returns (EditResp) {} rpc Edit(EditReq) returns (EditResp) {}
rpc UpdataStatus(UpdataStatusReq) returns (UpdataStatusResp) {}
rpc GetGovernanceInfo(GetGovernanceInfoReq) returns (GetGovernanceInfoResp) {}
rpc Create(CreateReq) returns (CreateResp) {} rpc Create(CreateReq) returns (CreateResp) {}
rpc Display(DisplayReq) returns (DisplayResp) {} rpc Display(DisplayReq) returns (DisplayResp) {}
} }
message LangSetting {
string langType = 1;//
int32 isSetting = 2;//
}
message GovernanceLangData{
string title = 1;//
string attachment = 2;//
string attachmentName = 3;//
int32 isSetting = 4;//
}
message GovernanceLang{
string langType = 1;//
GovernanceLangData data = 2;//
}
message GovernanceInfo{
string uuid = 1;
repeated GovernanceLang dataByLang = 2;//
int32 sort = 3;//
int32 status = 4;//
}
message Item{ message Item{
string uuid = 1; int32 id = 1;
string title = 2; string title = 2;
string attachment = 3; string attachment = 3;
string attachmentName = 4; string attachmentName = 4;
repeated LangSetting langSetting = 5;// int32 sort = 5;
int32 sort = 6; int32 status = 6;
int32 status = 7; int64 updatedAt = 7;
int64 updatedAt = 8; string operator = 8;
string operator = 9; int32 operatorId = 9;
int32 operatorId = 10;
}
message DisplayItem{
string title = 1;
string attachment = 2;
string attachmentName = 3;
} }
message ListReq{ message ListReq{
@ -71,48 +38,34 @@ message ListResp{
} }
message DeleteReq{ message DeleteReq{
string uuid = 1; int32 id = 1;
} }
message DeleteResp{ message DeleteResp{
} }
message EditReq{ message EditReq{
string uuid = 1; uint32 id = 1;
repeated GovernanceLang dataByLang = 2; string title = 2;
int32 sort = 3; string attachment = 3;
string operator = 4; string attachmentName = 4;
int32 operatorId = 5; int32 sort = 5;
int32 status = 6;
string operator = 7;
int32 operatorId = 8;
} }
message EditResp{ message EditResp{
} }
message UpdataStatusReq{
string uuid = 1;
int32 status = 2;
string operator = 3;
int32 operatorId = 4;
}
message UpdataStatusResp{
string msg = 1;
}
message GetGovernanceInfoReq{
string uuid = 1;
}
message GetGovernanceInfoResp{
string msg = 1;
GovernanceInfo data = 2;
}
message CreateReq{ message CreateReq{
string uuid = 1; string title = 1;
repeated GovernanceLang dataByLang = 2; uint32 sort = 2;
uint32 sort = 3; string attachment = 3;
int32 status = 4; string attachmentName = 4;
string operator = 5; int32 status = 5;
int32 operatorId = 6; string operator = 6;
int32 operatorId = 7;
} }
message CreateResp{ message CreateResp{
@ -120,9 +73,9 @@ message CreateResp{
} }
message DisplayReq{ message DisplayReq{
string langType = 1;//
} }
message DisplayResp{ message DisplayResp{
repeated DisplayItem data = 1; repeated Item data = 1;
} }

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT. // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/governance/governance.proto // source: governance.proto
package governance package governance
@ -15,41 +15,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (this *LangSetting) Validate() error {
return nil
}
func (this *GovernanceLangData) Validate() error {
return nil
}
func (this *GovernanceLang) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *GovernanceInfo) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *Item) Validate() error { func (this *Item) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *DisplayItem) Validate() error {
return nil return nil
} }
func (this *ListReq) Validate() error { func (this *ListReq) Validate() error {
@ -72,43 +38,12 @@ func (this *DeleteResp) Validate() error {
return nil return nil
} }
func (this *EditReq) Validate() error { func (this *EditReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil return nil
} }
func (this *EditResp) Validate() error { func (this *EditResp) Validate() error {
return nil return nil
} }
func (this *UpdataStatusReq) Validate() error {
return nil
}
func (this *UpdataStatusResp) Validate() error {
return nil
}
func (this *GetGovernanceInfoReq) Validate() error {
return nil
}
func (this *GetGovernanceInfoResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *CreateReq) Validate() error { func (this *CreateReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil return nil
} }
func (this *CreateResp) Validate() error { func (this *CreateResp) Validate() error {

View File

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT. // Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-triple v1.0.5 // - protoc-gen-go-triple v1.0.8
// - protoc v5.26.0 // - protoc v3.20.3
// source: api/governance/governance.proto // source: governance.proto
package governance package governance
@ -31,8 +31,6 @@ type GovernanceClient interface {
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment)
GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment)
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
} }
@ -45,8 +43,6 @@ type GovernanceClientImpl struct {
List func(ctx context.Context, in *ListReq) (*ListResp, error) List func(ctx context.Context, in *ListReq) (*ListResp, error)
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error) Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
Edit func(ctx context.Context, in *EditReq) (*EditResp, error) Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
UpdataStatus func(ctx context.Context, in *UpdataStatusReq) (*UpdataStatusResp, error)
GetGovernanceInfo func(ctx context.Context, in *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error) Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error) Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
} }
@ -81,18 +77,6 @@ func (c *governanceClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_g
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
} }
func (c *governanceClient) UpdataStatus(ctx context.Context, in *UpdataStatusReq, opts ...grpc_go.CallOption) (*UpdataStatusResp, common.ErrorWithAttachment) {
out := new(UpdataStatusResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdataStatus", in, out)
}
func (c *governanceClient) GetGovernanceInfo(ctx context.Context, in *GetGovernanceInfoReq, opts ...grpc_go.CallOption) (*GetGovernanceInfoResp, common.ErrorWithAttachment) {
out := new(GetGovernanceInfoResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetGovernanceInfo", in, out)
}
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) { func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
out := new(CreateResp) out := new(CreateResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string) interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -112,8 +96,6 @@ type GovernanceServer interface {
List(context.Context, *ListReq) (*ListResp, error) List(context.Context, *ListReq) (*ListResp, error)
Delete(context.Context, *DeleteReq) (*DeleteResp, error) Delete(context.Context, *DeleteReq) (*DeleteResp, error)
Edit(context.Context, *EditReq) (*EditResp, error) Edit(context.Context, *EditReq) (*EditResp, error)
UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error)
GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error)
Create(context.Context, *CreateReq) (*CreateResp, error) Create(context.Context, *CreateReq) (*CreateResp, error)
Display(context.Context, *DisplayReq) (*DisplayResp, error) Display(context.Context, *DisplayReq) (*DisplayResp, error)
mustEmbedUnimplementedGovernanceServer() mustEmbedUnimplementedGovernanceServer()
@ -133,12 +115,6 @@ func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*Delet
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) { func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented") return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
} }
func (UnimplementedGovernanceServer) UpdataStatus(context.Context, *UpdataStatusReq) (*UpdataStatusResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdataStatus not implemented")
}
func (UnimplementedGovernanceServer) GetGovernanceInfo(context.Context, *GetGovernanceInfoReq) (*GetGovernanceInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGovernanceInfo not implemented")
}
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) { func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
} }
@ -260,64 +236,6 @@ func _Governance_Edit_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Governance_UpdataStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdataStatusReq)
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("UpdataStatus", 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 _Governance_GetGovernanceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGovernanceInfoReq)
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("GetGovernanceInfo", 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 _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { func _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateReq) in := new(CreateReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -395,14 +313,6 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "Edit", MethodName: "Edit",
Handler: _Governance_Edit_Handler, Handler: _Governance_Edit_Handler,
}, },
{
MethodName: "UpdataStatus",
Handler: _Governance_UpdataStatus_Handler,
},
{
MethodName: "GetGovernanceInfo",
Handler: _Governance_GetGovernanceInfo_Handler,
},
{ {
MethodName: "Create", MethodName: "Create",
Handler: _Governance_Create_Handler, Handler: _Governance_Create_Handler,
@ -413,5 +323,5 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
}, },
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "api/governance/governance.proto", Metadata: "governance.proto",
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,341 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/members/members.proto
package members
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *Filtrate) Validate() error {
return nil
}
func (this *LangSetting) Validate() error {
return nil
}
func (this *ManagementLangData) Validate() error {
return nil
}
func (this *ManagementLang) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *Management) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *AddManagementReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddManagementResp) Validate() error {
return nil
}
func (this *SortAndStatusManagementReq) Validate() error {
return nil
}
func (this *SortAndStatusManagementResp) Validate() error {
return nil
}
func (this *EditManagementReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *EditManagementResp) Validate() error {
return nil
}
func (this *DeleteManagementReq) Validate() error {
return nil
}
func (this *DeleteManagementResp) Validate() error {
return nil
}
func (this *GetManagementListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetManagementListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetManagementInfoReq) Validate() error {
return nil
}
func (this *GetManagementInfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *DisplayManagementReq) Validate() error {
return nil
}
func (this *DisplayManagementResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayManagementItem) Validate() error {
return nil
}
func (this *BoardOfDirectorsLang) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *BoardOfDirectorsLangData) Validate() error {
return nil
}
func (this *BoardOfDirectors) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *AddBoardOfDirectorsReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddBoardOfDirectorsResp) Validate() error {
return nil
}
func (this *SortAndStatusBoardOfDirectorsReq) Validate() error {
return nil
}
func (this *SortAndStatusBoardOfDirectorsResp) Validate() error {
return nil
}
func (this *EditBoardOfDirectorsReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *EditBoardOfDirectorsResp) Validate() error {
return nil
}
func (this *DeleteBoardOfDirectorsReq) Validate() error {
return nil
}
func (this *DeleteBoardOfDirectorsResp) Validate() error {
return nil
}
func (this *GetBoardOfDirectorsListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetBoardOfDirectorsListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetBoardOfDirectorsInfoReq) Validate() error {
return nil
}
func (this *GetBoardOfDirectorsInfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *DisplayBoardOfDirectorsReq) Validate() error {
return nil
}
func (this *DisplayBoardOfDirectorsResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayBoardOfDirectorItem) Validate() error {
return nil
}
func (this *CommitteeAppointments) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *CommitteeAppointmentsLang) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *CommitteeAppointmentsLangData) Validate() error {
return nil
}
func (this *AddCommitteeAppointmentsReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddCommitteeAppointmentsResp) Validate() error {
return nil
}
func (this *SortAndStatusCommitteeAppointmentsReq) Validate() error {
return nil
}
func (this *SortAndStatusCommitteeAppointmentsResp) Validate() error {
return nil
}
func (this *EditCommitteeAppointmentsReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *EditCommitteeAppointmentsResp) Validate() error {
return nil
}
func (this *DeleteCommitteeAppointmentsReq) Validate() error {
return nil
}
func (this *DeleteCommitteeAppointmentsResp) Validate() error {
return nil
}
func (this *GetCommitteeAppointmentsListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetCommitteeAppointmentsListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetCommitteeAppointmentsInfoReq) Validate() error {
return nil
}
func (this *GetCommitteeAppointmentsInfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *DisplayCommitteeAppointmentsReq) Validate() error {
return nil
}
func (this *DisplayCommitteeAppointmentsResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayCommitteeAppointmentsItem) Validate() error {
return nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,119 @@
syntax = "proto3";
package pressreleases;
//import "descriptor.proto";
//import "validator.proto";
option go_package = "./;pressreleases";
service PressReleases{
rpc List(ListReq) returns (ListResp) {}
rpc Display(DisplayReq) returns (DisplayResp) {}
rpc Edit(EditReq) returns (EditResp) {}
rpc Create(CreateReq) returns (CreateResp) {}
rpc Delete(DeleteReq) returns (DeleteResp) {}
rpc Get(GetReq) returns (GetResp) {}
}
message Item{
uint32 id = 1;
string title = 2;
uint64 createdAt = 3;
uint32 sort = 4;
string content = 5;
string attachment = 6;
string attachmentName = 7;
uint64 updatedAt = 8;
uint32 status = 9;
uint32 display = 10;
string summary = 11;
string operator = 12;
int32 operatorId = 13;
}
message ListReq{
string title = 1;
uint64 startTime = 2;
uint64 endTime = 3;
uint32 status = 4;
uint32 display = 5;
int32 page = 6;
int32 pageSize = 7;
}
message ListResp{
uint64 total = 1;
repeated Item data = 2;
}
message DisplayReq{
string query = 1;
uint32 page = 2;
uint32 pageSize = 3;
int64 timeStart = 4;
int64 timeEnd = 5;
int32 display = 6;
}
message DisplayResp{
int64 total = 1;
repeated Item data = 2;
}
message EditReq{
uint32 id = 1;
string title = 2;
uint64 createdAt = 3;
uint32 sort = 4;
string content = 5;
string attachment = 6;
string attachmentName = 7;
uint32 status = 8;
uint32 display = 9;
string summary = 10;
string operator = 11;
int32 operatorId = 12;
}
message EditResp{
}
message CreateReq{
string title = 1;
uint64 createdAt = 2;
uint32 sort = 3;
string content = 4;
string attachment = 5;
string attachmentName = 6;
uint32 status = 7;
uint32 display = 8;
string summary = 9;
string operator = 10;
int32 operatorId = 11;
}
message CreateResp{
}
message DeleteReq{
uint32 id = 1;
}
message DeleteResp{
}
message GetReq{
int64 id = 1;
}
message GetResp{
uint32 id = 1;
string title = 2;
uint64 createdAt = 3;
string content = 4;
string attachment = 5;
string attachmentName = 6;
string summary = 7;
}

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT. // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/pressreleases/press_releases.proto // source: press_releases.proto
package pressreleases package pressreleases
@ -15,23 +15,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
func (this *LangSetting) Validate() error { func (this *Item) Validate() error {
return nil
}
func (this *PressReleasesLang) Validate() error {
return nil
}
func (this *PressReleasesData) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *DisplayItem) Validate() error {
return nil return nil
} }
func (this *ListReq) Validate() error { func (this *ListReq) Validate() error {
@ -47,25 +31,6 @@ func (this *ListResp) Validate() error {
} }
return nil return nil
} }
func (this *SortAndStatusReq) Validate() error {
return nil
}
func (this *SortAndStatusResp) Validate() error {
return nil
}
func (this *InfoReq) Validate() error {
return nil
}
func (this *InfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *DisplayReq) Validate() error { func (this *DisplayReq) Validate() error {
return nil return nil
} }
@ -80,26 +45,12 @@ func (this *DisplayResp) Validate() error {
return nil return nil
} }
func (this *EditReq) Validate() error { func (this *EditReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil return nil
} }
func (this *EditResp) Validate() error { func (this *EditResp) Validate() error {
return nil return nil
} }
func (this *CreateReq) Validate() error { func (this *CreateReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil return nil
} }
func (this *CreateResp) Validate() error { func (this *CreateResp) Validate() error {
@ -115,10 +66,5 @@ func (this *GetReq) Validate() error {
return nil return nil
} }
func (this *GetResp) Validate() error { func (this *GetResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil return nil
} }

View File

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT. // Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-triple v1.0.5 // - protoc-gen-go-triple v1.0.8
// - protoc v5.26.0 // - protoc v3.20.3
// source: api/pressreleases/press_releases.proto // source: press_releases.proto
package pressreleases package pressreleases
@ -29,8 +29,6 @@ const _ = grpc_go.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PressReleasesClient interface { type PressReleasesClient interface {
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment)
Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment)
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
@ -44,8 +42,6 @@ type pressReleasesClient struct {
type PressReleasesClientImpl struct { type PressReleasesClientImpl struct {
List func(ctx context.Context, in *ListReq) (*ListResp, error) List func(ctx context.Context, in *ListReq) (*ListResp, error)
SortAndStatus func(ctx context.Context, in *SortAndStatusReq) (*SortAndStatusResp, error)
Info func(ctx context.Context, in *InfoReq) (*InfoResp, error)
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error) Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
Edit func(ctx context.Context, in *EditReq) (*EditResp, error) Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error) Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
@ -71,18 +67,6 @@ func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grp
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
} }
func (c *pressReleasesClient) SortAndStatus(ctx context.Context, in *SortAndStatusReq, opts ...grpc_go.CallOption) (*SortAndStatusResp, common.ErrorWithAttachment) {
out := new(SortAndStatusResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatus", in, out)
}
func (c *pressReleasesClient) Info(ctx context.Context, in *InfoReq, opts ...grpc_go.CallOption) (*InfoResp, common.ErrorWithAttachment) {
out := new(InfoResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Info", in, out)
}
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) { func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
out := new(DisplayResp) out := new(DisplayResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string) interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -118,8 +102,6 @@ func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_
// for forward compatibility // for forward compatibility
type PressReleasesServer interface { type PressReleasesServer interface {
List(context.Context, *ListReq) (*ListResp, error) List(context.Context, *ListReq) (*ListResp, error)
SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error)
Info(context.Context, *InfoReq) (*InfoResp, error)
Display(context.Context, *DisplayReq) (*DisplayResp, error) Display(context.Context, *DisplayReq) (*DisplayResp, error)
Edit(context.Context, *EditReq) (*EditResp, error) Edit(context.Context, *EditReq) (*EditResp, error)
Create(context.Context, *CreateReq) (*CreateResp, error) Create(context.Context, *CreateReq) (*CreateResp, error)
@ -136,12 +118,6 @@ type UnimplementedPressReleasesServer struct {
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) { func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented") return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
} }
func (UnimplementedPressReleasesServer) SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatus not implemented")
}
func (UnimplementedPressReleasesServer) Info(context.Context, *InfoReq) (*InfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
}
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) { func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented") return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
} }
@ -214,64 +190,6 @@ func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _PressReleases_SortAndStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SortAndStatusReq)
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("SortAndStatus", 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 _PressReleases_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoReq)
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("Info", 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 _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { func _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayReq) in := new(DisplayReq)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -428,14 +346,6 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "List", MethodName: "List",
Handler: _PressReleases_List_Handler, Handler: _PressReleases_List_Handler,
}, },
{
MethodName: "SortAndStatus",
Handler: _PressReleases_SortAndStatus_Handler,
},
{
MethodName: "Info",
Handler: _PressReleases_Info_Handler,
},
{ {
MethodName: "Display", MethodName: "Display",
Handler: _PressReleases_Display_Handler, Handler: _PressReleases_Display_Handler,
@ -458,5 +368,5 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
}, },
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "api/pressreleases/press_releases.proto", Metadata: "press_releases.proto",
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,227 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/reports/reports.proto
package reports
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *Filtrate) Validate() error {
return nil
}
func (this *FiltrateWeb) Validate() error {
return nil
}
func (this *LangSetting) Validate() error {
return nil
}
func (this *AnnualReport) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *AnnualReportLang) Validate() error {
return nil
}
func (this *QuarterlyReport) Validate() error {
for _, item := range this.LangSetting {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("LangSetting", err)
}
}
}
return nil
}
func (this *QuarterlyReportLang) Validate() error {
return nil
}
func (this *GetAnnualReportListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetAnnualReportListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetAnnualReportInfoReq) Validate() error {
return nil
}
func (this *GetAnnualReportInfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddAnnualReportReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddAnnualReportResp) Validate() error {
return nil
}
func (this *SortAndStatusAnnualReportReq) Validate() error {
return nil
}
func (this *SortAndStatusAnnualReportResp) Validate() error {
return nil
}
func (this *EditAnnualReportReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *EditAnnualReportResp) Validate() error {
return nil
}
func (this *DeleteAnnualReportReq) Validate() error {
return nil
}
func (this *DeleteAnnualReportResp) Validate() error {
return nil
}
func (this *DisplayAnnualReportReq) Validate() error {
return nil
}
func (this *DisplayAnnualReportResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayAnnualReportItem) Validate() error {
return nil
}
func (this *GetQuarterlyReportListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetQuarterlyReportListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetQuarterlyReportInfoReq) Validate() error {
return nil
}
func (this *GetQuarterlyReportInfoResp) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddQuarterlyReportReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *AddQuarterlyReportResp) Validate() error {
return nil
}
func (this *SortAndStatusQuarterlyReportReq) Validate() error {
return nil
}
func (this *SortAndStatusQuarterlyReportResp) Validate() error {
return nil
}
func (this *EditQuarterlyReportReq) Validate() error {
for _, item := range this.DataByLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DataByLang", err)
}
}
}
return nil
}
func (this *EditQuarterlyReportResp) Validate() error {
return nil
}
func (this *DeleteQuarterlyReportReq) Validate() error {
return nil
}
func (this *DeleteQuarterlyReportResp) Validate() error {
return nil
}
func (this *DisplayQuarterlyReportReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *DisplayQuarterlyReportResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayQuarterlyReportItem) Validate() error {
return nil
}

View File

@ -1,736 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// source: api/reports/reports.proto
package reports
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// ReportsClient is the client API for Reports service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ReportsClient interface {
// ==================================年度报告======================================
GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment)
GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment)
AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment)
SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, common.ErrorWithAttachment)
EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment)
DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment)
DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment)
// ==================================季度报告======================================
GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment)
GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment)
AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment)
SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, common.ErrorWithAttachment)
EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment)
DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment)
DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment)
}
type reportsClient struct {
cc *triple.TripleConn
}
type ReportsClientImpl struct {
GetAnnualReportList func(ctx context.Context, in *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
GetAnnualReportInfo func(ctx context.Context, in *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
AddAnnualReport func(ctx context.Context, in *AddAnnualReportReq) (*AddAnnualReportResp, error)
SortAndStatusAnnualReport func(ctx context.Context, in *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error)
EditAnnualReport func(ctx context.Context, in *EditAnnualReportReq) (*EditAnnualReportResp, error)
DeleteAnnualReport func(ctx context.Context, in *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
DisplayAnnualReport func(ctx context.Context, in *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
GetQuarterlyReportList func(ctx context.Context, in *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
GetQuarterlyReportInfo func(ctx context.Context, in *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
SortAndStatusQuarterlyReport func(ctx context.Context, in *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error)
EditQuarterlyReport func(ctx context.Context, in *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
DeleteQuarterlyReport func(ctx context.Context, in *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
DisplayQuarterlyReport func(ctx context.Context, in *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
}
func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient {
return NewReportsClient(cc)
}
func (c *ReportsClientImpl) XXX_InterfaceName() string {
return "reports.Reports"
}
func NewReportsClient(cc *triple.TripleConn) ReportsClient {
return &reportsClient{cc}
}
func (c *reportsClient) GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment) {
out := new(GetAnnualReportListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportList", in, out)
}
func (c *reportsClient) GetAnnualReportInfo(ctx context.Context, in *GetAnnualReportInfoReq, opts ...grpc_go.CallOption) (*GetAnnualReportInfoResp, common.ErrorWithAttachment) {
out := new(GetAnnualReportInfoResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportInfo", in, out)
}
func (c *reportsClient) AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment) {
out := new(AddAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddAnnualReport", in, out)
}
func (c *reportsClient) SortAndStatusAnnualReport(ctx context.Context, in *SortAndStatusAnnualReportReq, opts ...grpc_go.CallOption) (*SortAndStatusAnnualReportResp, common.ErrorWithAttachment) {
out := new(SortAndStatusAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusAnnualReport", in, out)
}
func (c *reportsClient) EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment) {
out := new(EditAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditAnnualReport", in, out)
}
func (c *reportsClient) DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment) {
out := new(DeleteAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteAnnualReport", in, out)
}
func (c *reportsClient) DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment) {
out := new(DisplayAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayAnnualReport", in, out)
}
func (c *reportsClient) GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment) {
out := new(GetQuarterlyReportListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportList", in, out)
}
func (c *reportsClient) GetQuarterlyReportInfo(ctx context.Context, in *GetQuarterlyReportInfoReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportInfoResp, common.ErrorWithAttachment) {
out := new(GetQuarterlyReportInfoResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportInfo", in, out)
}
func (c *reportsClient) AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(AddQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddQuarterlyReport", in, out)
}
func (c *reportsClient) SortAndStatusQuarterlyReport(ctx context.Context, in *SortAndStatusQuarterlyReportReq, opts ...grpc_go.CallOption) (*SortAndStatusQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(SortAndStatusQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SortAndStatusQuarterlyReport", in, out)
}
func (c *reportsClient) EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(EditQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditQuarterlyReport", in, out)
}
func (c *reportsClient) DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(DeleteQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteQuarterlyReport", in, out)
}
func (c *reportsClient) DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(DisplayQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayQuarterlyReport", in, out)
}
// ReportsServer is the server API for Reports service.
// All implementations must embed UnimplementedReportsServer
// for forward compatibility
type ReportsServer interface {
// ==================================年度报告======================================
GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error)
AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error)
SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error)
EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error)
DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error)
// ==================================季度报告======================================
GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error)
AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error)
EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
mustEmbedUnimplementedReportsServer()
}
// UnimplementedReportsServer must be embedded to have forward compatible implementations.
type UnimplementedReportsServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedReportsServer) GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportList not implemented")
}
func (UnimplementedReportsServer) GetAnnualReportInfo(context.Context, *GetAnnualReportInfoReq) (*GetAnnualReportInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportInfo not implemented")
}
func (UnimplementedReportsServer) AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddAnnualReport not implemented")
}
func (UnimplementedReportsServer) SortAndStatusAnnualReport(context.Context, *SortAndStatusAnnualReportReq) (*SortAndStatusAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusAnnualReport not implemented")
}
func (UnimplementedReportsServer) EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditAnnualReport not implemented")
}
func (UnimplementedReportsServer) DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnualReport not implemented")
}
func (UnimplementedReportsServer) DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayAnnualReport not implemented")
}
func (UnimplementedReportsServer) GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportList not implemented")
}
func (UnimplementedReportsServer) GetQuarterlyReportInfo(context.Context, *GetQuarterlyReportInfoReq) (*GetQuarterlyReportInfoResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportInfo not implemented")
}
func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented")
}
func (UnimplementedReportsServer) SortAndStatusQuarterlyReport(context.Context, *SortAndStatusQuarterlyReportReq) (*SortAndStatusQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SortAndStatusQuarterlyReport not implemented")
}
func (UnimplementedReportsServer) EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditQuarterlyReport not implemented")
}
func (UnimplementedReportsServer) DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteQuarterlyReport not implemented")
}
func (UnimplementedReportsServer) DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayQuarterlyReport not implemented")
}
func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedReportsServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedReportsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Reports_ServiceDesc
}
func (s *UnimplementedReportsServer) XXX_InterfaceName() string {
return "reports.Reports"
}
func (UnimplementedReportsServer) mustEmbedUnimplementedReportsServer() {}
// UnsafeReportsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReportsServer will
// result in compilation errors.
type UnsafeReportsServer interface {
mustEmbedUnimplementedReportsServer()
}
func RegisterReportsServer(s grpc_go.ServiceRegistrar, srv ReportsServer) {
s.RegisterService(&Reports_ServiceDesc, srv)
}
func _Reports_GetAnnualReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAnnualReportListReq)
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("GetAnnualReportList", 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 _Reports_GetAnnualReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAnnualReportInfoReq)
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("GetAnnualReportInfo", 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 _Reports_AddAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AddAnnualReportReq)
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("AddAnnualReport", 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 _Reports_SortAndStatusAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SortAndStatusAnnualReportReq)
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("SortAndStatusAnnualReport", 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 _Reports_EditAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditAnnualReportReq)
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("EditAnnualReport", 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 _Reports_DeleteAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAnnualReportReq)
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("DeleteAnnualReport", 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 _Reports_DisplayAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayAnnualReportReq)
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("DisplayAnnualReport", 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 _Reports_GetQuarterlyReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetQuarterlyReportListReq)
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("GetQuarterlyReportList", 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 _Reports_GetQuarterlyReportInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetQuarterlyReportInfoReq)
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("GetQuarterlyReportInfo", 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 _Reports_AddQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AddQuarterlyReportReq)
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("AddQuarterlyReport", 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 _Reports_SortAndStatusQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SortAndStatusQuarterlyReportReq)
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("SortAndStatusQuarterlyReport", 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 _Reports_EditQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditQuarterlyReportReq)
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("EditQuarterlyReport", 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 _Reports_DeleteQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteQuarterlyReportReq)
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("DeleteQuarterlyReport", 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 _Reports_DisplayQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayQuarterlyReportReq)
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("DisplayQuarterlyReport", 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)
}
// Reports_ServiceDesc is the grpc_go.ServiceDesc for Reports service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Reports_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "reports.Reports",
HandlerType: (*ReportsServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "GetAnnualReportList",
Handler: _Reports_GetAnnualReportList_Handler,
},
{
MethodName: "GetAnnualReportInfo",
Handler: _Reports_GetAnnualReportInfo_Handler,
},
{
MethodName: "AddAnnualReport",
Handler: _Reports_AddAnnualReport_Handler,
},
{
MethodName: "SortAndStatusAnnualReport",
Handler: _Reports_SortAndStatusAnnualReport_Handler,
},
{
MethodName: "EditAnnualReport",
Handler: _Reports_EditAnnualReport_Handler,
},
{
MethodName: "DeleteAnnualReport",
Handler: _Reports_DeleteAnnualReport_Handler,
},
{
MethodName: "DisplayAnnualReport",
Handler: _Reports_DisplayAnnualReport_Handler,
},
{
MethodName: "GetQuarterlyReportList",
Handler: _Reports_GetQuarterlyReportList_Handler,
},
{
MethodName: "GetQuarterlyReportInfo",
Handler: _Reports_GetQuarterlyReportInfo_Handler,
},
{
MethodName: "AddQuarterlyReport",
Handler: _Reports_AddQuarterlyReport_Handler,
},
{
MethodName: "SortAndStatusQuarterlyReport",
Handler: _Reports_SortAndStatusQuarterlyReport_Handler,
},
{
MethodName: "EditQuarterlyReport",
Handler: _Reports_EditQuarterlyReport_Handler,
},
{
MethodName: "DeleteQuarterlyReport",
Handler: _Reports_DeleteQuarterlyReport_Handler,
},
{
MethodName: "DisplayQuarterlyReport",
Handler: _Reports_DisplayQuarterlyReport_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/reports/reports.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -1,212 +0,0 @@
syntax = "proto3";
package supplier;
option go_package = "./;supplier";
// FiEE供应商微服务
service Supplier {
//curd
rpc GetSupplier(GetSupplierRequest) returns (UpdateSupplierRequest) {}
rpc CreateSupplier(CreateSupplierRequest) returns (CreateSupplierResponse) {}
rpc UpdateSupplier(UpdateSupplierRequest) returns (CreateSupplierResponse) {}
rpc GetSupplierList(GetSupplierListRequest) returns (GetSupplierListResponse) {}
//
rpc CreateOrganizeDictionary(CreateOrganizeDictionaryRequest) returns (CreateOrganizeDictionaryResponse) {}
rpc GetOrganizeDictionaryList(GetOrganizeDictionaryListRequest) returns (GetOrganizeDictionaryListResponse) {}
rpc GetOrganizeDictionaryInfo(CreateOrganizeDictionaryRequest) returns (OrganizeDictionary) {}
//
rpc GetCountryRegionList(GetCountryRegionListRequest) returns (GetCountryRegionListResponse) {}
rpc GetCountryRegionInfo(GetCountryRegionInfoRequest) returns (CountryRegion) {}
//
rpc CreateImportRecord(CreateImportRecordRequest) returns (CreateImportRecordResponse) {}
rpc GetImportRecordInfo(GetImportRecordRequest) returns (GetImportRecordResponse) {}
}
message GetImportRecordRequest{
string uuid = 1;
}
message GetImportRecordResponse{
uint64 successNum = 1;
uint64 failNum = 2;
string deriveUrl = 3;
}
message CreateImportRecordRequest{
repeated string supplierCodes = 1;
uint64 status = 2;
uint64 userId = 3;
string toLeadUrl = 4;
string deriveUrl = 5;
string uuid = 6;
uint64 successNum = 7;
uint64 failNum = 8;
}
message CreateImportRecordResponse{
uint64 id = 1;
}
message GetCountryRegionListResponse{
repeated CountryRegion data = 1;
uint64 page = 2;
uint64 pageSize = 3;
uint64 total = 4;
}
message CountryRegion{
uint64 id = 1;
string nameEN = 2;
string nameCN = 3;
string code = 4;
}
message GetCountryRegionInfoRequest{
string zhAndCode = 1;
}
message GetCountryRegionListRequest{
uint64 page = 1;
uint64 pageSize = 2;
string nameEN = 3;
string nameCN = 4;
string code = 5;
}
message OrganizeDictionary{
uint64 id = 1;
string name = 2;
}
message GetOrganizeDictionaryListResponse{
repeated OrganizeDictionary data = 1;
uint64 page = 2;
uint64 pageSize = 3;
uint64 total = 4;
}
message CreateOrganizeDictionaryRequest{
string name = 1;
}
message CreateOrganizeDictionaryResponse{
uint64 id = 1;
}
message GetOrganizeDictionaryListRequest{
uint64 page = 1;
uint64 pageSize = 2;
string name = 3;
}
message GetSupplierListRequest{
uint64 page = 1;
uint64 pageSize = 2;
uint64 owningEntityId = 3;
string supplierUniqueCode = 4;
string legalName =5;
string localName = 6;
string abbreviationName =7;
uint64 countryOrRegionId = 8;
string companyRegistrationNumber =9;
string supplierType =10;
string approvalStatus = 11;
string approvalDateStart = 12;
string approvalDateEnd = 13;
string lastReviewDateStart = 14;
string lastReviewDateEnd = 15;
string legalEntityType = 16;
string sanctionsCountryScreeningResult = 17;
string keyFinancial = 18;
string companyAddress = 19;
string primaryContact = 20;
string dataOwnerDepartment = 21;
string basicCompanyInformation = 22;
uint64 status = 23;
string updateStart = 24;
string updateEnd = 25;
string connectedParty = 26;
}
message GetSupplierListResponse{
uint64 total = 1;
repeated SupplierInfo data = 2;
uint64 page = 3;
uint64 pageSize = 4;
}
message SupplierInfo{
uint64 id = 1;
uint64 owningEntityId = 2;
string legalName = 3;
string localName = 4;
string abbreviationName = 5;
uint64 countryOrRegionId = 6;
string companyRegistrationNumber = 7;
string supplierType = 8;
string approvalStatus = 9;
string approvalDate = 10;
string lastReviewDate = 11;
string legalEntityType = 12;
string sanctionsCountryScreeningResult = 13;
string keyFinancial = 14;
string companyAddress = 15;
string primaryContact = 16;
string dataOwnerDepartment = 17;
string basicCompanyInformation = 18;
string linkAddress = 19;
string supplementaryText = 20;
repeated attachment attachments = 21;
uint64 status = 22;
string createdAt = 23;
string updatedAt = 24;
string supplierUniqueCode = 25;
string owningEntityName = 26;
string countryOrRegionCode = 27;
string connectedParty = 28;
}
message UpdateSupplierRequest{
uint64 id = 1;
uint64 owningEntityId = 2;
string legalName = 3;
string localName = 4;
string abbreviationName = 5;
uint64 countryOrRegionId = 6;
string companyRegistrationNumber = 7;
string supplierType = 8;
string approvalStatus = 9;
string approvalDate = 10;
string lastReviewDate = 11;
string legalEntityType = 12;
string sanctionsCountryScreeningResult = 13;
string keyFinancial = 14;
string companyAddress = 15;
string primaryContact = 16;
string dataOwnerDepartment = 17;
string basicCompanyInformation = 18;
string linkAddress = 19;
string supplementaryText = 20;
repeated attachment attachments = 21;
uint64 status = 22;
string connectedParty = 23;
}
message CreateSupplierRequest{
uint64 owningEntityId = 1;
string legalName = 2;
string localName = 3;
string abbreviationName = 4;
uint64 countryOrRegionId = 5;
string companyRegistrationNumber = 6;
string supplierType = 7;
string approvalStatus = 8;
string approvalDate = 9;
string lastReviewDate = 10;
string legalEntityType = 11;
string sanctionsCountryScreeningResult = 12;
string keyFinancial = 13;
string companyAddress = 14;
string primaryContact = 15;
string dataOwnerDepartment = 16;
string basicCompanyInformation = 17;
string linkAddress = 18;
string supplementaryText = 19;
repeated attachment attachments = 20;
uint64 status = 21;
string connectedParty = 22;
}
message attachment{
string url = 1;
string type = 2;
string name = 3;
}
message CreateSupplierResponse{
uint64 id = 1;
string supplierCode = 2;
}
message GetSupplierRequest{
uint64 id = 1;
}

View File

@ -1,122 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/supplier/supplier.proto
package supplier
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *GetImportRecordRequest) Validate() error {
return nil
}
func (this *GetImportRecordResponse) Validate() error {
return nil
}
func (this *CreateImportRecordRequest) Validate() error {
return nil
}
func (this *CreateImportRecordResponse) Validate() error {
return nil
}
func (this *GetCountryRegionListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *CountryRegion) Validate() error {
return nil
}
func (this *GetCountryRegionInfoRequest) Validate() error {
return nil
}
func (this *GetCountryRegionListRequest) Validate() error {
return nil
}
func (this *OrganizeDictionary) Validate() error {
return nil
}
func (this *GetOrganizeDictionaryListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *CreateOrganizeDictionaryRequest) Validate() error {
return nil
}
func (this *CreateOrganizeDictionaryResponse) Validate() error {
return nil
}
func (this *GetOrganizeDictionaryListRequest) Validate() error {
return nil
}
func (this *GetSupplierListRequest) Validate() error {
return nil
}
func (this *GetSupplierListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *SupplierInfo) Validate() error {
for _, item := range this.Attachments {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
}
}
}
return nil
}
func (this *UpdateSupplierRequest) Validate() error {
for _, item := range this.Attachments {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
}
}
}
return nil
}
func (this *CreateSupplierRequest) Validate() error {
for _, item := range this.Attachments {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Attachments", err)
}
}
}
return nil
}
func (this *Attachment) Validate() error {
return nil
}
func (this *CreateSupplierResponse) Validate() error {
return nil
}
func (this *GetSupplierRequest) Validate() error {
return nil
}

View File

@ -1,605 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v6.32.0
// source: api/supplier/supplier.proto
package supplier
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// SupplierClient is the client API for Supplier service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SupplierClient interface {
// 供应商curd
GetSupplier(ctx context.Context, in *GetSupplierRequest, opts ...grpc_go.CallOption) (*UpdateSupplierRequest, common.ErrorWithAttachment)
CreateSupplier(ctx context.Context, in *CreateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment)
UpdateSupplier(ctx context.Context, in *UpdateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment)
GetSupplierList(ctx context.Context, in *GetSupplierListRequest, opts ...grpc_go.CallOption) (*GetSupplierListResponse, common.ErrorWithAttachment)
// 组织字典
CreateOrganizeDictionary(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*CreateOrganizeDictionaryResponse, common.ErrorWithAttachment)
GetOrganizeDictionaryList(ctx context.Context, in *GetOrganizeDictionaryListRequest, opts ...grpc_go.CallOption) (*GetOrganizeDictionaryListResponse, common.ErrorWithAttachment)
GetOrganizeDictionaryInfo(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*OrganizeDictionary, common.ErrorWithAttachment)
// 国家组织
GetCountryRegionList(ctx context.Context, in *GetCountryRegionListRequest, opts ...grpc_go.CallOption) (*GetCountryRegionListResponse, common.ErrorWithAttachment)
GetCountryRegionInfo(ctx context.Context, in *GetCountryRegionInfoRequest, opts ...grpc_go.CallOption) (*CountryRegion, common.ErrorWithAttachment)
// 导入
CreateImportRecord(ctx context.Context, in *CreateImportRecordRequest, opts ...grpc_go.CallOption) (*CreateImportRecordResponse, common.ErrorWithAttachment)
GetImportRecordInfo(ctx context.Context, in *GetImportRecordRequest, opts ...grpc_go.CallOption) (*GetImportRecordResponse, common.ErrorWithAttachment)
}
type supplierClient struct {
cc *triple.TripleConn
}
type SupplierClientImpl struct {
GetSupplier func(ctx context.Context, in *GetSupplierRequest) (*UpdateSupplierRequest, error)
CreateSupplier func(ctx context.Context, in *CreateSupplierRequest) (*CreateSupplierResponse, error)
UpdateSupplier func(ctx context.Context, in *UpdateSupplierRequest) (*CreateSupplierResponse, error)
GetSupplierList func(ctx context.Context, in *GetSupplierListRequest) (*GetSupplierListResponse, error)
CreateOrganizeDictionary func(ctx context.Context, in *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error)
GetOrganizeDictionaryList func(ctx context.Context, in *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error)
GetOrganizeDictionaryInfo func(ctx context.Context, in *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error)
GetCountryRegionList func(ctx context.Context, in *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error)
GetCountryRegionInfo func(ctx context.Context, in *GetCountryRegionInfoRequest) (*CountryRegion, error)
CreateImportRecord func(ctx context.Context, in *CreateImportRecordRequest) (*CreateImportRecordResponse, error)
GetImportRecordInfo func(ctx context.Context, in *GetImportRecordRequest) (*GetImportRecordResponse, error)
}
func (c *SupplierClientImpl) GetDubboStub(cc *triple.TripleConn) SupplierClient {
return NewSupplierClient(cc)
}
func (c *SupplierClientImpl) XXX_InterfaceName() string {
return "supplier.Supplier"
}
func NewSupplierClient(cc *triple.TripleConn) SupplierClient {
return &supplierClient{cc}
}
func (c *supplierClient) GetSupplier(ctx context.Context, in *GetSupplierRequest, opts ...grpc_go.CallOption) (*UpdateSupplierRequest, common.ErrorWithAttachment) {
out := new(UpdateSupplierRequest)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetSupplier", in, out)
}
func (c *supplierClient) CreateSupplier(ctx context.Context, in *CreateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment) {
out := new(CreateSupplierResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateSupplier", in, out)
}
func (c *supplierClient) UpdateSupplier(ctx context.Context, in *UpdateSupplierRequest, opts ...grpc_go.CallOption) (*CreateSupplierResponse, common.ErrorWithAttachment) {
out := new(CreateSupplierResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSupplier", in, out)
}
func (c *supplierClient) GetSupplierList(ctx context.Context, in *GetSupplierListRequest, opts ...grpc_go.CallOption) (*GetSupplierListResponse, common.ErrorWithAttachment) {
out := new(GetSupplierListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetSupplierList", in, out)
}
func (c *supplierClient) CreateOrganizeDictionary(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*CreateOrganizeDictionaryResponse, common.ErrorWithAttachment) {
out := new(CreateOrganizeDictionaryResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrganizeDictionary", in, out)
}
func (c *supplierClient) GetOrganizeDictionaryList(ctx context.Context, in *GetOrganizeDictionaryListRequest, opts ...grpc_go.CallOption) (*GetOrganizeDictionaryListResponse, common.ErrorWithAttachment) {
out := new(GetOrganizeDictionaryListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetOrganizeDictionaryList", in, out)
}
func (c *supplierClient) GetOrganizeDictionaryInfo(ctx context.Context, in *CreateOrganizeDictionaryRequest, opts ...grpc_go.CallOption) (*OrganizeDictionary, common.ErrorWithAttachment) {
out := new(OrganizeDictionary)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetOrganizeDictionaryInfo", in, out)
}
func (c *supplierClient) GetCountryRegionList(ctx context.Context, in *GetCountryRegionListRequest, opts ...grpc_go.CallOption) (*GetCountryRegionListResponse, common.ErrorWithAttachment) {
out := new(GetCountryRegionListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCountryRegionList", in, out)
}
func (c *supplierClient) GetCountryRegionInfo(ctx context.Context, in *GetCountryRegionInfoRequest, opts ...grpc_go.CallOption) (*CountryRegion, common.ErrorWithAttachment) {
out := new(CountryRegion)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetCountryRegionInfo", in, out)
}
func (c *supplierClient) CreateImportRecord(ctx context.Context, in *CreateImportRecordRequest, opts ...grpc_go.CallOption) (*CreateImportRecordResponse, common.ErrorWithAttachment) {
out := new(CreateImportRecordResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateImportRecord", in, out)
}
func (c *supplierClient) GetImportRecordInfo(ctx context.Context, in *GetImportRecordRequest, opts ...grpc_go.CallOption) (*GetImportRecordResponse, common.ErrorWithAttachment) {
out := new(GetImportRecordResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetImportRecordInfo", in, out)
}
// SupplierServer is the server API for Supplier service.
// All implementations must embed UnimplementedSupplierServer
// for forward compatibility
type SupplierServer interface {
// 供应商curd
GetSupplier(context.Context, *GetSupplierRequest) (*UpdateSupplierRequest, error)
CreateSupplier(context.Context, *CreateSupplierRequest) (*CreateSupplierResponse, error)
UpdateSupplier(context.Context, *UpdateSupplierRequest) (*CreateSupplierResponse, error)
GetSupplierList(context.Context, *GetSupplierListRequest) (*GetSupplierListResponse, error)
// 组织字典
CreateOrganizeDictionary(context.Context, *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error)
GetOrganizeDictionaryList(context.Context, *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error)
GetOrganizeDictionaryInfo(context.Context, *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error)
// 国家组织
GetCountryRegionList(context.Context, *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error)
GetCountryRegionInfo(context.Context, *GetCountryRegionInfoRequest) (*CountryRegion, error)
// 导入
CreateImportRecord(context.Context, *CreateImportRecordRequest) (*CreateImportRecordResponse, error)
GetImportRecordInfo(context.Context, *GetImportRecordRequest) (*GetImportRecordResponse, error)
mustEmbedUnimplementedSupplierServer()
}
// UnimplementedSupplierServer must be embedded to have forward compatible implementations.
type UnimplementedSupplierServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedSupplierServer) GetSupplier(context.Context, *GetSupplierRequest) (*UpdateSupplierRequest, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSupplier not implemented")
}
func (UnimplementedSupplierServer) CreateSupplier(context.Context, *CreateSupplierRequest) (*CreateSupplierResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSupplier not implemented")
}
func (UnimplementedSupplierServer) UpdateSupplier(context.Context, *UpdateSupplierRequest) (*CreateSupplierResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSupplier not implemented")
}
func (UnimplementedSupplierServer) GetSupplierList(context.Context, *GetSupplierListRequest) (*GetSupplierListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSupplierList not implemented")
}
func (UnimplementedSupplierServer) CreateOrganizeDictionary(context.Context, *CreateOrganizeDictionaryRequest) (*CreateOrganizeDictionaryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateOrganizeDictionary not implemented")
}
func (UnimplementedSupplierServer) GetOrganizeDictionaryList(context.Context, *GetOrganizeDictionaryListRequest) (*GetOrganizeDictionaryListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetOrganizeDictionaryList not implemented")
}
func (UnimplementedSupplierServer) GetOrganizeDictionaryInfo(context.Context, *CreateOrganizeDictionaryRequest) (*OrganizeDictionary, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetOrganizeDictionaryInfo not implemented")
}
func (UnimplementedSupplierServer) GetCountryRegionList(context.Context, *GetCountryRegionListRequest) (*GetCountryRegionListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCountryRegionList not implemented")
}
func (UnimplementedSupplierServer) GetCountryRegionInfo(context.Context, *GetCountryRegionInfoRequest) (*CountryRegion, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCountryRegionInfo not implemented")
}
func (UnimplementedSupplierServer) CreateImportRecord(context.Context, *CreateImportRecordRequest) (*CreateImportRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateImportRecord not implemented")
}
func (UnimplementedSupplierServer) GetImportRecordInfo(context.Context, *GetImportRecordRequest) (*GetImportRecordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetImportRecordInfo not implemented")
}
func (s *UnimplementedSupplierServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedSupplierServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedSupplierServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Supplier_ServiceDesc
}
func (s *UnimplementedSupplierServer) XXX_InterfaceName() string {
return "supplier.Supplier"
}
func (UnimplementedSupplierServer) mustEmbedUnimplementedSupplierServer() {}
// UnsafeSupplierServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SupplierServer will
// result in compilation errors.
type UnsafeSupplierServer interface {
mustEmbedUnimplementedSupplierServer()
}
func RegisterSupplierServer(s grpc_go.ServiceRegistrar, srv SupplierServer) {
s.RegisterService(&Supplier_ServiceDesc, srv)
}
func _Supplier_GetSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSupplierRequest)
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("GetSupplier", 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 _Supplier_CreateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSupplierRequest)
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("CreateSupplier", 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 _Supplier_UpdateSupplier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSupplierRequest)
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("UpdateSupplier", 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 _Supplier_GetSupplierList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSupplierListRequest)
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("GetSupplierList", 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 _Supplier_CreateOrganizeDictionary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOrganizeDictionaryRequest)
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("CreateOrganizeDictionary", 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 _Supplier_GetOrganizeDictionaryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrganizeDictionaryListRequest)
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("GetOrganizeDictionaryList", 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 _Supplier_GetOrganizeDictionaryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOrganizeDictionaryRequest)
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("GetOrganizeDictionaryInfo", 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 _Supplier_GetCountryRegionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCountryRegionListRequest)
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("GetCountryRegionList", 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 _Supplier_GetCountryRegionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCountryRegionInfoRequest)
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("GetCountryRegionInfo", 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 _Supplier_CreateImportRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateImportRecordRequest)
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("CreateImportRecord", 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 _Supplier_GetImportRecordInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetImportRecordRequest)
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("GetImportRecordInfo", 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)
}
// Supplier_ServiceDesc is the grpc_go.ServiceDesc for Supplier service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Supplier_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "supplier.Supplier",
HandlerType: (*SupplierServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "GetSupplier",
Handler: _Supplier_GetSupplier_Handler,
},
{
MethodName: "CreateSupplier",
Handler: _Supplier_CreateSupplier_Handler,
},
{
MethodName: "UpdateSupplier",
Handler: _Supplier_UpdateSupplier_Handler,
},
{
MethodName: "GetSupplierList",
Handler: _Supplier_GetSupplierList_Handler,
},
{
MethodName: "CreateOrganizeDictionary",
Handler: _Supplier_CreateOrganizeDictionary_Handler,
},
{
MethodName: "GetOrganizeDictionaryList",
Handler: _Supplier_GetOrganizeDictionaryList_Handler,
},
{
MethodName: "GetOrganizeDictionaryInfo",
Handler: _Supplier_GetOrganizeDictionaryInfo_Handler,
},
{
MethodName: "GetCountryRegionList",
Handler: _Supplier_GetCountryRegionList_Handler,
},
{
MethodName: "GetCountryRegionInfo",
Handler: _Supplier_GetCountryRegionInfo_Handler,
},
{
MethodName: "CreateImportRecord",
Handler: _Supplier_CreateImportRecord_Handler,
},
{
MethodName: "GetImportRecordInfo",
Handler: _Supplier_GetImportRecordInfo_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/supplier/supplier.proto",
}

View File

@ -1,15 +1,10 @@
[system] [system]
Domain = "app" Domain = "fiee"
AppMode = "dev" AppMode = "debug"
HttpPort = ":8085" HttpPort = ":8085"
Host = "https://common.szjixun.cn" Host = "http://127.0.0.1:8085"
RedirectUri = "/api/redirect/url" RedirectUri = "/api/redirect/url"
ErpHost = "http://erpapi.test.fontree.cn:8081"
FieeHost = "http://erpapi.test.fontree.cn:8081"
AuthRedirectUrl = "http://saas-erp.test.fontree.cn:8081/media_account"
AuthCallback = "https://saas-test.szjixun.cn/api/fiee/media/as-oauth2callback"
CronOpen = false
proxyUrl = "http://47.84.75.255:6785"
[bos] [bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe" Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306" Sk = "d2ecaa9d75114d3b9f42b99014198306"
@ -28,7 +23,7 @@ CdnHost = "${OSS_CDN}"
[redis] [redis]
RedisDB = "2" RedisDB = "2"
RedisAddr = "127.0.0.1:6379" RedisAddr = "127.0.0.1:6379"
RedisPW = "7532T6R" RedisPW = ""
RedisDBNAme = "2" RedisDBNAme = "2"

View File

@ -2,27 +2,10 @@ dubbo:
registries: registries:
demoZK: demoZK:
protocol: zookeeper protocol: zookeeper
timeout: 3s timeout: 5s
# address: 121.229.45.214:9004
address: 127.0.0.1:2181 address: 127.0.0.1:2181
# address: 127.0.0.1:2181
# address: 114.218.158.24:2181
consumer: consumer:
filter: tracing
request-timeout: 300s
references: references:
OrderClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
params:
.accessKeyId: "SYD8-order-04"
.secretAccessKey: "Al-order-FDF112"
BundleClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
AccountClientImpl: AccountClientImpl:
protocol: tri protocol: tri
retries: 0 retries: 0
@ -31,69 +14,19 @@ dubbo:
params: params:
.accessKeyId: "Accountksl" .accessKeyId: "Accountksl"
.secretAccessKey: "BSDY-FDF1-Fontree_account" .secretAccessKey: "BSDY-FDF1-Fontree_account"
AccountFieeClientImpl: AccountFieeClientImpl:
protocol: tri protocol: tri
retries: 3 retries: 0
interface: com.fontree.microservices.common.micro.account.fiee interface: com.fontree.microservices.common.micro.account.fiee
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter # filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
PaymentCentClientImpl: # params:
# .accessKeyId: "Accountksl"
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
BundleClientImpl:
protocol: tri protocol: tri
retries: 0 retries: 0
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
CastClientImpl: CastClientImpl:
protocol: tri protocol: tri
interface: com.fontree.microservices.fiee.multicast interface: com.fontree.microservices.fiee.multicast
SecFilingsClientImpl:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl:
protocol: tri
request-timeout: 1800s
interface: com.fontree.microservices.fiee.ayrshare
FieeCronClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.cron
SupplierClientImpl:
protocol: tri
interface: com.fontree.microservices.common.supplier
logger:
zap-config:
level: error # 日志级别
development: false
disableCaller: false
disableStacktrace: false
encoding: "json"
# zap encoder 配置
encoderConfig:
messageKey: "message"
levelKey: "level"
timeKey: "time"
nameKey: "logger"
callerKey: "caller"
stacktraceKey: "stacktrace"
lineEnding: ""
levelEncoder: "capitalColor"
timeEncoder: "iso8601"
durationEncoder: "seconds"
callerEncoder: "short"
nameEncoder: ""
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
EncodeDuration: zapcore.SecondsDurationEncoder,
outputPaths:
- "stderr"
errorOutputPaths:
- "stderr"
lumberjack-config:
# 写日志的文件名称
filename: "runtime/logs/fiee.log"
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
maxSize: 5
# 日志保留的最大天数(只保留最近多少天的日志)
maxAge: 30
# 只保留最近多少个日志文件,用于控制程序总日志的大小
maxBackups: 30
# 是否使用本地时间,默认使用 UTC 时间
localTime: true
# 是否压缩日志文件,压缩方法 gzip
compress: false

View File

@ -1,16 +0,0 @@
#=========== 阿里云内容安全配置 ===========
# STS登录模式配置
# RAM用户AccessKey ID用于获取STS临时凭证
RAM_ACCESS_KEY_ID=LTAI5tNBzbeEbG1yCitvHsMb
# RAM用户AccessKey Secret
RAM_ACCESS_KEY_SECRET=G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO
# 要扮演的RAM角色ARN
RAM_ROLE_ARN=acs:ram::5828544250383902:role/content-secret
# 阿里云区域可选默认为cn-shanghai
ALIBABA_CLOUD_REGION=ap-southeast-1
# 阿里云端点可选默认为green.cn-shanghai.aliyuncs.com
ALIBABA_CLOUD_ENDPOINT=green-cip.ap-southeast-1.aliyuncs.com

Binary file not shown.

Binary file not shown.

View File

@ -48,22 +48,8 @@ dubbo:
retries: 0 retries: 0
interface: com.fontree.microservices.fiee.SecFiling interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl: AyrshareClientImpl:
request-timeout: 1800s
protocol: tri protocol: tri
interface: com.fontree.microservices.fiee.ayrshare interface: com.fontree.microservices.fiee.ayrshare
FieeCronClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.cron
FileClientImpl:
protocol: tri
retries: 0
interface: files.File
methods:
- name: SecurityScan
timeout: 120000
SupplierClientImpl:
protocol: tri
interface: com.fontree.microservices.common.supplier
logger: logger:
zap-config: zap-config:
level: error # 日志级别 level: error # 日志级别

View File

@ -50,22 +50,8 @@ dubbo:
retries: 0 retries: 0
interface: com.fontree.microservices.fiee.SecFiling interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl: AyrshareClientImpl:
request-timeout: 1800s
protocol: tri protocol: tri
interface: com.fontree.microservices.fiee.ayrshare interface: com.fontree.microservices.fiee.ayrshare
FieeCronClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.cron
FileClientImpl:
protocol: tri
retries: 0
interface: files.File
methods:
- name: SecurityScan
timeout: 120000
SupplierClientImpl:
protocol: tri
interface: com.fontree.microservices.common.supplier
logger: logger:
zap-config: zap-config:
level: error # 日志级别 level: error # 日志级别

View File

@ -48,22 +48,8 @@ dubbo:
retries: 0 retries: 0
interface: com.fontree.microservices.fiee.SecFiling interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl: AyrshareClientImpl:
request-timeout: 1800s
protocol: tri protocol: tri
interface: com.fontree.microservices.fiee.ayrshare interface: com.fontree.microservices.fiee.ayrshare
FieeCronClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.cron
FileClientImpl:
protocol: tri
retries: 0
interface: files.File
methods:
- name: SecurityScan
timeout: 120000
SupplierClientImpl:
protocol: tri
interface: com.fontree.microservices.common.supplier
logger: logger:
zap-config: zap-config:
level: error # 日志级别 level: error # 日志级别

2
go.mod
View File

@ -9,7 +9,6 @@ replace (
//github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-/utils/objstorage //github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-/utils/objstorage
github.com/fonchain/utils/voice => ../utils/voice github.com/fonchain/utils/voice => ../utils/voice
github.com/fonchain_enterprise/utils/aes => ../utils/aes github.com/fonchain_enterprise/utils/aes => ../utils/aes
github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
) )
@ -110,7 +109,6 @@ require (
github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/envoyproxy/protoc-gen-validate v0.1.0
github.com/fonchain/utils/security v0.0.0-00010101000000-000000000000 github.com/fonchain/utils/security v0.0.0-00010101000000-000000000000
github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000 github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000
github.com/fonchain_enterprise/utils/baidu v0.0.0-00010101000000-000000000000
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000 github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
github.com/gin-contrib/pprof v1.4.0 github.com/gin-contrib/pprof v1.4.0
github.com/go-redis/redis v6.15.9+incompatible github.com/go-redis/redis v6.15.9+incompatible

View File

@ -182,30 +182,6 @@ var EnMessages = map[string]string{
"未知增值服务": "Unknown value-added service", "未知增值服务": "Unknown value-added service",
"套餐未绑定增值服务": "Bundle not bound to value-added service", "套餐未绑定增值服务": "Bundle not bound to value-added service",
"网络错误": "Network error", "网络错误": "Network error",
// Website report related messages
"创建官网报告失败": "Failed to create website report",
"删除官网报告失败": "Failed to delete website report",
"官网报告列表查询失败": "Failed to query website report list",
"编辑官网报告失败": "Failed to edit website report",
"显示官网报告失败": "Failed to display website report",
// Website member management related messages
"创建官网成员失败": "Failed to create website member",
"删除官网成员失败": "Failed to delete website member",
"官网成员列表查询失败": "Failed to query website member list",
"编辑官网成员失败": "Failed to edit website member",
"显示官网成员失败": "Failed to display website member",
"编辑董事会成员失败": "Failed to edit board of directors member",
"编辑委员会成员失败": "Failed to edit committee member",
"显示委员会成员失败": "Failed to display committee member",
"编辑管理员失败": "Failed to edit administrator",
"显示管理员失败": "Failed to display administrator",
"显示董事会成员失败": "Failed to display board of directors member",
// Website email alert related messages
"提交邮箱通知失败": "Failed to submit email alert",
"获取邮箱通知列表失败": "Failed to get email information list",
} }
var DeDEMessages = map[string]string{ var DeDEMessages = map[string]string{
@ -382,30 +358,6 @@ var DeDEMessages = map[string]string{
"未知增值服务": "Unbekannter Mehrwertdienst", "未知增值服务": "Unbekannter Mehrwertdienst",
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden", "套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
"网络错误": "Netzwerkfehler", "网络错误": "Netzwerkfehler",
// Website report related messages
"创建官网报告失败": "Fehler beim Erstellen des Website-Berichts",
"删除官网报告失败": "Fehler beim Löschen des Website-Berichts",
"官网报告列表查询失败": "Fehler beim Abfragen der Website-Berichtsliste",
"编辑官网报告失败": "Fehler beim Bearbeiten des Website-Berichts",
"显示官网报告失败": "Fehler beim Anzeigen des Website-Berichts",
// Website member management related messages
"创建官网成员失败": "Fehler beim Erstellen des Website-Mitglieds",
"删除官网成员失败": "Fehler beim Löschen des Website-Mitglieds",
"官网成员列表查询失败": "Fehler beim Abfragen der Website-Mitgliederliste",
"编辑官网成员失败": "Fehler beim Bearbeiten des Website-Mitglieds",
"显示官网成员失败": "Fehler beim Anzeigen des Website-Mitglieds",
"编辑董事会成员失败": "Fehler beim Bearbeiten des Vorstandsmitglieds",
"编辑委员会成员失败": "Fehler beim Bearbeiten des Ausschussmitglieds",
"显示委员会成员失败": "Fehler beim Anzeigen des Ausschussmitglieds",
"编辑管理员失败": "Fehler beim Bearbeiten des Administrators",
"显示管理员失败": "Fehler beim Anzeigen des Administrators",
"显示董事会成员失败": "Fehler beim Anzeigen des Vorstandsmitglieds",
// Website email alert related messages
"提交邮箱通知失败": "Fehler beim Senden der E-Mail-Benachrichtigung",
"获取邮箱通知列表失败": "Fehler beim Abrufen der E-Mail-Informationsliste",
} }
var JaJPMessages = map[string]string{ var JaJPMessages = map[string]string{
@ -583,30 +535,6 @@ var JaJPMessages = map[string]string{
"未知增值服务": "未知の付加価値サービス", "未知增值服务": "未知の付加価値サービス",
"套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません", "套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません",
"网络错误": "ネットワークエラー", "网络错误": "ネットワークエラー",
// Website report related messages
"创建官网报告失败": "ウェブサイトレポートの作成に失敗しました",
"删除官网报告失败": "ウェブサイトレポートの削除に失敗しました",
"官网报告列表查询失败": "ウェブサイトレポートリストの検索に失敗しました",
"编辑官网报告失败": "ウェブサイトレポートの編集に失敗しました",
"显示官网报告失败": "ウェブサイトレポートの表示に失敗しました",
// Website member management related messages
"创建官网成员失败": "ウェブサイトメンバーの作成に失敗しました",
"删除官网成员失败": "ウェブサイトメンバーの削除に失敗しました",
"官网成员列表查询失败": "ウェブサイトメンバーリストの検索に失敗しました",
"编辑官网成员失败": "ウェブサイトメンバーの編集に失敗しました",
"显示官网成员失败": "ウェブサイトメンバーの表示に失敗しました",
"编辑董事会成员失败": "取締役会メンバーの編集に失敗しました",
"编辑委员会成员失败": "委員会メンバーの編集に失敗しました",
"显示委员会成员失败": "委員会メンバーの表示に失敗しました",
"编辑管理员失败": "管理者の編集に失敗しました",
"显示管理员失败": "管理者の表示に失敗しました",
"显示董事会成员失败": "取締役会メンバーの表示に失敗しました",
// Website email alert related messages
"提交邮箱通知失败": "メール通知の送信に失敗しました",
"获取邮箱通知列表失败": "メール情報リストの取得に失敗しました",
} }
var ZhTWMessages = map[string]string{ var ZhTWMessages = map[string]string{
@ -794,28 +722,4 @@ var ZhTWMessages = map[string]string{
"未知增值服务": "未知增值服務", "未知增值服务": "未知增值服務",
"套餐未绑定增值服务": "套餐未綁定增值服務", "套餐未绑定增值服务": "套餐未綁定增值服務",
"网络错误": "網絡錯誤", "网络错误": "網絡錯誤",
// Website report related messages
"创建官网报告失败": "創建官網報告失敗",
"删除官网报告失败": "刪除官網報告失敗",
"官网报告列表查询失败": "官網報告列表查詢失敗",
"编辑官网报告失败": "編輯官網報告失敗",
"显示官网报告失败": "顯示官網報告失敗",
// Website member management related messages
"创建官网成员失败": "創建官網成員失敗",
"删除官网成员失败": "刪除官網成員失敗",
"官网成员列表查询失败": "官網成員列表查詢失敗",
"编辑官网成员失败": "編輯官網成員失敗",
"显示官网成员失败": "顯示官網成員失敗",
"编辑董事会成员失败": "編輯董事會成員失敗",
"编辑委员会成员失败": "編輯委員會成員失敗",
"显示委员会成员失败": "顯示委員會成員失敗",
"编辑管理员失败": "編輯管理員失敗",
"显示管理员失败": "顯示管理員失敗",
"显示董事会成员失败": "顯示董事會成員失敗",
// Website email alert related messages
"提交邮箱通知失败": "提交郵箱通知失敗",
"获取邮箱通知列表失败": "獲取郵箱通知列表失敗",
} }

View File

@ -236,7 +236,6 @@ func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionI
o.Session[sessionId] = usableClients o.Session[sessionId] = usableClients
fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId])) fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId]))
fmt.Println("userIdInSession", userIdInSession) fmt.Println("userIdInSession", userIdInSession)
fmt.Println("pushed", pushed)
return return
} }
func (o *ChatRoom) GetUserIdInSession(sessionId string, withoutUserId ...int64) (userIds []int64) { func (o *ChatRoom) GetUserIdInSession(sessionId string, withoutUserId ...int64) (userIds []int64) {

View File

@ -5,19 +5,16 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"fonchain-fiee/api/aryshare"
"fonchain-fiee/api/bundle" "fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast" "fonchain-fiee/api/cast"
"fonchain-fiee/pkg/cache" "fonchain-fiee/pkg/cache"
bundleModel "fonchain-fiee/pkg/model/bundle" bundleModel "fonchain-fiee/pkg/model/bundle"
modelCast "fonchain-fiee/pkg/model/cast" modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
serverCast "fonchain-fiee/pkg/service/cast" serverCast "fonchain-fiee/pkg/service/cast"
"log" "log"
"math/rand" "math/rand"
"strconv" "strconv"
"strings"
"time" "time"
"github.com/go-redis/redis" "github.com/go-redis/redis"
@ -29,26 +26,14 @@ func InitTasks() error {
cm := GetCronManager() cm := GetCronManager()
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask) err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask) err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", PublishTask) err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", RefreshPublishStatusTask)
err = cm.AddTask("scheduledPublish", "0 */10 * * * *", ScheduledPublishTask)
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)
err = cm.AddTask("ayrshareMetricsCollector", "0 30 0 * * *", AyrshareMetricsCollectorTask)
if err != nil { if err != nil {
log.Printf("添加定时任务失败: %v", err) log.Printf("添加定时任务失败: %v", err)
} }
// 每2分钟执行一次标签观看次数更新任务
// err = cm.AddTask("updateCastTagWatchCount", "0 */1 * * * *", UpdateCastTagWatchCountTask)
cm.Start() cm.Start()
// 启动队列消费者 // 启动队列消费者
//go WorkPublishQueueConsumer() go WorkPublishQueueConsumer()
// 启动随机间隔的自动确认任务 // 启动随机间隔的自动确认任务
go AutoManuallyConfirmWorkTaskWithRandomInterval() go AutoManuallyConfirmWorkTaskWithRandomInterval()
@ -144,17 +129,6 @@ func AutoManuallyConfirmWorkTask() {
continue 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{ wordInfoRes, err := service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{
WorkUuid: req.WorkUuid, WorkUuid: req.WorkUuid,
}) })
@ -221,22 +195,6 @@ func AutoManuallyConfirmWorkTask() {
} }
} }
func RefreshWorkAnalysisApprovalStatusTask() {
resp, err := service.CastProvider.ListWorkAnalysis(context.Background(), &cast.ListWorkAnalysisReq{
Page: 1,
StatusList: []uint32{2}, // 状态为2表示待审批
PageSize: 999999,
})
if err != nil {
log.Printf("获取数据分析列表失败: %v", err)
return
}
if resp.Data == nil || len(resp.Data) == 0 {
return
}
serverCast.RefreshWorkAnalysisApproval(nil, resp.Data)
}
func ArtistAutoConfirmTask() { func ArtistAutoConfirmTask() {
now := float64(time.Now().Unix()) now := float64(time.Now().Unix())
opt := redis.ZRangeBy{ opt := redis.ZRangeBy{
@ -249,7 +207,7 @@ func ArtistAutoConfirmTask() {
return return
} }
if len(workUuids) == 0 { if len(workUuids) == 0 {
zap.L().Info("没有到期的任务") zap.L().Debug("没有到期的任务")
return return
} }
zap.L().Info("发现到期任务", zap.Int("count", len(workUuids))) zap.L().Info("发现到期任务", zap.Int("count", len(workUuids)))
@ -274,192 +232,13 @@ func RefreshPublishStatusTask() {
zap.L().Error("刷新发布状态失败", zap.Error(err)) zap.L().Error("刷新发布状态失败", zap.Error(err))
return return
} }
//zap.L().Info("刷新发布状态成功") zap.L().Info("刷新发布状态成功")
}
// PublishTask 定时发布任务从Redis Sorted Set中获取所有workUuid并根据score判断处理
func PublishTask() {
go RefreshPublishStatusTask() // 刷新发布状态
go TaskStatus() // 异步任务状态
}
func ScheduledPublishTask() {
// 加上锁
lockKey := "scheduled_publish:lock"
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), 2*time.Hour)
if !reply.Val() {
zap.L().Warn("定时发布任务正在被其他实例处理")
return
}
defer func() {
cache.RedisClient.Del(lockKey)
}()
// 获取所有数据不限制score范围
opt := redis.ZRangeBy{
Min: "-inf",
Max: "+inf",
}
// 从Redis Sorted Set中获取所有workUuid及其score
workList, err := cache.RedisClient.ZRangeByScoreWithScores(modelCast.ScheduledPublishQueueKey, opt).Result()
if err != nil {
zap.L().Error("获取定时发布任务失败", zap.Error(err))
return
}
if len(workList) == 0 {
zap.L().Info("没有定时发布任务")
return
}
publishCount := 0
expiredCount := 0
const batchSize = 8 // 每批发布8个与PublishWork的workerCount保持一致
zap.L().Info("发现定时发布任务", zap.Int("total_count", len(workList)))
zap.L().Info("发现定时发布任务 列表", zap.Any("workList", workList))
now := float64(time.Now().Unix())
publishBatch := make([]string, 0, batchSize)
// 使用 map 进行去重,防止同一个 work_uuid 被多次添加
publishedUuids := make(map[string]bool)
// 遍历所有数据根据score判断处理
for _, item := range workList {
workUuid := item.Member.(string)
score := item.Score
// 如果score小于当前时间删除但不消费不发布
if score < now {
zap.L().Info("发现过期的定时发布任务,直接删除不发布",
zap.String("work_uuid", workUuid),
zap.Float64("score", score),
zap.Float64("now", now))
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, workUuid).Result()
if delErr != nil {
zap.L().Error("删除过期定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", workUuid))
} else if removed > 0 {
expiredCount++
zap.L().Info("已删除过期定时发布任务", zap.String("work_uuid", workUuid))
}
continue
}
// 先从 Redis 中删除,采用"先删后处理"的策略,防止重复处理
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, workUuid).Result()
if delErr != nil {
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", workUuid))
continue // 删除失败则跳过,避免重复处理
}
if removed == 0 {
zap.L().Warn("定时发布任务已被删除,跳过",
zap.String("work_uuid", workUuid))
continue // 已被其他实例删除,跳过
}
// 检查是否已经在当前批次中(去重)
if publishedUuids[workUuid] {
zap.L().Warn("发现重复的定时发布任务,跳过",
zap.String("work_uuid", workUuid))
continue
}
// score大于等于当前时间添加到待发布批次
zap.L().Info("添加到发布批次",
zap.String("work_uuid", workUuid),
zap.Float64("score", score))
publishBatch = append(publishBatch, workUuid)
publishedUuids[workUuid] = true
publishCount++
// 当批次达到指定大小时,批量发布
if len(publishBatch) >= batchSize {
zap.L().Info("批量发布作品", zap.Int("batch_size", len(publishBatch)), zap.Strings("work_uuids", publishBatch))
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
WorkUuids: publishBatch,
})
zap.L().Info("批次发布完成", zap.Int("published", len(publishBatch)))
// 清空批次,准备下一批
publishBatch = make([]string, 0, batchSize)
}
}
// 处理剩余的作品(不足一批的)
if len(publishBatch) > 0 {
zap.L().Info("批量发布剩余作品", zap.Int("batch_size", len(publishBatch)), zap.Strings("work_uuids", publishBatch))
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
WorkUuids: publishBatch,
})
zap.L().Info("剩余批次发布完成", zap.Int("published", len(publishBatch)))
}
zap.L().Info("定时发布任务处理完成",
zap.Int("published_count", publishCount),
zap.Int("expired_count", expiredCount),
zap.Int("total_count", len(workList)))
}
func TaskStatus() {
var actions []string = []string{"publishBatch1", "publishBatch2"}
for _, action := range actions {
resp, err := service.CastProvider.ListTaskList(context.Background(), &cast.ListTaskListReq{
Action: action,
Status: 1,
Page: 1,
PageSize: 100,
})
if err != nil {
zap.L().Error("获取任务列表失败", zap.Error(err))
return
}
for _, v := range resp.Data {
var extraData modelCast.PublishTaskDto
if v.ExtraData == "" {
continue
}
_ = json.Unmarshal([]byte(v.ExtraData), &extraData)
var allDone = true
for _, workUuid := range extraData.WorkUuids {
infoResp, _err := service.CastProvider.WorkInfo(context.Background(), &cast.WorkInfoReq{WorkUuid: workUuid})
if _err != nil {
zap.L().Error("获取作品信息失败", zap.Error(_err))
allDone = false
break
}
if infoResp.PublishStatus != cast.PublishStatusENUM_PublishMediaStatus_DONE {
allDone = false
break
}
}
var excelUrl string
if allDone {
excelUrl, err = serverCast.PublishTaskExcel(extraData.WorkUuids, true, v.Action)
if err != nil {
zap.L().Error("生成发布任务Excel失败", zap.Error(err))
continue
}
_, err = service.CastProvider.UpsertTaskList(context.Background(), &cast.UpsertTaskListReq{
Uuid: v.Uuid,
Action: v.Action,
Url: excelUrl,
Status: 3,
})
if err != nil {
zap.L().Error("更新任务状态失败", zap.Error(err))
continue
}
zap.L().Info("任务已完成,更新状态为完成", zap.String("task_uuid", v.Uuid), zap.String("excel_url", excelUrl))
}
}
}
} }
// WorkPublishQueueConsumer 监听work:publish:queue队列的消费者 // WorkPublishQueueConsumer 监听work:publish:queue队列的消费者
func WorkPublishQueueConsumer() { func WorkPublishQueueConsumer() {
zap.L().Info("开始监听work:publish:queue队列批量处理模式") zap.L().Info("开始监听work:publish:queue队列")
const batchSize = 10
for { for {
batch := make([]string, 0, batchSize)
result, err := cache.RedisClient.BRPop(0*time.Second, modelCast.WorkPublishQueueKey).Result() result, err := cache.RedisClient.BRPop(0*time.Second, modelCast.WorkPublishQueueKey).Result()
if err != nil { if err != nil {
zap.L().Error("监听work:publish:queue队列失败", zap.Error(err)) zap.L().Error("监听work:publish:queue队列失败", zap.Error(err))
@ -473,236 +252,39 @@ func WorkPublishQueueConsumer() {
} }
workData := result[1] // BRPOP返回[key, value]value在第二个元素 workData := result[1] // BRPOP返回[key, value]value在第二个元素
zap.L().Info("从work:publish:queue队列收到第一条数据", zap.String("data", workData)) zap.L().Info("从work:publish:queue队列收到数据", zap.String("data", workData))
batch = append(batch, workData) // 处理队列数据
for len(batch) < batchSize { if err = processWorkPublishQueueData(workData); err != nil {
// 使用RPOP非阻塞获取如果没有数据立即返回 zap.L().Error("处理work:publish:queue队列数据失败", zap.Error(err), zap.String("data", workData))
data, err := cache.RedisClient.RPop(modelCast.WorkPublishQueueKey).Result()
if err == redis.Nil {
// 队列为空,跳出循环
zap.L().Info("队列暂时为空,开始处理当前批次", zap.Int("batch_size", len(batch)))
break
} else if err != nil {
zap.L().Error("从队列获取数据失败", zap.Error(err))
break
}
batch = append(batch, data)
}
zap.L().Info("收集到批次数据,准备批量处理", zap.Int("batch_size", len(batch)))
// 批量处理数据
if err = processBatchWorkPublishQueueData(batch); err != nil {
zap.L().Error("批量处理work:publish:queue队列数据失败",
zap.Error(err),
zap.Int("batch_size", len(batch)))
continue continue
} }
zap.L().Info("成功批量处理work:publish:queue队列数据", zap.Int("batch_size", len(batch))) zap.L().Info("成功处理work:publish:queue队列数据", zap.String("data", workData))
} }
} }
// processBatchWorkPublishQueueData 批量处理从work:publish:queue队列中取出的数据 // processWorkPublishQueueData 处理从work:publish:queue队列中取出的数据
func processBatchWorkPublishQueueData(batchData []string) error { func processWorkPublishQueueData(data string) error {
// 延时1秒消费 // 延时1秒消费
time.Sleep(time.Second * 1) time.Sleep(time.Second * 1)
workUuids := make([]string, 0, len(batchData))
// 解析所有数据提取workUuid
for _, data := range batchData {
var workData map[string]string var workData map[string]string
if err := json.Unmarshal([]byte(data), &workData); err != nil { _ = json.Unmarshal([]byte(data), &workData)
zap.L().Error("解析队列数据失败", zap.String("raw_data", data), zap.Error(err))
continue
}
workUuid := workData["workUuid"] workUuid := workData["workUuid"]
if workUuid == "" { if workUuid == "" {
zap.L().Error("队列数据中workUuid为空", zap.String("raw_data", data)) zap.L().Error("队列数据为空", zap.String("raw_data", data))
continue return errors.New("队列数据为空")
} }
zap.L().Info("处理发布工作队列数据", zap.String("work_uuid", workUuid))
workUuids = append(workUuids, workUuid) // 调用发布工作逻辑
}
if len(workUuids) == 0 {
zap.L().Warn("批次中没有有效的workUuid")
return errors.New("批次中没有有效的workUuid")
}
zap.L().Info("批量处理发布工作队列数据",
zap.Strings("work_uuids", workUuids),
zap.Int("count", len(workUuids)))
// 批量调用发布工作逻辑
err := serverCast.PublishWork(context.Background(), &cast.PublishReq{ err := serverCast.PublishWork(context.Background(), &cast.PublishReq{
WorkUuids: workUuids, WorkUuids: []string{workUuid},
}) })
if err != nil { if err != nil {
zap.L().Error("批量发布工作失败", zap.L().Error("发布工作失败",
zap.Strings("work_uuids", workUuids), zap.String("work_uuid", workUuid),
zap.Error(err)) zap.Error(err))
return err return err
} }
zap.L().Info("发布工作成功", zap.String("work_uuid", workUuid))
zap.L().Info("批量发布工作成功",
zap.Strings("work_uuids", workUuids),
zap.Int("count", len(workUuids)))
return nil return nil
} }
func ArtistAutoConfirmAnalysisTask() {
now := float64(time.Now().Unix())
opt := redis.ZRangeBy{
Min: fmt.Sprintf("%d", 0),
Max: fmt.Sprintf("%f", now),
}
analysisUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmAnalysisQueueKey, opt).Result()
if err != nil {
zap.L().Error("获取到期数据分析任务失败", zap.Error(err))
return
}
if len(analysisUuids) == 0 {
zap.L().Debug("没有到期的数据分析任务")
return
}
zap.L().Info("发现到期数据分析任务", zap.Int("count", len(analysisUuids)))
for _, analysisUuid := range analysisUuids {
serverCast.ProcessAnalysisTask(context.Background(), analysisUuid)
}
}
// AyrshareMetricsCollectorTask Ayrshare 指标采集定时任务(每天 00:30 和 12:30 执行)
func AyrshareMetricsCollectorTask() {
serverCast.ExecuteAyrshareMetricsCollector()
}
func RefreshArtistOrderTask() {
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo"})
}
// UpdateCastTagWatchCountTask 更新标签观看次数的定时任务每5分钟执行一次
func UpdateCastTagWatchCountTask() {
ctx := context.Background()
// 计算两天前的00:00:00
now := time.Now()
twoDaysAgo := now.AddDate(0, 0, -2)
createdAtStart := time.Date(twoDaysAgo.Year(), twoDaysAgo.Month(), twoDaysAgo.Day(), 0, 0, 0, 0, twoDaysAgo.Location())
createdAtEnd := now
// 格式化时间字符串2026-01-01 00:00:00
createdAtStartStr := createdAtStart.Format("2006-01-02 15:04:05")
createdAtEndStr := createdAtEnd.Format("2006-01-02 15:04:05")
// 调用 ListCastTags 接口,筛选 IsWatchCountCalled = 2 的数据
listReq := &cast.ListCastTagsReq{
CreatedAtStart: createdAtStartStr,
CreatedAtEnd: createdAtEndStr,
IsWatchCountCalled: 2, // 2表示未调用
Page: 1,
PageSize: 10,
}
listResp, err := service.CastProvider.ListCastTags(ctx, listReq)
if err != nil {
zap.L().Error("获取标签列表失败", zap.Error(err))
return
}
if listResp.Data == nil || len(listResp.Data) == 0 {
return
}
zap.L().Info("获取到需要更新的标签", zap.Int("count", len(listResp.Data)))
// 获取有效的 profileKey
profileKey, err := serverCast.GetValidProfileKey(ctx, []uint32{1})
if err != nil {
zap.L().Error("获取有效profileKey失败", zap.Error(err))
return
}
// 准备批量更新的数据
updateData := make([]*cast.CastTagInfo, 0, len(listResp.Data))
// 遍历每个标签,调用 RecommendHashtags 接口
for _, tag := range listResp.Data {
if tag.HashTag == "" {
zap.L().Warn("标签HashTag为空跳过", zap.String("uuid", tag.Uuid))
// 即使HashTag为空也要更新IsWatchCountCalled为1
updateData = append(updateData, &cast.CastTagInfo{
Uuid: tag.Uuid,
WatchCount: 1,
IsWatchCountCalled: 1,
})
continue
}
// 调用 RecommendHashtags 接口
recommendReq := &aryshare.RecommendHashtagsRequest{
Keyword: tag.HashTag,
ProfileKey: profileKey,
}
recommendResp, err := service.AyrshareProvider.RecommendHashtags(ctx, recommendReq)
if err != nil {
zap.L().Error("调用RecommendHashtags接口失败",
zap.String("hashTag", tag.HashTag),
zap.String("uuid", tag.Uuid),
zap.Error(err))
// 调用失败时将WatchCount更新为1IsWatchCountCalled更新为1
updateData = append(updateData, &cast.CastTagInfo{
Uuid: tag.Uuid,
WatchCount: 1,
IsWatchCountCalled: 1,
})
continue
}
// 对比返回结果,查找完全一致的标签
var matchedViewCount int64 = 0
if recommendResp.Recommendations != nil {
for _, recommendation := range recommendResp.Recommendations {
// 完全一致匹配(不区分大小写)
if strings.EqualFold(recommendation.Name, tag.HashTag) {
matchedViewCount = recommendation.ViewCount
break
}
}
}
// 根据匹配结果更新WatchCount
var watchCount int32 = 1
if matchedViewCount > 0 {
watchCount = int32(matchedViewCount)
}
// 添加到更新列表
updateData = append(updateData, &cast.CastTagInfo{
Uuid: tag.Uuid,
WatchCount: watchCount,
IsWatchCountCalled: 1,
})
zap.L().Debug("处理标签完成",
zap.String("hashTag", tag.HashTag),
zap.String("uuid", tag.Uuid),
zap.Int64("matchedViewCount", matchedViewCount),
zap.Int32("watchCount", watchCount))
}
// 如果没有需要更新的数据,直接返回
if len(updateData) == 0 {
return
}
// 批量更新标签
batchUpdateReq := &cast.BatchUpdateCastTagsReq{
Data: updateData,
}
_, err = service.CastProvider.BatchUpdateCastTags(ctx, batchUpdateReq)
if err != nil {
zap.L().Error("批量更新标签失败", zap.Error(err), zap.Int("count", len(updateData)))
return
}
}

View File

@ -155,11 +155,6 @@ const (
ErrorBalanceInsufficient = "余额不足" ErrorBalanceInsufficient = "余额不足"
) )
const (
BundlePurchaseExport = 1
BundleDetailExport = 2
)
// GetMsg 获取状态码对应信息 // GetMsg 获取状态码对应信息
func GetMsg(code int) string { func GetMsg(code int) string {
msg, ok := MsgFlags[code] msg, ok := MsgFlags[code]

View File

@ -24,8 +24,7 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
// 表头 // 表头
headers := []interface{}{ headers := []interface{}{
"艺人", "手机号", "用户编号", "作品标题", "脚本", "作品类型", "类型", "Ins", "Tiktok", "DM", "Youtube", "Bulesky", "作品状态", "验收确认类型", "艺人", "艺人手机号", "作品标题", "作品类型", "类型", "发布平台", "提交时间", "作品状态", "发布账号", "管理人",
"说明", "发布账号", "管理人", "上传时间", "待艺人确认时间", "验收确认通过时间", "发布成功时间",
} }
if err := sw.SetRow("A1", headers); err != nil { if err := sw.SetRow("A1", headers); err != nil {
return nil, err return nil, err
@ -35,13 +34,13 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
rowIndex := 2 rowIndex := 2
for _, info := range data { for _, info := range data {
// 拼接字段 // 拼接字段
//platformNames := strings.Join(func() []string { platformNames := strings.Join(func() []string {
// arr := make([]string, 0, len(info.PlatformIDs)) arr := make([]string, 0, len(info.PlatformIDs))
// for _, v := range info.PlatformIDs { for _, v := range info.PlatformIDs {
// arr = append(arr, modelCast.PlatformIDMM[int(v)]) arr = append(arr, modelCast.PlatformIDMM[int(v)])
// } }
// return arr return arr
//}(), "/") }(), "/")
var mediaAccountNames string var mediaAccountNames string
var managerNames string var managerNames string
@ -64,27 +63,14 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
row := []interface{}{ row := []interface{}{
info.ArtistName, info.ArtistName,
info.ArtistPhone, info.ArtistPhone,
info.ArtistSubNum,
info.Title, info.Title,
info.ScriptTitle,
modelCast.WorkCategoryMM[int(info.WorkCategory)], modelCast.WorkCategoryMM[int(info.WorkCategory)],
modelCast.WorkCostTypeMM[int(info.CostType)], modelCast.WorkCostTypeMM[int(info.CostType)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.InsStatus)], platformNames,
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.TiktokStatus)], info.SubmitTime,
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.DmStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.YoutubeStatus)],
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.BlueskyStatus)],
modelCast.WorkStatusMM[int(info.WorkStatus)], modelCast.WorkStatusMM[int(info.WorkStatus)],
modelCast.ConfirmTypeMM[int(info.ConfirmType)],
info.Remark,
mediaAccountNames, mediaAccountNames,
managerNames, managerNames,
info.SubmitTime,
info.Status4Time,
info.Status9Time,
info.Status6Time,
//platformNames,
//info.SubmitTime,
} }
cell, _ := excelize.CoordinatesToCellName(1, rowIndex) cell, _ := excelize.CoordinatesToCellName(1, rowIndex)

View File

@ -1,182 +0,0 @@
package logic
import (
"crypto/sha256"
"errors"
"fmt"
"strconv"
"strings"
"time"
"github.com/tealeg/xlsx"
)
type SupplierLogic struct {
OwningEntityName string `json:"owningEntityName"`
LegalName string `json:"legalName"`
LocalName string `json:"localName"`
AbbreviationName string `json:"abbreviationName"`
CountryOrRegionName string `json:"countryOrRegionName"`
CompanyRegistrationNumber string `json:"companyRegistrationNumber"`
SupplierType string `json:"supplierType"`
ApprovalStatus string `json:"approvalStatus"`
ApprovalDate string `json:"approvalDate"`
LastReviewDate string `json:"lastReviewDate"`
LegalEntityType string `json:"legalEntityType"`
SanctionsCountryScreeningResult string `json:"sanctionsCountryScreeningResult"`
KeyFinancial string `json:"keyFinancial"`
CompanyAddress string `json:"companyAddress"`
PrimaryContact string `json:"primaryContact"`
DataOwnerDepartment string `json:"dataOwnerDepartment"`
BasicCompanyInformation string `json:"basicCompanyInformation"`
SupplementaryText string `json:"supplementaryText"`
ConnectedParty string `json:"connectedParty"`
}
type ErrSupplierRes struct {
ID int `json:"id"`
LegalName string `json:"legalName"`
Remark string `json:"remark"`
}
func ImportSupplier(filePath string) ([]*SupplierLogic, error) {
xlFile, err := xlsx.OpenFile(filePath)
if err != nil {
return nil, err
}
//开辟除表头外的行数的数组内存
//遍历sheet
for sheetIndex, sheet := range xlFile.Sheets {
var resourceArr []map[int]string
//遍历每一行
//for rowIndex, row := range sheet.Rows {
for _, row := range sheet.Rows {
//开辟除表头外的行数的数组内存
objMap := make(map[int]string)
//if len(row.Cells) <= 0 || row.Cells[0].String() == "" {
// continue
//}
for cellIndex, cell := range row.Cells {
text := cell.String()
//如果是每一行的第一个单元格
objMap[cellIndex] = text
}
resourceArr = append(resourceArr, objMap)
}
if len(resourceArr) >= 2 {
suppliers, err := getListFromRaw(resourceArr)
if err != nil {
return nil, errors.New(fmt.Sprintf("页码:%d文件读取错误信息%s", sheetIndex+1, err.Error()))
}
if len(suppliers) > 0 {
return suppliers, nil
}
}
break
}
return nil, nil
}
func getListFromRaw(list []map[int]string) ([]*SupplierLogic, error) {
var entrusts []*SupplierLogic
kkMap := map[string]string{
"*使用组织/Owning Entity": "owningEntityName",
"*供应商法定全称/Legal Name": "legalName",
"供应商本地名称(如有)/Local Name (if applicable)": "localName",
"供应商简称(如有)/Abbreviation/Trade Name (if applicable)": "abbreviationName",
"*所在国家或地区/Country or Region": "countryOrRegionName",
"*公司注册编号/Company Registration Number": "companyRegistrationNumber",
"*供应商类型/Supplier Type": "supplierType",
"*准入状态/Approval Status": "approvalStatus",
"准入日期/Approval Date": "approvalDate",
"法律实体形式/Legal Entity Type": "legalEntityType",
"制裁与高风险国家筛查结果/Sanctions & High-Risk Country Screening Result": "sanctionsCountryScreeningResult",
"关键财务与付款信息/Key Financial & Payment Information": "keyFinancial",
"公司地址/Company Address": "companyAddress",
"主要联系人、职位及联系方式/Primary Contact, Position&Details": "primaryContact",
"数据维护部门&人员/Data Owner Department/Personnel": "dataOwnerDepartment",
"公司信息概要/Summary of Basic Company Information": "basicCompanyInformation",
"其他补充信息/Other Supplementary Information": "supplementaryText",
"*是否关联方/Connected party": "connectedParty",
}
keyMap := list[0]
for index, tt := range list {
if index == 0 {
continue
}
temp := &SupplierLogic{}
for i, r := range tt {
t := strings.TrimSpace(r)
if _, ok := keyMap[i]; !ok {
continue
}
keyString := strings.TrimSpace(keyMap[i])
if _, ok := kkMap[keyString]; !ok {
fmt.Println(fmt.Sprintf("行数:%d字段信息(%s)没有匹配,请以模版为准", i, keyString))
continue
}
switch kkMap[keyString] {
case "owningEntityName":
temp.OwningEntityName = t
case "legalName":
temp.LegalName = t
case "localName":
temp.LocalName = t
case "abbreviationName":
temp.AbbreviationName = t
case "countryOrRegionName":
temp.CountryOrRegionName = t
case "companyRegistrationNumber":
temp.CompanyRegistrationNumber = t
case "supplierType":
temp.SupplierType = t
case "approvalStatus":
temp.ApprovalStatus = t
case "approvalDate":
temp.ApprovalDate = ParseExcelDate(t)
//temp.ApprovalDate = t
case "legalEntityType":
temp.LegalEntityType = t
case "sanctionsCountryScreeningResult":
temp.SanctionsCountryScreeningResult = t
case "keyFinancial":
temp.KeyFinancial = t
case "companyAddress":
temp.CompanyAddress = t
case "primaryContact":
temp.PrimaryContact = t
case "dataOwnerDepartment":
temp.DataOwnerDepartment = t
case "basicCompanyInformation":
temp.BasicCompanyInformation = t
case "supplementaryText":
temp.SupplementaryText = t
case "connectedParty":
temp.ConnectedParty = t
}
}
entrusts = append(entrusts, temp)
}
sha256.New()
return entrusts, nil
}
func ParseExcelDate(v string) string {
if v == "" {
return ""
}
// 非数字,直接认为是 yyyy-mm-dd
if _, err := strconv.ParseFloat(v, 64); err != nil {
t, err := time.Parse("2006-01-02", v)
if err != nil {
return ""
}
return t.Format("2006-01-02")
}
// Excel 序列号
f, _ := strconv.ParseFloat(v, 64)
base := time.Date(1899, 12, 30, 0, 0, 0, 0, time.Local)
return base.AddDate(0, 0, int(f)).Format("2006-01-02")
}

View File

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

View File

@ -6,12 +6,6 @@ type UserWorkConfirmReq struct {
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回 ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
} }
type UserWorkAnalysisConfirmReq struct {
Uuid string `json:"uuid"` // 分析UUID
ConfirmRemark string `json:"confirmRemark"` // 确认备注
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
}
type GetBundleBalanceListResp struct { type GetBundleBalanceListResp struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`

View File

@ -22,5 +22,4 @@ type Item struct {
Domain string `json:"Domain"` Domain string `json:"Domain"`
Status int `json:"Status"` Status int `json:"Status"`
Reply string `json:"Reply"` Reply string `json:"Reply"`
UpdatedAt string `json:"UpdatedAt"`
} }

View File

@ -1,30 +1 @@
package cast package cast
type SendMessageReq struct {
MediaAccountUuid string `json:"mediaAccountUuid"`
Message string `json:"message"`
RecipientId string `json:"recipientId"`
PlatformID uint32 `json:"platformID"`
}
type PostCommentReq struct {
PublishMediaID string `json:"publishMediaID"`
Comment string `json:"comment"`
PlatformID int `json:"platformID"`
ArtistUuid string `json:"artistUuid"`
}
type GetCommentReq struct {
ArtistUuid string `json:"artistUuid"`
PublishMediaID string `json:"publishMediaID"`
}
type DeleteCommentReq struct {
ArtistUuid string `json:"artistUuid"`
CommentId string `json:"commentId"`
PlatformID int `json:"platformID"`
}
type ReplyCommentReq struct {
ArtistUuid string `json:"artistUuid"`
CommentId string `json:"commentId"`
Comment string `json:"comment"`
PlatformID int `json:"platformID"`
}

View File

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

View File

@ -1,13 +0,0 @@
package cast
type PublishTaskDto struct {
WorkUuids []string
MediaAccountUuids []string
PlatformIds []string
}
var TaskActionName = map[string]string{
"importWorkBatch": "批量导入图文",
"publishBatch1": "批量发布",
"publishBatch2": "多账号同步",
}

View File

@ -1,7 +1,5 @@
package cast package cast
import "fonchain-fiee/api/cast"
const ( const (
WorkStatusPending = 1 // 待提交 WorkStatusPending = 1 // 待提交
WorkStatusReviewing = 2 // 审核中 WorkStatusReviewing = 2 // 审核中
@ -16,13 +14,6 @@ const (
AutoConfirmQueueKey = "auto_confirm:queue" AutoConfirmQueueKey = "auto_confirm:queue"
AutoConfirmLockKey = "auto_confirm:lock:%s" AutoConfirmLockKey = "auto_confirm:lock:%s"
WorkPublishQueueKey = "work:publish:queue" WorkPublishQueueKey = "work:publish:queue"
ScheduledPublishQueueKey = "scheduled:publish:queue" // 定时发布队列
AutoConfirmAnalysisQueueKey = "auto_confirm:analysis:queue"
AutoConfirmAnalysisLockKey = "auto_confirm:analysis:lock:%s"
// AyrshareMetricsCollectorLockKey Ayrshare 指标采集任务锁
AyrshareMetricsCollectorLockKey = "ayrshare:metrics:collector:lock"
) )
var WorkCategoryMM = map[int]string{ var WorkCategoryMM = map[int]string{
@ -35,14 +26,6 @@ var WorkCostTypeMM = map[int]string{
2: "增值", 2: "增值",
} }
var PlatformPublishStatusMM = map[cast.PublishStatusENUM]string{
cast.PublishStatusENUM_PublishMediaStatus_ING: "正常",
cast.PublishStatusENUM_PublishMediaStatus_DONE: "正常",
cast.PublishStatusENUM_PublishMediaStatus_NO: "异常",
cast.PublishStatusENUM_PublishMediaStatus_FAIL: "异常",
cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION: "异常",
}
var PlatformIDMM = map[int]string{ var PlatformIDMM = map[int]string{
1: "TIKTOK", 1: "TIKTOK",
2: "YouTube", 2: "YouTube",
@ -61,10 +44,6 @@ var WorkStatusMM = map[int]string{
8: "未知", 8: "未知",
9: "验收确认", 9: "验收确认",
} }
var ConfirmTypeMM = map[int]string{
1: "艺人确认",
2: "系统确认",
}
type DMPost struct { type DMPost struct {
ID string `json:"id"` ID string `json:"id"`

View File

@ -2,7 +2,6 @@ package login
import ( import (
"errors" "errors"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -28,8 +27,6 @@ type Info struct {
Domain string `json:"domain"` Domain string `json:"domain"`
TelNum string `json:"telNum"` TelNum string `json:"telNum"`
SubscriberNumber string `json:"subscriberNumber"` SubscriberNumber string `json:"subscriberNumber"`
IdNumber string `json:"idNumber"`
InviterID uint64 `json:"inviterId"`
} }
func GetUserInfoFromC(c *gin.Context) Info { func GetUserInfoFromC(c *gin.Context) Info {

View File

@ -8,11 +8,3 @@ type MsgLangQuery struct {
Lang string `json:"lang" binding:"required"` //环境 Lang string `json:"lang" binding:"required"` //环境
Msg string `json:"msg" binding:"required"` //环境 Msg string `json:"msg" binding:"required"` //环境
} }
type OcrRes struct {
RealName string `json:"realName"`
IDNum string `json:"iDNum"`
Path string `json:"path"`
Age int `json:"age"`
Birthday string `json:"birthday"`
Sex string `json:"sex"`
}

View File

@ -1,13 +0,0 @@
package security
import "time"
type FileInfo struct {
SubmitTime time.Time
FileName string
FileUrl string
FileType string
SecurityStatus string
Describe string
ProblemTimeFrame string
}

View File

@ -1,50 +0,0 @@
package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle"
serviceCast "fonchain-fiee/pkg/service/cast"
"github.com/gin-gonic/gin"
)
func AnalysisRouter(r *gin.RouterGroup) {
// r.POST("analysis/trigger-ayrshare-metrics", serviceCast.TriggerAyrshareMetricsCollector)
analysis := r.Group("analysis")
analysis.Use(middleware.CheckWebLogin(service.AccountProvider))
{
analysis.POST("create", serviceCast.CreateWorkAnalysis)
analysis.POST("update", serviceCast.UpdateWorkAnalysis)
analysis.POST("update-status", serviceCast.UpdateWorkAnalysisStatus)
analysis.POST("detail", serviceCast.GetWorkAnalysis)
analysis.POST("latest", serviceCast.GetLatestWorkAnalysis)
analysis.POST("list", serviceCast.ListWorkAnalysis)
analysis.POST("delete", serviceCast.DeleteWorkAnalysis)
analysis.POST("export-list", serviceCast.ListWorkAnalysisExport) // 数据分析分析列表导出
analysis.POST("export-single-list", serviceCast.ListWorkAnalysisSingleExport) // 数据分析分析单个列表导出
analysis.POST("artist-data-list", serviceCast.ArtistDataList) // 艺人数据列表
analysis.POST("media-data-list", serviceCast.MediaDataList) // 自媒体数据列表
analysis.POST("data-overview", serviceCast.DataOverview) // 数据概览
analysis.POST("artist-metrics", serviceCast.ArtistMetricsSeries) // 艺人指标系列
analysis.POST("artist-metrics-single", serviceCast.ArtistMetricsDailyWindow) // 艺人指标日窗口
analysis.POST("tobe-confirmed-list", serviceCast.TobeConfirmedList) // 待确认数据列表
analysis.POST("update-approval-id", serviceCast.UpdateWorkAnalysisApprovalID) // 更新作品分析审批ID
analysis.POST("trigger-ayrshare-metrics", serviceCast.TriggerAyrshareMetricsCollector) // 手动触发 Ayrshare 指标采集任务
}
// 员工任务相关路由需要App登录验证
analysisAppRoute := r.Group("app/analysis")
analysisAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
{
analysisAppRoute.POST("list", serviceCast.ListWorkAnalysis) // 作品列表
analysisAppRoute.POST("detail", serviceCast.GetWorkAnalysis) // 作品分析详情
analysisAppRoute.POST("update-status", serviceCast.UpdateWorkAnalysisStatus) // 用户确认
analysisAppRoute.POST("check-balance", serviceCast.CheckBundleBalance) // 检查套餐余量
analysisAppRoute.POST("tobe-confirmed-list", serviceCast.TobeConfirmedList) // 待确认数据列表
analysisAppRoute.POST("work-analysis-confirm", bundle.WorkAnalysisConfirm)
}
}

View File

@ -27,7 +27,6 @@ func BundleOrderRouter(r *gin.RouterGroup) {
bundleOrderClientWebRoute.POST("bundle-order-list-download", bundle.OrderRecordsListDownload) bundleOrderClientWebRoute.POST("bundle-order-list-download", bundle.OrderRecordsListDownload)
bundleOrderClientWebRoute.POST("reconciliation-list", bundle.GetReconciliationList) bundleOrderClientWebRoute.POST("reconciliation-list", bundle.GetReconciliationList)
bundleOrderClientWebRoute.POST("reconciliation-list-download", bundle.GetReconciliationListDownload) bundleOrderClientWebRoute.POST("reconciliation-list-download", bundle.GetReconciliationListDownload)
bundleOrderClientWebRoute.POST("query-order-snapshot-information", bundle.QueryTheOrderSnapshotInformation)
// 自动创建用户和订单 // 自动创建用户和订单
bundleOrderClientWebRoute.POST("auto-create-user-order", bundle.AutoCreateUserAndOrder) bundleOrderClientWebRoute.POST("auto-create-user-order", bundle.AutoCreateUserAndOrder)
} }
@ -45,8 +44,6 @@ func BundleOrderRouter(r *gin.RouterGroup) {
bundleOrderAppRoute := bundleOrderRoute.Group("app") bundleOrderAppRoute := bundleOrderRoute.Group("app")
{ {
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature) bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
bundleOrderAppRoute.POST("verification-signature", bundle.VerificationSignature) //校验签署
bundleOrderAppRoute.POST("restart-signature", bundle.RestartSignature) //重新签署
//bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature) //bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder) bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder)
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid) bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)

View File

@ -1,29 +0,0 @@
package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
cronService "fonchain-fiee/pkg/service/cron"
"github.com/gin-gonic/gin"
)
func cronRouter(r *gin.RouterGroup) {
auth := r.Group("")
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
cron := auth.Group("cron")
{
cron.POST("createScheduleTask", cronService.CreateScheduleTask)
cron.POST("updateScheduleTask", cronService.UpdateScheduleTask)
cron.POST("pauseScheduleTask", cronService.PauseScheduleTask)
cron.POST("startScheduleTask", cronService.StartScheduleTask)
cron.POST("deleteScheduleTask", cronService.DeleteScheduleTask)
cron.POST("getListScheduleTask", cronService.GetListScheduleTask)
cron.POST("getListExecutionResult", cronService.GetListExecutionResult)
cron.POST("exportExcelExecutionResult", cronService.ExportExcelExecutionResult)
cron.POST("getListExecutionRecord", cronService.GetListExecutionRecord)
cron.POST("getScheduleTaskStatus", cronService.GetScheduleTaskStatus)
cron.POST("getImportData", cronService.GetImportData)
}
}

View File

@ -23,7 +23,6 @@ func MediaRouter(r *gin.RouterGroup) {
media.POST("refresh-token", serviceCast.RefreshToken) media.POST("refresh-token", serviceCast.RefreshToken)
media.POST("artist-info", serviceCast.ArtistInfo) media.POST("artist-info", serviceCast.ArtistInfo)
media.POST("sync-as-profile", serviceCast.SyncAsProfile) media.POST("sync-as-profile", serviceCast.SyncAsProfile)
media.POST("import-media-account", serviceCast.ImportMediaAccount)
} }
mediaNoLogin := r.Group("media") mediaNoLogin := r.Group("media")
{ {
@ -59,13 +58,6 @@ func MediaRouter(r *gin.RouterGroup) {
script.POST("delete", serviceCast.DeleteVideoScript) script.POST("delete", serviceCast.DeleteVideoScript)
} }
task := auth.Group("task")
{
task.POST("list", serviceCast.TaskList)
task.POST("delete", serviceCast.DeleteTasK)
task.POST("download", serviceCast.DownloadTaskFile)
}
layout := auth.Group("layout") layout := auth.Group("layout")
{ {
layout.POST("update", serviceCast.LayoutUpdate) layout.POST("update", serviceCast.LayoutUpdate)
@ -81,18 +73,6 @@ func MediaRouter(r *gin.RouterGroup) {
prompt.POST("delete", serviceCast.DeletePrompt) prompt.POST("delete", serviceCast.DeletePrompt)
} }
tag := auth.Group("tag")
{
tag.POST("update", serviceCast.UpdateCastTag)
tag.POST("list", serviceCast.ListCastTags)
tag.POST("import-batch", serviceCast.ImportTagBatch)
tag.POST("recalculate-quote-count", serviceCast.RecalculateCastTagQuoteCount)
// tag.POST("auto-hashtags", serviceCast.AutoHashtags)
// 这两个接口需要关闭ins通过facebook授权
// tag.POST("recommend-hashtags", serviceCast.RecommendHashtags)
// tag.POST("search-hashtags", serviceCast.SearchHashtags)
}
//AI 生图 //AI 生图
aiNoAuth := noAuth.Group("ai") aiNoAuth := noAuth.Group("ai")
{ {
@ -109,13 +89,4 @@ func MediaRouter(r *gin.RouterGroup) {
{ {
social.GET("tiktok-redirect", serviceCast.TikTokRedirect) social.GET("tiktok-redirect", serviceCast.TikTokRedirect)
} }
interact := auth.Group("interact")
{
interact.POST("send-message", serviceCast.SendMessage)
interact.POST("get-message", serviceCast.GetMessage)
interact.POST("post-comment", serviceCast.PostComment)
interact.POST("get-comment", serviceCast.GetComment)
interact.POST("delete-comment", serviceCast.DeleteComment)
interact.POST("replay-comment", serviceCast.ReplyComment)
}
} }

View File

@ -7,17 +7,13 @@ import (
"fonchain-fiee/pkg/service/account" "fonchain-fiee/pkg/service/account"
"fonchain-fiee/pkg/service/asChat" "fonchain-fiee/pkg/service/asChat"
"fonchain-fiee/pkg/service/auth" "fonchain-fiee/pkg/service/auth"
"fonchain-fiee/pkg/service/bundle"
emailAlert "fonchain-fiee/pkg/service/emailAlerts"
"fonchain-fiee/pkg/service/file" "fonchain-fiee/pkg/service/file"
"fonchain-fiee/pkg/service/governance" "fonchain-fiee/pkg/service/governance"
imports "fonchain-fiee/pkg/service/import" imports "fonchain-fiee/pkg/service/import"
"fonchain-fiee/pkg/service/lang" "fonchain-fiee/pkg/service/lang"
"fonchain-fiee/pkg/service/members"
"fonchain-fiee/pkg/service/pressreleases" "fonchain-fiee/pkg/service/pressreleases"
"fonchain-fiee/pkg/service/qr" "fonchain-fiee/pkg/service/qr"
"fonchain-fiee/pkg/service/redirect" "fonchain-fiee/pkg/service/redirect"
"fonchain-fiee/pkg/service/reports"
"fonchain-fiee/pkg/service/upload" "fonchain-fiee/pkg/service/upload"
"fonchain-fiee/pkg/service/version" "fonchain-fiee/pkg/service/version"
"net/http" "net/http"
@ -57,11 +53,8 @@ func NewRouter() *gin.Engine {
ValueAddBundleRouter(privateGroup) ValueAddBundleRouter(privateGroup)
TaskBenchRouter(privateGroup) // 新增任务台路由 TaskBenchRouter(privateGroup) // 新增任务台路由
MediaRouter(privateGroup) MediaRouter(privateGroup)
AnalysisRouter(privateGroup)
SecFilingRouter(privateGroup) SecFilingRouter(privateGroup)
app.MediaAppRouter(privateGroup) app.MediaAppRouter(privateGroup)
cronRouter(privateGroup)
SupplierRouter(privateGroup)
{ {
v1.POST("version", version.Version) //版本号公共 v1.POST("version", version.Version) //版本号公共
} }
@ -74,15 +67,12 @@ func NewRouter() *gin.Engine {
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码 privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码 privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码 privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
acRoute := privateGroup.Group("/user") acRoute := privateGroup.Group("/user")
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider)) acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
{ {
acRoute.POST("real-name", account.RealName) //实名 acRoute.POST("real-name", account.RealName) //实名
acRoute.POST("info", account.UserInfo) //用户详情 acRoute.POST("info", account.UserInfo) //用户详情
acRoute.POST("update", account.UserUpdate) //用户更新 acRoute.POST("update", account.UserUpdate) //用户更新
acRoute.POST("ocr", account.CheckIdOcr) //
acRoute.POST("write/off", account.WriteOff) //
} }
webAcRouter := privateGroup.Group("/user") webAcRouter := privateGroup.Group("/user")
//webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider)) //webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
@ -90,8 +80,6 @@ func NewRouter() *gin.Engine {
{ {
webAcRouter.POST("list", account.UserList) //用户列表 webAcRouter.POST("list", account.UserList) //用户列表
webAcRouter.POST("approval", account.UserApproval) //实名审核 webAcRouter.POST("approval", account.UserApproval) //实名审核
webAcRouter.POST("admin-update", account.AdminUpdate) //更新用户信息
webAcRouter.POST("excel/download", account.UserExcelDownload) //excel下载
} }
} }
{ {
@ -158,8 +146,7 @@ func NewRouter() *gin.Engine {
{ {
// 素材库 // 素材库
resourceRoute := v1.Group("/resource") resourceRoute := v1.Group("/resource").Use(middleware.CheckWebLogin(service.AccountProvider))
// .Use(middleware.CheckWebLogin(service.AccountProvider))
resourceRoute.GET("", file.Info) resourceRoute.GET("", file.Info)
resourceRoute.DELETE("", file.Delete) resourceRoute.DELETE("", file.Delete)
@ -174,10 +161,6 @@ func NewRouter() *gin.Engine {
resourceRoute.GET("/preview/:size/*path", file.Preview) resourceRoute.GET("/preview/:size/*path", file.Preview)
resourceRoute.GET("/list", file.List) resourceRoute.GET("/list", file.List)
resourceRoute.GET("/usage", file.Usage) resourceRoute.GET("/usage", file.Usage)
resourceRoute.POST("/security/scan", file.SecurityScan)
resourceRoute.POST("/security/updata/securitystatus", file.UpdateFileSecurityStatus)
resourceRoute.POST("/security/anti", file.ManualAnti)
resourceRoute.POST("/security/status", file.GetFileSecurityStatus)
} }
{ {
@ -185,13 +168,11 @@ func NewRouter() *gin.Engine {
governanceRoute := v1.Group("/governance") governanceRoute := v1.Group("/governance")
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider)) governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
governanceRoute.POST("/display", middleware.Cors(), governance.Display) governanceRoute.GET("/display", middleware.Cors(), governance.Display)
governanceRouteLogin.POST("/list", governance.List) governanceRouteLogin.POST("/list", governance.List)
governanceRouteLogin.POST("", governance.Create) governanceRouteLogin.POST("", governance.Create)
governanceRouteLogin.POST("/edit", governance.Edit) governanceRouteLogin.POST("/edit", governance.Edit)
governanceRouteLogin.POST("/delete", governance.Delete) governanceRouteLogin.POST("/delete", governance.Delete)
governanceRouteLogin.POST("/updataStatus", governance.UpdataStatus)
governanceRouteLogin.POST("/getGovernanceInfo", governance.GetGovernanceInfo)
} }
{ {
@ -201,72 +182,12 @@ func NewRouter() *gin.Engine {
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display) pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get) pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
pressreleasesRouteLogin.POST("/sortAndStatus", pressreleases.SortAndStatus)
pressreleasesRouteLogin.POST("/info", pressreleases.Info)
pressreleasesRouteLogin.POST("/list", pressreleases.List) pressreleasesRouteLogin.POST("/list", pressreleases.List)
pressreleasesRouteLogin.POST("", pressreleases.Create) pressreleasesRouteLogin.POST("", pressreleases.Create)
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit) pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete) pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
} }
{
// 官网报告
reportsRoute := v1.Group("/reports")
reportsRouteLogin := reportsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
// 年度报告
reportsRoute.POST("/annual/display", middleware.Cors(), reports.AnnualReportDisplay)
reportsRouteLogin.POST("/annual/create", reports.AnnualReportCreate)
reportsRouteLogin.POST("/annual/sortAndStatus", reports.AnnualReportSortAndStatus)
reportsRouteLogin.POST("/annual/info", reports.AnnualReportInfo)
reportsRouteLogin.POST("/annual/list", reports.AnnualReportList)
reportsRouteLogin.POST("/annual/delete", reports.AnnualReportDelete)
reportsRouteLogin.POST("/annual/edit", reports.AnnualReportEdit)
// 季度报告
reportsRoute.POST("/quarterly/display", middleware.Cors(), reports.QuarterlyReportDisplay)
reportsRouteLogin.POST("/quarterly/create", reports.QuarterlyReportCreate)
reportsRouteLogin.POST("/quarterly/sortAndStatus", reports.QuarterlyReportSortAndStatus)
reportsRouteLogin.POST("/quarterly/info", reports.QuarterlyReportInfo)
reportsRouteLogin.POST("/quarterly/list", reports.QuarterlyReportList)
reportsRouteLogin.POST("/quarterly/delete", reports.QuarterlyReportDelete)
reportsRouteLogin.POST("/quarterly/edit", reports.QuarterlyReportEdit)
}
{
// 邮箱通知
emailAlertsRoute := v1.Group("/emailalerts")
emailAlertsRouteLogin := emailAlertsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
emailAlertsRoute.POST("/submit", middleware.Cors(), emailAlert.EmailAlertSubmit)
emailAlertsRouteLogin.POST("/list", emailAlert.GetEmailInformationList)
}
{
// 成员管理
membersRoute := v1.Group("/members")
membersRouteLogin := membersRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
// 成员部门信息管理
membersRouteLogin.POST("/management/add", members.AddManagement)
membersRouteLogin.POST("/management/list", members.GetManagementList)
membersRouteLogin.POST("/management/info", members.GetManagementInfo)
membersRouteLogin.POST("/management/delete", members.DeleteManagement)
membersRouteLogin.POST("/management/updata", members.UpdataManagement)
membersRouteLogin.POST("/management/edit", members.EditManagement)
membersRoute.POST("/management/display", middleware.Cors(), members.DisplayManagement)
// 董事会信息管理
membersRouteLogin.POST("/boardofdirectors/add", members.AddBoardOfDirectors)
membersRouteLogin.POST("/boardofdirectors/list", members.GetBoardOfDirectorsList)
membersRouteLogin.POST("/boardofdirectors/info", members.GetBoardOfDirectorsInfo)
membersRouteLogin.POST("/boardofdirectors/delete", members.DeleteBoardOfDirectors)
membersRouteLogin.POST("/boardofdirectors/updata", members.UpdataBoardOfDirectors)
membersRouteLogin.POST("/boardofdirectors/edit", members.EditBoardOfDirectors)
membersRoute.POST("/boardofdirectors/display", middleware.Cors(), members.DisplayBoardOfDirectors)
// 委员会任命管理
membersRouteLogin.POST("/committeeappointments/add", members.AddCommitteeAppointments)
membersRouteLogin.POST("/committeeappointments/list", members.GetCommitteeAppointmentsList)
membersRouteLogin.POST("/committeeappointments/info", members.GetCommitteeAppointmentsInfo)
membersRouteLogin.POST("/committeeappointments/delete", members.DeleteCommitteeAppointments)
membersRouteLogin.POST("/committeeappointments/updata", members.UpdataCommitteeAppointments)
membersRouteLogin.POST("/committeeappointments/edit", members.EditCommitteeAppointments)
membersRoute.POST("/committeeappointments/display", middleware.Cors(), members.DisplayCommitteeAppointments)
}
{ {
importRoute := v1.Group("/import") importRoute := v1.Group("/import")
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
@ -285,10 +206,6 @@ func NewRouter() *gin.Engine {
importRoute.GET("generate/photo/test2", imports.Test2) importRoute.GET("generate/photo/test2", imports.Test2)
} }
{
//健康检测
v1.GET("health", bundle.HealthCheck)
}
//静态文件 //静态文件
r.StaticFS("/api/fiee/static", http.Dir("./runtime")) r.StaticFS("/api/fiee/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) { r.NoRoute(func(c *gin.Context) {

View File

@ -1,35 +0,0 @@
package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/supplier"
"github.com/gin-gonic/gin"
)
func SupplierRouter(r *gin.RouterGroup) {
supplierRoute := r.Group("supplier/web")
supplierRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
{
supplierRoute.POST("info", supplier.GetSupplier)
supplierRoute.POST("create", supplier.CreateSupplier)
supplierRoute.POST("update", supplier.UpdateSupplier)
supplierRoute.POST("list", supplier.GetSupplierList)
}
{
supplierRoute.POST("dictionary/create", supplier.CreateOrganizeDictionary)
supplierRoute.POST("dictionary/list", supplier.GetOrganizeDictionaryList)
}
{
supplierRoute.POST("country-region/list", supplier.GetCountryRegionList)
}
{
supplierRoute.POST("import/record", supplier.CreateImportRecord)
supplierRoute.POST("import/info", supplier.GetImportRecordInfo)
supplierRoute.POST("export/list", supplier.GetExportList)
}
}

View File

@ -1,18 +1,11 @@
package security package security
import ( import (
"sync"
"time"
"github.com/fonchain/utils/security" "github.com/fonchain/utils/security"
"go.uber.org/zap" "go.uber.org/zap"
) )
var ( var ImageScanner *security.ImageScanner
ImageScanner *security.ImageScanner
globalConfig *security.Config
configMutex sync.RWMutex
)
func Init() { func Init() {
config, err := security.LoadConfigFromFile("../conf/alibabacloud.env") config, err := security.LoadConfigFromFile("../conf/alibabacloud.env")
@ -32,37 +25,3 @@ func Init() {
panic(err) panic(err)
} }
} }
// GetGlobalConfig 获取全局配置实例(单例模式)
func GetGlobalConfig(configFile string) (*security.Config, error) {
configMutex.RLock()
if globalConfig != nil {
// 检查 token 是否还有效
if !globalConfig.TokenExpiration.IsZero() &&
time.Now().Before(globalConfig.TokenExpiration.Add(-5*time.Minute)) {
configMutex.RUnlock()
return globalConfig, nil
}
}
configMutex.RUnlock()
// 需要重新加载或刷新
configMutex.Lock()
defer configMutex.Unlock()
// 双重检查
if globalConfig != nil &&
!globalConfig.TokenExpiration.IsZero() &&
time.Now().Before(globalConfig.TokenExpiration.Add(-5*time.Minute)) {
return globalConfig, nil
}
// 加载配置
config, err := security.LoadConfigFromFile(configFile)
if err != nil {
return nil, err
}
globalConfig = config
return globalConfig, nil
}

View File

@ -2,74 +2,16 @@ package account
import ( import (
"context" "context"
"encoding/base64"
"errors"
"fmt" "fmt"
account "fonchain-fiee/api/accountFiee" account "fonchain-fiee/api/accountFiee"
"fonchain-fiee/pkg/e" "fonchain-fiee/pkg/e"
"fonchain-fiee/pkg/model/login" "fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/model/query"
"fonchain-fiee/pkg/model/union" "fonchain-fiee/pkg/model/union"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle"
"fonchain-fiee/pkg/utils"
"io/ioutil"
"net/http"
"time"
"github.com/fonchain_enterprise/utils/baidu"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding" "github.com/gin-gonic/gin/binding"
) )
func UserExcelDownload(c *gin.Context) {
var req account.UserListRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
req.Domain = "app"
res, err := service.AccountFieeProvider.UserList(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
titleList := []string{
"用户编号", "姓名", "性别", "国籍", "手机号", "证件类型", "有效期至", "证件号码", "出生日期", "年龄", "现所在地", "注册时间", "审核时间", "审核状态", "不通过备注",
}
var dataList []interface{}
for _, i := range res.UserList {
DocumentType := bundle.GetDocumentTypeText(i.DocumentType)
Status := bundle.GetUserStatusText(i.Status)
data := []any{
i.SubNum,
i.Name,
i.Sex,
i.Nationality,
i.TelNum,
DocumentType,
i.Validity,
i.IdNumber,
i.DateOfBirth,
i.Age,
i.PlaceOfResidence,
i.RegistrationTime,
i.AuditTime,
Status,
i.NotPassRemarks,
}
dataList = append(dataList, &data)
}
content, err := utils.ToExcelByType(titleList, dataList, "slice", "")
if err != nil {
service.Error(c, err)
return
}
utils.ResponseXls(c, content, "艺人管理")
return
}
func UserApproval(c *gin.Context) { func UserApproval(c *gin.Context) {
var req account.CheckRealNameRequest var req account.CheckRealNameRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil { if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
@ -130,9 +72,6 @@ func UserUpdate(c *gin.Context) {
Domain: req.Domain, Domain: req.Domain,
Language: req.Language, Language: req.Language,
NickName: req.NickName, NickName: req.NickName,
Email: req.Email,
AbroadTel: req.AbroadTel,
AbroadTelAreaCode: req.AbroadTelAreaCode,
}) })
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
@ -142,139 +81,6 @@ func UserUpdate(c *gin.Context) {
return 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)
return
}
service.Success(c, res)
return
}
func CheckIdOcr(c *gin.Context) {
var req account.RealNameRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
res, err := getFormIdCar(req.CertificatePicture)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
func WriteOff(c *gin.Context) {
var req account.WriteOffRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
user := login.GetUserInfoFromC(c)
res, err := service.AccountFieeProvider.WriteOff(c, &account.WriteOffRequest{
Id: user.ID,
})
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
/**
* 获取身份证OCR识别结果
* @param realIDImgA string - 身份证图片的URL地址
* @return res query.OcrRes - OCR识别结果结构体包含身份证号姓名图片路径年龄生日性别等信息
* @return err error - 错误信息如果请求或处理过程中出现错误则返回错误
*/
func getFormIdCar(realIDImgA string) (res query.OcrRes, err error) {
// 发送HTTP GET请求获取图片
resObj, err := http.Get(realIDImgA)
if err != nil {
fmt.Println("网络请求错误:", err)
return
}
// 确保在函数返回前关闭响应体
defer resObj.Body.Close()
// 读取图片数据
imageData, err := ioutil.ReadAll(resObj.Body)
if err != nil {
fmt.Println("读取图片数据错误:", err)
return
}
// 将图片数据转换为base64编码
base64Data := base64.StdEncoding.EncodeToString(imageData)
fmt.Println(base64Data)
// 调用百度OCR接口识别身份证信息
result, err := baidu.OcrGetIdCard(base64Data, "front")
if err != nil {
return
}
// 构造并返回OCR识别结果
res = query.OcrRes{
IDNum: result.IdCard, // 身份证号
RealName: result.Name, // 姓名
Path: result.Path, // 图片路径
Age: result.Age, // 年龄
Birthday: dd(result.Birthday), // 生日
Sex: result.Sex, // 性别
}
return res, nil
}
// dd 实在没时间好好写代码
func dd(dateStr string) string {
// 1. 解析字符串为time.Time类型
// 注意Go的布局字符串必须使用参考时间"2006-01-02 15:04:05"的格式
t, err := time.Parse("20060102", dateStr)
if err != nil {
fmt.Printf("日期解析错误: %v\n", err)
return ""
}
// 2. 格式化为目标格式
formattedDate := t.Format("2006-01-02")
fmt.Println("原始日期:", dateStr)
fmt.Println("转换后日期:", formattedDate)
return formattedDate
}
// SendMsg 用户发送验证码 // SendMsg 用户发送验证码
func SendMsg(c *gin.Context) { func SendMsg(c *gin.Context) {
var req account.SendMsgRequest var req account.SendMsgRequest
@ -292,11 +98,6 @@ func SendMsg(c *gin.Context) {
} }
req.Project = "fiee" req.Project = "fiee"
req.TelNum = req.Zone + req.TelNum req.TelNum = req.Zone + req.TelNum
//todo 审核使用账号
if req.TelNum == "8618888888888" {
service.Success1(c, "发送成功", &account.SendMsgStatusResponse{})
return
}
if req.Zone != e.ZoneCn && req.Zone != "" { if req.Zone != e.ZoneCn && req.Zone != "" {
// ============================== redis检查ip开始 // ============================== redis检查ip开始
ip := c.ClientIP() ip := c.ClientIP()
@ -341,6 +142,7 @@ func SendMsg(c *gin.Context) {
//cache.RedisClient.Incr(daykey) //cache.RedisClient.Incr(daykey)
//cache.RedisClient.Incr(minutekey) //cache.RedisClient.Incr(minutekey)
// ============================== redis检查ip结束 // ============================== redis检查ip结束
tempReq := &account.SendNationMsgRequest{ tempReq := &account.SendNationMsgRequest{
Domain: req.Domain, Domain: req.Domain,
TelNum: req.TelNum, TelNum: req.TelNum,
@ -385,17 +187,6 @@ func RealName(c *gin.Context) {
} }
user := login.GetUserInfoFromC(c) user := login.GetUserInfoFromC(c)
req.Id = user.ID req.Id = user.ID
if req.DocumentType == 2 {
if len(req.IdNumber) != 18 {
service.Error(c, errors.New("身份证号格式错误"))
return
}
} else {
if req.IdNumber == "" {
service.Error(c, errors.New("证件号码不能为空"))
return
}
}
res, err := service.AccountFieeProvider.RealName(context.Background(), &req) res, err := service.AccountFieeProvider.RealName(context.Background(), &req)
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
@ -464,31 +255,6 @@ func ValidateCaptcha(c *gin.Context) {
service.Success(c, res) 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) { func UserLogout(c *gin.Context) {
req := account.DecryptJwtRequest{} req := account.DecryptJwtRequest{}
req.Token = c.GetHeader(e.Authorization) req.Token = c.GetHeader(e.Authorization)
@ -508,16 +274,6 @@ func UserRegister(c *gin.Context) {
return return
} }
req.Domain = "app" 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) res, err := service.AccountFieeProvider.Register(context.Background(), &req)
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
@ -533,10 +289,6 @@ func UserRegister(c *gin.Context) {
service.Error(c, err) service.Error(c, err)
return return
} }
if tokenInfo.AccountInfo.WriteOff == true {
service.Error(c, errors.New("此账号已注销,无法登录"))
return
}
res.Token = tokenInfo.Token res.Token = tokenInfo.Token
service.Success(c, res) service.Success(c, res)
return return

View File

@ -8,7 +8,6 @@ import (
"fonchain-fiee/pkg/model/login" "fonchain-fiee/pkg/model/login"
modelQwen "fonchain-fiee/pkg/model/qwen" modelQwen "fonchain-fiee/pkg/model/qwen"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"regexp" "regexp"
"strings" "strings"
"time" "time"
@ -218,8 +217,6 @@ func OneText(ctx *gin.Context) {
return return
} }
resultAll.Title, resultAll.Content = extractTitleAndContent(req.Prompt) resultAll.Title, resultAll.Content = extractTitleAndContent(req.Prompt)
resultAll.Title = utils.TruncateString(resultAll.Title, 100)
resultAll.Content = utils.TruncateString(resultAll.Content, 200)
for _, v := range result.Output.Results { for _, v := range result.Output.Results {
resultAll.Result = append(resultAll.Result, struct { resultAll.Result = append(resultAll.Result, struct {
Url string `json:"url"` Url string `json:"url"`
@ -387,8 +384,6 @@ func MoreText(ctx *gin.Context) {
} }
resultAll.Content = contentRes.content resultAll.Content = contentRes.content
resultAll.Title = utils.TruncateString(resultAll.Title, 100)
resultAll.Content = utils.TruncateString(resultAll.Content, 200)
// 处理图片结果 // 处理图片结果
if imageRes.err != nil { if imageRes.err != nil {
service.Error(ctx, fmt.Errorf("生成图片失败: %v", imageRes.err)) service.Error(ctx, fmt.Errorf("生成图片失败: %v", imageRes.err))

View File

@ -630,13 +630,13 @@ func (a *ChatHandler) UserSwitchAutoReplyStatus(c *gin.Context) {
} }
service.Success(c, resp) service.Success(c, resp)
} }
func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) { func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
chatUser, code := jwt.ParseToChatUser(c) chatUser, code := jwt.ParseToChatUser(c)
if code != 0 { if code != 0 {
service.ErrWithCode(c, code) service.ErrWithCode(c, code)
return return
} }
sessionId := a.cache.GetUserSession(chatUser.ID)
var req dto.UserSwitchAutoReplyReq var req dto.UserSwitchAutoReplyReq
if err := c.ShouldBindJSON(&req); err != nil { if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err) service.Error(c, err)
@ -652,18 +652,9 @@ func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
} else { } else {
msg.Text = "已进入人工,不会接收自动消息" msg.Text = "已进入人工,不会接收自动消息"
} }
sender := &accountFiee.ChatUserData{ err := logic.NewMessage(c, &a.cache, chatUser, dto.NewMessageRequest{
ID: a.robot.Info.ID,
NickName: a.robot.Name,
Account: a.robot.Info.Account,
Role: 3,
Origin: a.robot.Info.Origin,
OriginId: a.robot.Info.OriginId,
Avatar: a.robot.Info.Avatar,
}
err := logic.NewMessage(c, &a.cache, sender, dto.NewMessageRequest{
Robot: true, Robot: true,
SessionId: sessionId, SessionId: fmt.Sprintf("%d", chatUser.ID),
Message: msg, Message: msg,
}) })
if err != nil { if err != nil {

View File

@ -105,7 +105,6 @@ func NewMessage(ctx context.Context, cache *chatCache.ChatCache, sender *account
notice.BuildMessage(resp.Data) notice.BuildMessage(resp.Data)
fmt.Printf("ws消息提醒:%+v\n", notice) fmt.Printf("ws消息提醒:%+v\n", notice)
_, err = consts.ChatRoom.SendSessionMessage(sender, request.SessionId, ws.NewChatMsgType, notice) _, err = consts.ChatRoom.SendSessionMessage(sender, request.SessionId, ws.NewChatMsgType, notice)
fmt.Println("消息提醒结果:", err)
if err != nil { if err != nil {
log.Print("发送新消息通知失败", zap.Error(err), zap.Any("notice", notice)) log.Print("发送新消息通知失败", zap.Error(err), zap.Any("notice", notice))
} }

View File

@ -197,18 +197,6 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
service.Error(c, errors.New(common.GetWorkDetailFailed)) service.Error(c, errors.New(common.GetWorkDetailFailed))
return 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 { if wordInfoRes.WorkStatus != 4 {
service.Error(c, errors.New("作品不是待确认状态")) service.Error(c, errors.New("作品不是待确认状态"))
return return
@ -221,7 +209,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
case 1: case 1:
{ {
if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足 if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{ _, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM, WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid, WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark, ConfirmRemark: req.ConfirmRemark,
@ -235,7 +223,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
case 2: case 2:
{ {
if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足 if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{ _, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM, WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid, WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark, ConfirmRemark: req.ConfirmRemark,
@ -269,90 +257,6 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
service.Success(c, res) service.Success(c, res)
} }
func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
var req bundleModel.UserWorkAnalysisConfirmReq
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err)
return
}
if req.ConfirmStatus == 2 { // 驳回完直接结束
res, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
Uuid: req.Uuid,
ConfirmRemark: req.ConfirmRemark,
ConfirmStatus: 2,
})
fmt.Println("res:", res)
fmt.Println("err:", err)
if err != nil {
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
return
}
service.Success(c, res)
return
}
userInfo := login.GetUserInfoFromC(c)
balanceInfoRes, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
UserId: int32(userInfo.ID),
})
if err != nil {
service.Error(c, errors.New(common.GetUserBalanceFailed))
return
}
analysisInfoRes, err := service.CastProvider.GetWorkAnalysis(c, &cast.GetWorkAnalysisDetailReq{
Uuid: req.Uuid,
})
if err != nil {
service.Error(c, errors.New(common.GetWorkDetailFailed))
return
}
if analysisInfoRes.WorkAnalysisStatus != 4 {
service.Error(c, errors.New("数据分析不是待确认状态"))
return
}
var addBalanceReq bundle.AddBundleBalanceReq
addBalanceReq.UserId = int32(userInfo.ID)
// 检查数据分析余量
if balanceInfoRes.DataAnalysisConsumptionNumber >= balanceInfoRes.DataAnalysisNumber {
service.Error(c, errors.New("数据分析余量不足"))
return
}
addBalanceReq.DataAnalysisConsumptionNumber = 1
resp, err := service.BundleProvider.AddBundleBalance(c, &addBalanceReq)
if err != nil {
service.Error(c, errors.New(common.AddBundleBalanceFailed))
return
}
res, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
Uuid: req.Uuid,
ConfirmRemark: req.ConfirmRemark,
CostType: resp.UsedType,
ConfirmStatus: 1,
})
fmt.Println("res:", res)
fmt.Println("err:", err)
if err != nil {
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
return
}
// 如果是艺人手动确认,确认操作后,自动标记为待阅读状态
_, err = service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
WorkAction: cast.WorkActionENUM_READ,
Uuid: req.Uuid,
})
if err != nil {
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
return
}
service.Success(c, res)
}
func CastLogConfirm(ctx *gin.Context) { func CastLogConfirm(ctx *gin.Context) {
var req bundle.ConfirmWorkReq var req bundle.ConfirmWorkReq
if err := ctx.ShouldBindJSON(&req); err != nil { if err := ctx.ShouldBindJSON(&req); err != nil {
@ -452,7 +356,6 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费", "套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价", "套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
"当月消耗套餐金额($)", "当月消耗增值金额($)",
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数", "套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数", "当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数", "当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
@ -495,76 +398,64 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice)) _ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice)) _ = 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(17, int(it.BundleAccountNumber)) _ = write(15, int(it.BundleAccountNumber))
_ = write(18, int(it.IncreaseAccountNumber)) _ = write(16, int(it.IncreaseAccountNumber))
_ = write(19, int(it.BundleAccountConsumptionNumber)) _ = write(17, int(it.BundleAccountConsumptionNumber))
_ = write(20, int(it.IncreaseAccountConsumptionNumber)) _ = write(18, int(it.IncreaseAccountConsumptionNumber))
// 视频类 // 视频类
_ = write(21, int(it.MonthlyBundleVideoNumber)) _ = write(19, int(it.MonthlyBundleVideoNumber))
_ = write(22, int(it.MonthlyIncreaseVideoNumber)) _ = write(20, int(it.MonthlyIncreaseVideoNumber))
_ = write(23, int(it.BundleVideoConsumptionNumber)) _ = write(21, int(it.BundleVideoConsumptionNumber))
_ = write(24, int(it.IncreaseVideoConsumptionNumber)) _ = write(22, int(it.IncreaseVideoConsumptionNumber))
_ = write(25, int(it.InvalidBundleVideoNumber)) _ = write(23, int(it.InvalidBundleVideoNumber))
_ = write(26, int(it.InvalidIncreaseVideoNumber)) _ = write(24, int(it.InvalidIncreaseVideoNumber))
_ = write(27, int(it.MonthlyNewBundleVideoNumber)) _ = write(25, int(it.MonthlyNewBundleVideoNumber))
_ = write(28, int(it.MonthlyNewIncreaseVideoNumber)) _ = write(26, int(it.MonthlyNewIncreaseVideoNumber))
_ = write(29, int(it.MonthlyBundleVideoConsumptionNumber)) _ = write(27, int(it.MonthlyBundleVideoConsumptionNumber))
_ = write(30, int(it.MonthlyIncreaseVideoConsumptionNumber)) _ = write(28, int(it.MonthlyIncreaseVideoConsumptionNumber))
_ = write(31, int(it.MonthlyInvalidBundleVideoNumber)) _ = write(29, int(it.MonthlyInvalidBundleVideoNumber))
_ = write(32, int(it.MonthlyInvalidIncreaseVideoNumber)) _ = write(30, int(it.MonthlyInvalidIncreaseVideoNumber))
// 图文类 // 图文类
_ = write(33, int(it.MonthlyBundleImageNumber)) _ = write(31, int(it.MonthlyBundleImageNumber))
_ = write(34, int(it.MonthlyIncreaseImageNumber)) _ = write(32, int(it.MonthlyIncreaseImageNumber))
_ = write(35, int(it.BundleImageConsumptionNumber)) _ = write(33, int(it.BundleImageConsumptionNumber))
_ = write(36, int(it.IncreaseImageConsumptionNumber)) _ = write(34, int(it.IncreaseImageConsumptionNumber))
_ = write(37, int(it.InvalidBundleImageNumber)) _ = write(35, int(it.InvalidBundleImageNumber))
_ = write(38, int(it.InvalidIncreaseImageNumber)) _ = write(36, int(it.InvalidIncreaseImageNumber))
_ = write(39, int(it.MonthlyNewBundleImageNumber)) _ = write(37, int(it.MonthlyNewBundleImageNumber))
_ = write(40, int(it.MonthlyNewIncreaseImageNumber)) _ = write(38, int(it.MonthlyNewIncreaseImageNumber))
_ = write(41, int(it.MonthlyBundleImageConsumptionNumber)) _ = write(39, int(it.MonthlyBundleImageConsumptionNumber))
_ = write(42, int(it.MonthlyIncreaseImageConsumptionNumber)) _ = write(40, int(it.MonthlyIncreaseImageConsumptionNumber))
_ = write(43, int(it.MonthlyInvalidBundleImageNumber)) _ = write(41, int(it.MonthlyInvalidBundleImageNumber))
_ = write(44, int(it.MonthlyInvalidIncreaseImageNumber)) _ = write(42, int(it.MonthlyInvalidIncreaseImageNumber))
// 数据分析类 // 数据分析类
_ = write(45, int(it.MonthlyBundleDataAnalysisNumber)) _ = write(43, int(it.MonthlyBundleDataAnalysisNumber))
_ = write(46, int(it.MonthlyIncreaseDataAnalysisNumber)) _ = write(44, int(it.MonthlyIncreaseDataAnalysisNumber))
_ = write(47, int(it.BundleDataAnalysisConsumptionNumber)) _ = write(45, int(it.BundleDataAnalysisConsumptionNumber))
_ = write(48, int(it.IncreaseDataAnalysisConsumptionNumber)) _ = write(46, int(it.IncreaseDataAnalysisConsumptionNumber))
_ = write(49, int(it.InvalidBundleDataAnalysisNumber)) _ = write(47, int(it.InvalidBundleDataAnalysisNumber))
_ = write(50, int(it.InvalidIncreaseDataAnalysisNumber)) _ = write(48, int(it.InvalidIncreaseDataAnalysisNumber))
_ = write(51, int(it.MonthlyNewBundleDataAnalysisNumber)) _ = write(49, int(it.MonthlyNewBundleDataAnalysisNumber))
_ = write(52, int(it.MonthlyNewIncreaseDataAnalysisNumber)) _ = write(50, int(it.MonthlyNewIncreaseDataAnalysisNumber))
_ = write(53, int(it.MonthlyBundleDataAnalysisConsumptionNumber)) _ = write(51, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
_ = write(54, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber)) _ = write(52, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
_ = write(55, int(it.MonthlyInvalidBundleDataAnalysisNumber)) _ = write(53, int(it.MonthlyInvalidBundleDataAnalysisNumber))
_ = write(56, int(it.MonthlyInvalidIncreaseDataAnalysisNumber)) _ = write(54, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
// 手动扩展类 // 手动扩展类
_ = write(57, int(it.MonthlyNewManualAccountNumber)) _ = write(55, int(it.MonthlyNewManualAccountNumber))
_ = write(58, int(it.MonthlyNewManualVideoNumber)) _ = write(56, int(it.MonthlyNewManualVideoNumber))
_ = write(59, int(it.MonthlyNewManualImageNumber)) _ = write(57, int(it.MonthlyNewManualImageNumber))
_ = write(60, int(it.MonthlyNewManualDataAnalysisNumber)) _ = write(58, int(it.MonthlyNewManualDataAnalysisNumber))
_ = write(61, int(it.MonthlyNewDurationNumber)) _ = write(59, int(it.MonthlyNewDurationNumber))
_ = write(62, int(it.MonthlyManualAccountConsumptionNumber)) _ = write(60, int(it.MonthlyManualAccountConsumptionNumber))
_ = write(63, int(it.MonthlyManualVideoConsumptionNumber)) _ = write(61, int(it.MonthlyManualVideoConsumptionNumber))
_ = write(64, int(it.MonthlyManualImageConsumptionNumber)) _ = write(62, int(it.MonthlyManualImageConsumptionNumber))
_ = write(65, int(it.MonthlyManualDataAnalysisConsumptionNumber)) _ = write(63, int(it.MonthlyManualDataAnalysisConsumptionNumber))
} }
@ -584,7 +475,7 @@ func GetAccountBundleBalance(c *gin.Context) {
service.Error(c, err) service.Error(c, err)
return return
} }
req.Month = []string{time.Now().Format("2006-01")} req.Month = time.Now().Format("2006-01")
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req) res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
if err != nil { if err != nil {
service.Error(c, errors.New(common.GetBundleBalanceListFailed)) service.Error(c, errors.New(common.GetBundleBalanceListFailed))

View File

@ -6,7 +6,6 @@ import (
"fmt" "fmt"
"fonchain-fiee/api/bundle" "fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast" "fonchain-fiee/api/cast"
"fonchain-fiee/pkg/e"
logicCast "fonchain-fiee/pkg/logic/cast" logicCast "fonchain-fiee/pkg/logic/cast"
"fonchain-fiee/pkg/model/login" "fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
@ -17,6 +16,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/duke-git/lancet/v2/datetime"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@ -92,39 +92,18 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
sumFee := decimal.Zero sumFee := decimal.Zero
for _, i := range data { for _, i := range data {
sumPayment = sumPayment.Add(decimal.NewFromFloat(float64(i.PaymentAmount)))
s := fmt.Sprintf("%.2f", i.PaymentAmount) sumFinal = sumFinal.Add(decimal.NewFromFloat(float64(i.FinalAmount)))
d, err := decimal.NewFromString(s) sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
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), "合计支付金额(美元)") f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow), "合计支付金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), "合计结算金额(美元)") f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow), "合计结算金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), "合计手续费金额(美元)") f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow), "合计手续费金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+2), "$"+sumPayment.StringFixed(2)) f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "$"+sumPayment.StringFixed(2))
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+2), "$"+sumFinal.StringFixed(2)) f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), "$"+sumFinal.StringFixed(2))
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+2), "$"+sumFee.StringFixed(2)) f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), "$"+sumFee.StringFixed(2))
// 创建黑色边框样式 // 创建黑色边框样式
borderStyle, err := f.NewStyle(&excelize.Style{ borderStyle, err := f.NewStyle(&excelize.Style{
@ -145,8 +124,8 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
} }
// 应用样式到合计区域(包括标题行和数值行) // 应用样式到合计区域(包括标题行和数值行)
startCell := fmt.Sprintf("A%d", endRow+1) startCell := fmt.Sprintf("A%d", endRow)
endCell := fmt.Sprintf("C%d", endRow+2) endCell := fmt.Sprintf("C%d", endRow+1)
if err := f.SetCellStyle(sheet, startCell, endCell, borderStyle); err != nil { if err := f.SetCellStyle(sheet, startCell, endCell, borderStyle); err != nil {
fmt.Println("设置边框样式失败:", err) fmt.Println("设置边框样式失败:", err)
} }
@ -154,8 +133,8 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
} }
if err := exportStructToExcel(resp.Data, []string{ if err := exportStructToExcel(resp.Data, []string{
"订单编号", "套餐", "用户编号", "客户姓名", "手机号", "支付时间", "增值视频数", "套餐金额", "增值金额", "支付金额", "结算金额", "手续费", "汇率(%", "订单编号", "套餐", "用户编号", "客户姓名", "手机号", "支付时间", "套餐视频数", "增值视频数", "套餐金额", "增值金额", "支付金额", "结算金额", "手续费", "汇率(%",
}, filePath, e.BundlePurchaseExport, req.EndTime, statistic); err != nil { }, filePath, statistic); err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed)) service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return return
} }
@ -191,7 +170,7 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true) utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
sheet := "Sheet1" sheet := "Sheet1"
f := excelize.NewFile() f := excelize.NewFile()
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "DM账号状态", "Instagram账号名", "Instagram账号状态", "TikTok账号名", "TikTok账号状态", "Bluesky账号名", "Bluesky账号状态", "Youtube账号名", "Youtube账号状态"} headers := []string{"序号", "艺人", "用户编号", "DM账号名", "Instagram账号名", "TikTok账号名"}
for i, h := range headers { for i, h := range headers {
col, _ := excelize.ColumnNumberToName(i + 1) col, _ := excelize.ColumnNumberToName(i + 1)
cell := col + "1" cell := col + "1"
@ -205,10 +184,6 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
} else { } else {
scheme = "http" scheme = "http"
} }
authStatus := map[int32]string{
1: "授权",
2: "未授权",
}
for r, it := range resp.Data { for r, it := range resp.Data {
row := r + 2 row := r + 2
// 逐列写入(注意顺序必须和 headers 一致) // 逐列写入(注意顺序必须和 headers 一致)
@ -220,16 +195,9 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
_ = write(1, r+1) _ = write(1, r+1)
_ = write(2, it.ArtistName) _ = write(2, it.ArtistName)
_ = write(3, it.UserNum) _ = write(3, it.UserNum)
_ = write(4, it.DmNickname) _ = write(4, it.DmAccount)
_ = write(5, authStatus[it.DmAuthStatus]) _ = write(5, it.InstagramAccount)
_ = write(6, it.InstagramNickname) _ = write(6, it.TiktokAccount)
_ = 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) _ = f.SetColWidth(sheet, "A", "AZ", 18)
@ -256,9 +224,11 @@ func MetricsVideoSubmitExport(ctx *gin.Context) {
return return
} }
newCtx := serviceCast.NewCtxWithUserInfo(ctx) newCtx := serviceCast.NewCtxWithUserInfo(ctx)
if len(req.Month) > 0 { t, err := time.Parse("2006-01", req.Month)
if err == nil {
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{ resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
SubmitTimeMonths: req.Month, SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime),
SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime),
Page: 1, Page: 1,
PageSize: 99999, PageSize: 99999,
}) })
@ -471,7 +441,7 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "套餐金额", "增值金额", "支付金额", "币种", "手续费", "套餐视频总数", "所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "套餐金额", "增值金额", "支付金额", "币种", "手续费", "套餐视频总数",
"增值视频总数", "套餐视频单价", "增值视频单价", "当前需要上传套餐视频数", "当前需要上传增值视频数", "增值视频总数", "套餐视频单价", "增值视频单价", "当前需要上传套餐视频数", "当前需要上传增值视频数",
"当前已上传套餐视频数", "当前已上传增值视频数", "当前套餐视频已消费总金额", "当前增值视频已消费总金额", "当前已上传套餐视频数", "当前已上传增值视频数", "当前套餐视频已消费总金额", "当前增值视频已消费总金额",
}, filePath, e.BundleDetailExport, "", statistic); err != nil { }, filePath, yelloStyle, statistic); err != nil {
service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed)) service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed))
return return
} }
@ -548,28 +518,11 @@ func BalanceMetricsExport(ctx *gin.Context) {
}) })
} }
func exportStructToExcel[T any](data []T, headers []string, filename string, exportType int, endTime string, fns ...func(data []T, headers []string, f *excelize.File)) error { func exportStructToExcel[T any](data []T, headers []string, filename string, fns ...func(data []T, headers []string, f *excelize.File)) error {
f := excelize.NewFile() f := excelize.NewFile()
sheet := f.GetSheetName(f.GetActiveSheetIndex()) sheet := f.GetSheetName(f.GetActiveSheetIndex())
// 创建黄色背景样式(用于截止行)
yellowStyle, err := f.NewStyle(&excelize.Style{
Fill: excelize.Fill{
Type: "pattern",
Color: []string{"#FFFF00"}, // 黄色
Pattern: 1, // 实心填充
},
Alignment: &excelize.Alignment{
Horizontal: "left",
Vertical: "center",
},
})
if err != nil {
// 如果创建样式失败,继续执行但不应用样式
yellowStyle = 0
}
// 写入表头 // 写入表头
for i, h := range headers { for i, h := range headers {
cell, _ := excelize.CoordinatesToCellName(i+1, 1) cell, _ := excelize.CoordinatesToCellName(i+1, 1)
@ -593,52 +546,12 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
} }
// 写入数据 // 写入数据
actualRowIdx := 0 for rowIdx, item := range data {
flag := 0
for _, item := range data {
val := reflect.ValueOf(item) val := reflect.ValueOf(item)
if val.Kind() == reflect.Ptr { if val.Kind() == reflect.Ptr {
val = val.Elem() val = val.Elem()
} }
if exportType == e.BundlePurchaseExport {
if endTime != "" {
// 通过反射获取 PayTime 字段
payTimeField := val.FieldByName("PayTime")
if payTimeField.IsValid() && payTimeField.Kind() == reflect.String {
payTimeStr := payTimeField.String()
if payTimeStr != "" {
// 解析时间
endTimeParsed, err1 := time.Parse(time.DateTime, endTime)
payTimeParsed, err2 := time.Parse(time.DateTime, payTimeStr)
if err1 == nil && err2 == nil {
// 如果 endTime <= PayTime需要插入截止行
if !endTimeParsed.After(payTimeParsed) && flag == 0 {
flag = 1
// 格式化截止时间显示
endTimeFormatted := endTimeParsed.Format("2006年01月02日15点04分")
// 在当前行写入"截止xxxx年xx月xx点"
cell, _ := excelize.CoordinatesToCellName(1, actualRowIdx+2)
f.SetCellValue(sheet, cell, fmt.Sprintf("截止%s", endTimeFormatted))
// 应用黄色背景样式
if yellowStyle > 0 {
// 合并整行的单元格以显示截止信息
lastCol, _ := excelize.ColumnNumberToName(len(headers))
startCell := cell
endCell := fmt.Sprintf("%s%d", lastCol, actualRowIdx+2)
f.MergeCell(sheet, startCell, endCell)
f.SetCellStyle(sheet, startCell, endCell, yellowStyle)
}
// 移动到下一行
actualRowIdx++
}
}
}
}
}
}
for colIdx, fieldIdx := range exportedFields { for colIdx, fieldIdx := range exportedFields {
field := val.Field(fieldIdx) field := val.Field(fieldIdx)
@ -650,10 +563,9 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
cellValue = field.Interface() cellValue = field.Interface()
} }
cell, _ := excelize.CoordinatesToCellName(colIdx+1, actualRowIdx+2) cell, _ := excelize.CoordinatesToCellName(colIdx+1, rowIdx+2)
f.SetCellValue(sheet, cell, cellValue) f.SetCellValue(sheet, cell, cellValue)
} }
actualRowIdx++
} }
} }

View File

@ -22,8 +22,6 @@ import (
"github.com/gin-gonic/gin/binding" "github.com/gin-gonic/gin/binding"
) )
const ContractUrl = "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf"
func DeleteBundleOrder(c *gin.Context) { func DeleteBundleOrder(c *gin.Context) {
var req bundle.DeleteValueAddServiceRequest var req bundle.DeleteValueAddServiceRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil { if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
@ -241,21 +239,15 @@ func CreateBundleOrderSignature(c *gin.Context) {
} }
// 签合同(金额 + 有效期) // 签合同(金额 + 有效期)
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence) signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay)
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
return return
} }
if userInfo.InviterID != 0 && logic.CheckUserFirstOrder(userInfo.ID) {
req.InviterId = userInfo.InviterID
}
// 组装订单信息 // 组装订单信息
req = logic.BuildOrderRequest(req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract) 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) res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
if err != nil { if err != nil {
@ -265,129 +257,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
service.Success(c, res) service.Success(c, res)
return return
} }
func VerificationSignature(c *gin.Context) {
type VerificationSignature struct {
Signature bool `json:"signature"`
SignatureUrl string `json:"signature_url"`
}
res := VerificationSignature{Signature: false}
userInfo := login.GetUserInfoFromC(c)
// 添加用户信息验证
if userInfo.ID == 0 {
service.Success(c, res)
return
}
req := bundle.OrderRecordsDetailRequest{
CustomerID: strconv.FormatUint(userInfo.ID, 10),
}
records, err := service.BundleProvider.OrderRecordsDetail(c, &req)
if err != nil {
// 添加错误日志但继续返回false业务逻辑
service.Success(c, res)
return
}
// 优化空值判断链
if records == nil || records.OrderRecord == nil {
service.Success(c, res)
return
}
order := records.OrderRecord
customerID, err := strconv.ParseUint(order.CustomerID, 10, 64)
if err != nil || customerID != userInfo.ID {
service.Success(c, res)
return
}
//
//if order.Status != bundleModel.OrderPaid {
// service.Success(c, res)
// return
//}
expirationTime, err := time.Parse("2006-01-02 15:04:05", order.ExpirationTime)
if err != nil {
service.Success(c, res)
return
}
if expirationTime.Before(time.Now()) {
service.Success(c, res)
return
}
if order.ReSignature == 1 {
res.Signature = true
contract := ContractUrl
expirationDate := expirationTime.Format("2006-01-02")
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
if err != nil {
service.Error(c, err)
return
}
res.SignatureUrl = signContract
}
service.Success(c, res)
}
func RestartSignature(c *gin.Context) {
userInfo := login.GetUserInfoFromC(c)
req := bundle.OrderRecordsDetailRequest{
CustomerID: strconv.FormatUint(userInfo.ID, 10),
}
records, err := service.BundleProvider.OrderRecordsDetail(c, &req)
if err != nil {
service.Error(c, errors.New("获取订单信息失败"))
return
}
// 优化空值判断链
if records == nil || records.OrderRecord == nil {
service.Error(c, errors.New("获取订单信息失败"))
return
}
order := records.OrderRecord
expirationTime, err := time.Parse("2006-01-02 15:04:05", order.ExpirationTime)
if err != nil {
service.Error(c, errors.New("获取订单过期日期错误"))
return
}
if expirationTime.Before(time.Now()) {
service.Error(c, errors.New("订单已过期"))
return
}
expirationDate := expirationTime.Format("2006-01-02")
if order.ReSignature == 2 {
service.Error(c, errors.New("订单无需重新签署"))
return
}
// 获取最后一次合同编号
lastContractNo, err := logic.GetLastContractNo()
if err != nil {
service.Error(c, err)
return
}
contract := ContractUrl
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
if err != nil {
service.Error(c, err)
return
}
res, err := service.BundleProvider.ReSignTheContract(c, &bundle.ReSignTheContractRequest{
OrderNo: records.OrderRecord.OrderNo,
ContractNo: lastContractNo,
SignContract: signContract,
})
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
func UpdateBundleOrderStatusPaid(c *gin.Context) { func UpdateBundleOrderStatusPaid(c *gin.Context) {
var req bundle.OrderRecord var req bundle.OrderRecord
@ -520,6 +390,7 @@ func OrderRecordsListV2(c *gin.Context) {
for id := range userIdSet { for id := range userIdSet {
userIds = append(userIds, id) userIds = append(userIds, id)
} }
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds, Ids: userIds,
Domain: "app", Domain: "app",
@ -541,10 +412,6 @@ func OrderRecordsListV2(c *gin.Context) {
item.CustomerName = u.Name item.CustomerName = u.Name
item.TelNum = u.TelNum item.TelNum = u.TelNum
item.SubNum = u.SubNum item.SubNum = u.SubNum
if item.InviterId != 0 {
item.InviterCode = u.InviterCode
item.InviterName = u.InviterName
}
} }
} }
} }
@ -627,10 +494,6 @@ func OrderRecordsListDownload(c *gin.Context) {
item.CustomerName = u.Name item.CustomerName = u.Name
item.TelNum = u.TelNum item.TelNum = u.TelNum
item.SubNum = u.SubNum item.SubNum = u.SubNum
if item.InviterId != 0 {
item.InviterCode = u.InviterCode
item.InviterName = u.InviterName
}
} }
} }
} }
@ -655,7 +518,7 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
headers := []string{ headers := []string{
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额", "套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态", "邀请码", "邀请码所属人", "增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
} }
for i, h := range headers { for i, h := range headers {
cell := fmt.Sprintf("%s%d", string(rune('A'+i)), 1) cell := fmt.Sprintf("%s%d", string(rune('A'+i)), 1)
@ -689,8 +552,6 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt) 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("H%d", rowIndex), bundleInfo.PayTime)
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount) 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 { if addCount > 0 {
for i, add := range bundleInfo.AddBundleInfo { for i, add := range bundleInfo.AddBundleInfo {
@ -737,38 +598,6 @@ func GetCurrencyTypeText(currencyType int32) string {
return strconv.Itoa(int(currencyType)) return strconv.Itoa(int(currencyType))
} }
} }
func GetUserStatusText(status int32) string {
switch status {
case 1:
return "未实名"
case 2:
return "审核中"
case 3:
return "审核失败"
case 4:
return "审核通过"
default:
return strconv.Itoa(int(status))
}
}
func GetDocumentTypeText(documentType int32) string {
switch documentType {
case 1:
return "护照"
case 2:
return "身份证"
case 3:
return "驾驶证"
case 4:
return "居住证"
case 5:
return "自拍照"
case 6:
return "社保卡"
default:
return ""
}
}
func OrderRecordsList(c *gin.Context) { func OrderRecordsList(c *gin.Context) {
var req bundle.OrderRecordsRequest var req bundle.OrderRecordsRequest

View File

@ -21,36 +21,6 @@ const (
OnlyAddValueListByOrderNoFailed = "根据订单号查询增值套餐失败" OnlyAddValueListByOrderNoFailed = "根据订单号查询增值套餐失败"
) )
//官网报告
const (
ErrorCreateReportFailed = "创建官网报告失败"
ErrorDeleteReportFailed = "删除官网报告失败"
ErrorListReportFailed = "官网报告列表查询失败"
ErrorEditReportFailed = "编辑官网报告失败"
ErrorDisplayReportFailed = "显示官网报告失败"
)
//官网成员管理
const (
ErrorCreateMemberFailed = "创建官网成员失败"
ErrorDeleteMemberFailed = "删除官网成员失败"
ErrorListMemberFailed = "官网成员列表查询失败"
ErrorEditMemberFailed = "编辑官网成员失败"
ErrorDisplayMemberFailed = "显示官网成员失败"
ErrorEditBoardOfDirectorsFailed = "编辑董事会成员失败"
ErrorEditCommitteeAppointmentsFailed = "编辑委员会成员失败"
ErrorDisplayCommitteeAppointmentsFailed = "显示委员会成员失败"
ErrorEditManagementFailed = "编辑管理员失败"
ErrorDisplayManagementFailed = "显示管理员失败"
ErrorDisplayBoardOfDirectorsFailed = "显示董事会成员失败"
)
//官网邮箱通知
const (
ErrorEmailAlertSubmitFailed = "提交邮箱通知失败"
ErrorGetEmailInformationListFailed = "获取邮箱通知列表失败"
)
// 订单 // 订单
const ( const (
MissOrderNo = "缺少订单号" MissOrderNo = "缺少订单号"
@ -99,15 +69,13 @@ const (
BundleUnBindingAddService = "套餐未绑定增值服务" BundleUnBindingAddService = "套餐未绑定增值服务"
) )
// 发布 //发布
const ( const (
UpdateWorkStatusFailed = "更新作品状态失败" UpdateWorkStatusFailed = "更新作品状态失败"
GetWorkDetailFailed = "获取作品详情失败" GetWorkDetailFailed = "获取作品详情失败"
) )
//用户套餐状态 //余量
// 余量
const ( const (
BundleExtendFailed = "套餐扩展失败" BundleExtendFailed = "套餐扩展失败"
BundleExtendRecordsListFailed = "套餐扩展记录列表查询失败" BundleExtendRecordsListFailed = "套餐扩展记录列表查询失败"
@ -124,13 +92,7 @@ const (
InsufficientBalance = "余量不足" InsufficientBalance = "余量不足"
) )
//用户套餐状态 //数据指标
const (
BundleExpired = 1 //已过期
BundleNotExpired = 0 //未过期
)
// 数据指标
const ( const (
MetricsBusinessFailed = "业务概览查询失败" MetricsBusinessFailed = "业务概览查询失败"
MetricsOperatingFailed = "运营数据查询失败" MetricsOperatingFailed = "运营数据查询失败"
@ -141,7 +103,7 @@ const (
BalanceMetricsExportFailed = "服务使用明细数据导出失败" BalanceMetricsExportFailed = "服务使用明细数据导出失败"
) )
// 素材库 //素材库
const ( const (
FileListFailed = "素材库列表查询失败" FileListFailed = "素材库列表查询失败"
FileUsageFailed = "素材库使用情况查询失败" FileUsageFailed = "素材库使用情况查询失败"
@ -159,7 +121,7 @@ const (
ERROR_OPEN_FILE = "打开文件错误" ERROR_OPEN_FILE = "打开文件错误"
) )
// 官网 //官网
const ( const (
CreateSecFilingFailed = "创建官方信息失败" CreateSecFilingFailed = "创建官方信息失败"
UpdateSecFilingFailed = "更新官方信息失败" UpdateSecFilingFailed = "更新官方信息失败"

View File

@ -1,180 +0,0 @@
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,24 +63,6 @@ func CheckUserOrder(userID uint64) error {
return nil 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) { func GetLastContractNo() (string, error) {
records, err := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{ records, err := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{
@ -112,7 +94,6 @@ func BuildServiceRecords(req *bundle.OrderCreateRecord, bundleDetail *bundle.Bun
expirationDay string expirationDay string
addUidService = make(map[string]bool) addUidService = make(map[string]bool)
bundleUidService = make(map[string]bool) bundleUidService = make(map[string]bool)
foundExpiration = false
) )
// 分类权益 // 分类权益
@ -168,15 +149,12 @@ func BuildServiceRecords(req *bundle.OrderCreateRecord, bundleDetail *bundle.Bun
addRecords = append(addRecords, buildAddRecord(addService, uid, 0, num, 1)) addRecords = append(addRecords, buildAddRecord(addService, uid, 0, num, 1))
// 计算到期时间 // 计算到期时间
if !foundExpiration && addService.ServiceType == 5 { if addService.ServiceType == 5 {
expirationDay = calculateExpirationDate(time.Now(), num, addService.Unit) expirationDay = calculateExpirationDate(time.Now(), num, addService.Unit)
foundExpiration = true } else {
}
}
// 如果没有找到服务类型为5的使用默认值
if !foundExpiration {
expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02") expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02")
} }
}
return addRecords, addTotalPrice, expirationDay, nil return addRecords, addTotalPrice, expirationDay, nil
} }

View File

@ -8,13 +8,14 @@ import (
"fonchain-fiee/pkg/service/upload" "fonchain-fiee/pkg/service/upload"
"log" "log"
"os" "os"
"strconv"
"time" "time"
"github.com/signintech/gopdf" "github.com/signintech/gopdf"
"go.uber.org/zap" "go.uber.org/zap"
) )
func SignContractV2(customerNum, contract string, price float32, expirationDate string, nickName string, idCard string, address string) (outputUrl string, err error) { func SignContractV2(customerNum, contract string, price float32, expirationDate string) (outputUrl string, err error) {
filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf" filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf"
downloadFileErr := DownloadFile(filePath, contract) downloadFileErr := DownloadFile(filePath, contract)
if downloadFileErr != nil { if downloadFileErr != nil {
@ -31,7 +32,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
return outputUrl, errors.New(common.ErrorInsertSignature) return outputUrl, errors.New(common.ErrorInsertSignature)
}*/ }*/
signErr := InsertSignatureV2(filePath, signFile, price, expirationDate, nickName, idCard, address) signErr := InsertSignatureV2(filePath, signFile, price, expirationDate)
if signErr != nil { if signErr != nil {
zap.L().Error("insert signature error: ", zap.Error(signErr)) zap.L().Error("insert signature error: ", zap.Error(signErr))
return outputUrl, errors.New(common.ErrorInsertSignature) return outputUrl, errors.New(common.ErrorInsertSignature)
@ -46,7 +47,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
return outputUrl, nil return outputUrl, nil
} }
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string, nickName string, idCard string, address string) error { func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string) error {
fmt.Println("================================templatePath:", templatePath) fmt.Println("================================templatePath:", templatePath)
fmt.Println("================================outputPath:", outputPath) fmt.Println("================================outputPath:", outputPath)
fmt.Println("================================price:", price) fmt.Println("================================price:", price)
@ -64,9 +65,9 @@ func InsertSignatureV2(templatePath, outputPath string, price float32, expiratio
totalPages := pdf.GetNumberOfPages() totalPages := pdf.GetNumberOfPages()
fmt.Printf("模板文件的总页数: %d\n", totalPages) fmt.Printf("模板文件的总页数: %d\n", totalPages)
onePage := 1 pricePage := 3
sixPage := 6
tenPage := 10 limitTimePage := 4
tffErr := pdf.AddTTFFont("simfang", "./data/simfang.ttf") tffErr := pdf.AddTTFFont("simfang", "./data/simfang.ttf")
if tffErr != nil { if tffErr != nil {
@ -81,54 +82,42 @@ func InsertSignatureV2(templatePath, outputPath string, price float32, expiratio
log.Fatalf("设置字体失败: %v", err) log.Fatalf("设置字体失败: %v", err)
} }
// 填 金额
pdf.SetPage(pricePage)
pdf.SetX(383)
pdf.SetY(351)
pdf.Cell(nil, strconv.FormatFloat(float64(price), 'f', 2, 64))
pdf.SetX(345)
pdf.SetY(383)
pdf.Cell(nil, strconv.FormatFloat(float64(price), 'f', 2, 64))
// 写 有效期
pdf.SetPage(limitTimePage)
// 英文格式的时间 // 英文格式的时间
parsedTime, err := time.Parse("2006-01-02", expirationDate) parsedTime, err := time.Parse("2006-01-02", expirationDate)
if err != nil { if err != nil {
fmt.Println("时间解析错误: %v", err) panic("日期格式错误!")
fmt.Println(expirationDate)
return errors.New("时间解析错误")
} }
year := parsedTime.Format("2006") // "2006" year := parsedTime.Format("2006") // "2006"
month := parsedTime.Format("01") // "01" month := parsedTime.Format("01") // "01"
day := parsedTime.Format("02") // "02" day := parsedTime.Format("02") // "02"
// 填 第一页 日期-姓名-身份证号 pdf.SetX(160)
pdf.SetPage(onePage) pdf.SetY(387)
pdf.SetX(232) pdf.Cell(nil, expirationDate)
pdf.SetY(152)
pdf.Cell(nil, year)
pdf.SetX(279)
pdf.SetY(152)
pdf.Cell(nil, month)
pdf.SetX(313)
pdf.SetY(152)
pdf.Cell(nil, day)
pdf.SetX(370)
pdf.SetY(152)
pdf.Cell(nil, nickName)
pdf.SetX(175)
pdf.SetY(170)
pdf.Cell(nil, idCard)
//pdf.Cell(nil, strconv.FormatFloat(float64(price), 'f', 2, 64))
// 写 第六页 日期 pdf.SetX(330)
pdf.SetPage(sixPage) pdf.SetY(403)
pdf.SetX(343)
pdf.SetY(138)
pdf.Cell(nil, year) pdf.Cell(nil, year)
pdf.SetX(401)
pdf.SetY(138) pdf.SetX(396)
pdf.SetY(403)
pdf.Cell(nil, month) pdf.Cell(nil, month)
pdf.SetX(447)
pdf.SetY(138) pdf.SetX(443)
pdf.SetY(403)
pdf.Cell(nil, day) pdf.Cell(nil, day)
// 写 第十页 地址 姓名 邮件
pdf.SetPage(tenPage)
pdf.SetX(195)
pdf.SetY(253)
pdf.Cell(nil, address)
pdf.SetX(215)
pdf.SetY(270)
pdf.Cell(nil, nickName)
// 生成新的 PDF // 生成新的 PDF
if err = pdf.WritePdf(outputPath); err != nil { if err = pdf.WritePdf(outputPath); err != nil {
//zap.L().Error("WritePdf err", zap.Error(err)) //zap.L().Error("WritePdf err", zap.Error(err))

View File

@ -2,6 +2,7 @@ package bundle
import ( import (
"context" "context"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@ -9,7 +10,6 @@ import (
"fonchain-fiee/api/bundle" "fonchain-fiee/api/bundle"
"fonchain-fiee/api/order" "fonchain-fiee/api/order"
"fonchain-fiee/api/payment" "fonchain-fiee/api/payment"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/config" "fonchain-fiee/pkg/config"
"fonchain-fiee/pkg/model/login" "fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
@ -19,9 +19,6 @@ import (
"math" "math"
"net/http" "net/http"
"strconv" "strconv"
"time"
"dubbo.apache.org/dubbo-go/v3/common/logger"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding" "github.com/gin-gonic/gin/binding"
@ -144,13 +141,7 @@ func CreateAntomPay(c *gin.Context) {
// 获取 用户信息 // 获取 用户信息
userInfo := login.GetUserInfoFromC(c) userInfo := login.GetUserInfoFromC(c)
// 创建审批 防止重复提交
lockKey := fmt.Sprintf("create_antom_pay_%v", userInfo.ID)
reply := cache.RedisClient.SetNX(lockKey, 0, 5*time.Second)
if !reply.Val() {
service.Error(c, errors.New(common.CreateBundleFailed))
return
}
// outTradeNo就是orderNo根据这个去查询子表的source,如果是2就时单独的子套餐如果是1就是主套餐 // outTradeNo就是orderNo根据这个去查询子表的source,如果是2就时单独的子套餐如果是1就是主套餐
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{ orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
OrderNo: req.OutTradeNo, OrderNo: req.OutTradeNo,

View File

@ -2,7 +2,6 @@ package bundle
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"fonchain-fiee/api/accountFiee" "fonchain-fiee/api/accountFiee"
"fonchain-fiee/api/bundle" "fonchain-fiee/api/bundle"
@ -277,7 +276,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
var TotalPrice float32 var TotalPrice float32
var expirationDay string var expirationDay string
numMap := make(map[string]int32) numMap := make(map[string]int32)
numMap["1500.00"] = 0
numMap["3150.00"] = 3 numMap["3150.00"] = 3
numMap["4200.00"] = 5 numMap["4200.00"] = 5
numMap["5600.00"] = 8 numMap["5600.00"] = 8
@ -290,7 +288,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
numMap["18300.00"] = 40 numMap["18300.00"] = 40
numMap["26700.00"] = 60 numMap["26700.00"] = 60
incrMap := make(map[string]float32) incrMap := make(map[string]float32)
incrMap["1500.00"] = 0
incrMap["3150.00"] = 1650 incrMap["3150.00"] = 1650
incrMap["4200.00"] = 2700 incrMap["4200.00"] = 2700
incrMap["5600.00"] = 4100 incrMap["5600.00"] = 4100
@ -366,7 +363,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
ValueUid: accountUuid, ValueUid: accountUuid,
CurrencyType: 2, //美元 CurrencyType: 2, //美元
Amount: 0, //增值服务金额 Amount: 0, //增值服务金额
Num: 5, Num: 3,
Unit: "个", Unit: "个",
Source: 1, Source: 1,
PaymentStatus: 1, PaymentStatus: 1,
@ -388,10 +385,9 @@ func AutoCreateUserAndOrder(c *gin.Context) {
}, },
) )
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改 // 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
contract := ContractUrl contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf"
expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02") expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02")
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay)
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay, unfinishInfo.UserName, unfinishInfo.CardNum, unfinishInfo.PlaceOfResidence)
if signContractErr != nil { if signContractErr != nil {
service.Error(c, signContractErr) service.Error(c, signContractErr)
return return
@ -418,7 +414,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
orderReq.OrderNo = unfinishInfo.OrderNo orderReq.OrderNo = unfinishInfo.OrderNo
//expirationTime := t.AddDate(10, 0, 0).Format("2006-01-02 15:04:05") //expirationTime := t.AddDate(10, 0, 0).Format("2006-01-02 15:04:05")
//orderReq.ExpirationTime = expirationTime //orderReq.ExpirationTime = expirationTime
orderReq.PlatformIds = []uint32{1, 4, 5}
_, err = service.BundleProvider.CreateOrderRecord(context.Background(), &orderReq) _, err = service.BundleProvider.CreateOrderRecord(context.Background(), &orderReq)
if err != nil { if err != nil {
service.Error(c, err) service.Error(c, err)
@ -552,21 +547,3 @@ func AutoCreateUserAndOrder(c *gin.Context) {
return return
} }
func QueryTheOrderSnapshotInformation(c *gin.Context) {
var req bundle.QueryTheOrderSnapshotInformationReq
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
if req.OrderNo == "" {
service.Error(c, errors.New("订单号不能为空"))
return
}
res, err := service.BundleProvider.QueryTheOrderSnapshotInformation(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}

File diff suppressed because it is too large Load Diff

View File

@ -1,560 +0,0 @@
package cast
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/api/aryshare"
"fonchain-fiee/api/cast"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"io"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"time"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
const (
// Ayrshare API 配置
ayrshareAPIBaseURL = "https://api.ayrshare.com/api"
maxSmallFileSize = 30 * 1024 * 1024 // 30MB
apiKey = "208CBE9F-8E4F426A-990A0184-2C6287B9"
)
// UploadMediaResponse 上传媒体文件响应
type UploadMediaResponse struct {
ID string `json:"id"`
URL string `json:"url"`
FileName string `json:"fileName"`
Description string `json:"description"`
IsAs bool `json:"isAs"`
}
// UploadURLResponse 获取上传URL响应
type UploadURLResponse struct {
AccessURL string `json:"accessUrl"`
ContentType string `json:"contentType"`
UploadURL string `json:"uploadUrl"`
}
// VerifyURLResponse 验证URL响应
type VerifyURLResponse struct {
Status string `json:"status"`
StatusCode int `json:"statusCode"`
ContentType string `json:"contentType"`
}
// UploadMediaByURL 根据文件大小自动选择上传方式
// fileURL: 文件的URL链接
// apiKey: Ayrshare API Key
// fileName: 文件名(可选)
// description: 文件描述(可选)
func UploadMediaByURL(ctx context.Context, fileURL, fileName, description string) (*UploadMediaResponse, error) {
if fileURL == "" {
return nil, errors.New("文件URL不能为空")
}
/*ok, err := VerifyMediaURL(ctx, fileURL) // 检测文件是否OK 关闭遇到了检测OK 发布不OK的 不相信API了
if err != nil {
return nil, err
}
if ok {
return &UploadMediaResponse{
ID: "",
URL: fileURL,
FileName: "",
Description: "",
IsAs: false,
}, nil
}*/
// 下载文件到临时目录
tempFile, fileSize, err := downloadFile(ctx, fileURL)
if err != nil {
return nil, fmt.Errorf("下载文件失败")
}
defer os.Remove(tempFile) // 清理临时文件
zap.L().Info("文件下载完成", zap.String("tempFile", tempFile), zap.Int64("fileSize", fileSize))
// 如果没有提供文件名从URL中提取
if fileName == "" {
fileName = filepath.Base(fileURL)
}
var result *UploadMediaResponse
// 根据文件大小选择上传方式
if fileSize < maxSmallFileSize {
zap.L().Info("使用小文件上传方式", zap.Int64("fileSize", fileSize))
result, err = uploadSmallMedia(ctx, tempFile, apiKey, fileName, description)
} else {
zap.L().Info("使用大文件上传方式", zap.Int64("fileSize", fileSize))
result, err = uploadLargeMedia(ctx, tempFile, apiKey, fileName, description)
}
if err != nil {
return nil, err
}
// 上传后等待并验证 URL 是否可访问
maxRetries := 5
var ok bool
for i := 0; i < maxRetries; i++ {
time.Sleep(2 * time.Second)
ok, err = VerifyMediaURL(ctx, result.URL)
if err == nil && ok {
zap.L().Info("媒体URL验证成功", zap.String("url", result.URL), zap.Int("retry", i))
return result, nil
}
zap.L().Warn("媒体URL验证失败重试中",
zap.String("url", result.URL),
zap.Int("retry", i+1),
zap.Int("maxRetries", maxRetries))
}
return nil, fmt.Errorf("媒体URL验证失败")
}
// downloadFile 下载文件到临时目录
func downloadFile(ctx context.Context, fileURL string) (string, int64, error) {
req, err := http.NewRequestWithContext(ctx, "GET", fileURL, nil)
if err != nil {
return "", 0, err
}
client := &http.Client{Timeout: 10 * time.Minute}
resp, err := client.Do(req)
if err != nil {
return "", 0, err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return "", 0, fmt.Errorf("下载文件失败")
}
// 创建临时文件
tempFile, err := os.CreateTemp("", "ayrshare_upload_*")
if err != nil {
return "", 0, err
}
defer tempFile.Close()
// 复制内容到临时文件
fileSize, err := io.Copy(tempFile, resp.Body)
if err != nil {
os.Remove(tempFile.Name())
return "", 0, err
}
return tempFile.Name(), fileSize, nil
}
// uploadSmallMedia 上传小于30MB的文件使用multipart form-data
func uploadSmallMedia(ctx context.Context, filePath, apiKey, fileName, description string) (*UploadMediaResponse, error) {
file, err := os.Open(filePath)
if err != nil {
return nil, fmt.Errorf("打开文件失败")
}
defer file.Close()
// 创建multipart form-data
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
// 添加文件
part, err := writer.CreateFormFile("file", fileName)
if err != nil {
return nil, err
}
if _, err := io.Copy(part, file); err != nil {
return nil, err
}
// 添加其他字段
if fileName != "" {
_ = writer.WriteField("fileName", fileName)
}
if description != "" {
_ = writer.WriteField("description", description)
}
if err := writer.Close(); err != nil {
return nil, err
}
// 发送请求
url := fmt.Sprintf("%s/media/upload", ayrshareAPIBaseURL)
req, err := http.NewRequestWithContext(ctx, "POST", url, body)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{Timeout: 10 * time.Minute}
resp, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("请求失败")
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("读取响应失败")
}
if resp.StatusCode != http.StatusOK {
zap.L().Error("上传小文件失败", zap.Int("statusCode", resp.StatusCode), zap.String("response", string(respBody)))
return nil, fmt.Errorf("上传失败")
}
var result UploadMediaResponse
if err := json.Unmarshal(respBody, &result); err != nil {
return nil, fmt.Errorf("解析响应失败")
}
zap.L().Info("小文件上传成功", zap.Any("response", result))
return &result, nil
}
// uploadLargeMedia 上传大于30MB的文件使用presigned URL
func uploadLargeMedia(ctx context.Context, filePath, apiKey, fileName, description string) (*UploadMediaResponse, error) {
// 获取文件的content type
ext := filepath.Ext(fileName)
if len(ext) > 0 {
ext = ext[1:] // 去掉点号
}
// Step 1: 获取上传URL
uploadURLResp, err := getUploadURL(ctx, apiKey, fileName, ext)
if err != nil {
return nil, fmt.Errorf("获取上传URL失败")
}
zap.L().Info("获取上传URL成功", zap.Any("uploadURLResp", uploadURLResp))
// Step 2: 上传文件到presigned URL
file, err := os.Open(filePath)
if err != nil {
return nil, fmt.Errorf("打开文件失败")
}
defer file.Close()
// 获取文件大小
fileInfo, err := file.Stat()
if err != nil {
return nil, fmt.Errorf("获取文件信息失败")
}
fileSize := fileInfo.Size()
req, err := http.NewRequestWithContext(ctx, "PUT", uploadURLResp.UploadURL, file)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", uploadURLResp.ContentType)
req.ContentLength = fileSize // 设置Content-Length
client := &http.Client{Timeout: 30 * time.Minute}
resp, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("上传文件失败")
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
respBody, _ := io.ReadAll(resp.Body)
zap.L().Error("上传大文件失败", zap.Int("statusCode", resp.StatusCode), zap.String("response", string(respBody)))
return nil, fmt.Errorf("上传失败")
}
zap.L().Info("大文件上传成功")
// 返回结果
return &UploadMediaResponse{
URL: uploadURLResp.AccessURL,
FileName: fileName,
Description: description,
}, nil
}
// getUploadURL 获取大文件上传的presigned URL
func getUploadURL(ctx context.Context, apiKey, fileName, contentType string) (*UploadURLResponse, error) {
url := fmt.Sprintf("%s/media/uploadUrl?fileName=%s", ayrshareAPIBaseURL, fileName)
if contentType != "" {
url = fmt.Sprintf("%s&contentType=%s", url, contentType)
}
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKey))
client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
if resp.StatusCode != http.StatusOK {
zap.L().Error("获取上传URL失败", zap.Int("statusCode", resp.StatusCode), zap.String("response", string(respBody)))
return nil, fmt.Errorf("获取上传URL失败了")
}
var result UploadURLResponse
if err := json.Unmarshal(respBody, &result); err != nil {
return nil, fmt.Errorf("解析响应失败")
}
return &result, nil
}
// VerifyMediaURL 验证媒体URL是否有效
func VerifyMediaURL(ctx context.Context, mediaURL string) (bool, error) {
url := fmt.Sprintf("%s/media/urlExists", ayrshareAPIBaseURL)
requestBody := map[string]string{
"mediaUrl": mediaURL,
}
jsonData, _ := json.Marshal(requestBody)
code, postBody, err := utils.PostBytesHeader(url, map[string]interface{}{
"Content-Type": "application/json",
"Authorization": "Bearer " + apiKey,
}, jsonData)
if err != nil {
zap.L().Error("VerifyMediaURL 提交异常", zap.Error(err))
return false, errors.New("验证链接提交异常")
}
if code != http.StatusOK {
return false, nil
}
var result *VerifyURLResponse
_ = json.Unmarshal(postBody, &result)
if result.StatusCode != http.StatusOK || result.Status != "success" {
return false, nil
}
return true, nil
}
func SendMessage(ctx *gin.Context) {
var req modelCast.SendMessageReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
if req.RecipientId == "" {
service.Error(ctx, errors.New("请选择接收者"))
return
}
mediaUserInfo, err := GetMediaInfo(req.MediaAccountUuid)
if err != nil {
service.Error(ctx, err)
return
}
var platformName = modelCast.PlatformNameKv[req.PlatformID]
if platformName != "facebook" && platformName != "instagram" && platformName != "twitter" {
service.Error(ctx, errors.New("不支持的媒体"))
return
}
sendResp, err := service.AyrshareProvider.SendMessage(context.Background(), &aryshare.SendMessageRequest{
Platform: platformName,
RecipientId: req.RecipientId,
Message: req.Message,
MediaUrls: []string{},
ProfileKey: mediaUserInfo.AsInfo.ProfileKey,
})
if err != nil {
zap.L().Error("发送消息失败", zap.Error(err), zap.Any("mediaInfo", mediaUserInfo))
service.Error(ctx, errors.New("发送消息异常"))
return
}
if sendResp.Status != "success" {
zap.L().Error("发送消息失败", zap.Any("sendResp", sendResp))
service.Error(ctx, errors.New("发送消息失败"))
return
}
service.Success(ctx, sendResp)
return
}
func GetMessage(ctx *gin.Context) {
var req modelCast.SendMessageReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
mediaUserInfo, err := GetMediaInfo(req.MediaAccountUuid)
if err != nil {
service.Error(ctx, err)
return
}
var platformName = modelCast.PlatformNameKv[mediaUserInfo.PlatformID]
messageResp, err := service.AyrshareProvider.GetMessages(context.Background(), &aryshare.GetMessagesRequest{
Platform: platformName,
Status: "active", // active 主动 archived 已存档
ConversationId: "",
ConversationsOnly: false,
ProfileKey: mediaUserInfo.AsInfo.ProfileKey,
})
if err != nil {
zap.L().Error("获取消息失败", zap.Error(err), zap.Any("mediaInfo", mediaUserInfo))
service.Error(ctx, errors.New("获取消息异常"))
return
}
if messageResp.Status != "success" {
zap.L().Error("获取消息失败", zap.Any("messageResp", messageResp))
service.Error(ctx, errors.New("获取消息失败"))
return
}
service.Success(ctx, messageResp)
return
}
// GetMediaInfo 根据自媒体ID查询信息
func GetMediaInfo(mediaUserID string) (*cast.MediaUserInfo, error) {
userListResp, err := service.CastProvider.MediaUserList(context.Background(), &cast.MediaUserListReq{
MediaUserID: mediaUserID,
NeedAsInfo: true,
PageSize: 1,
})
if err != nil {
return nil, err
}
if userListResp == nil || len(userListResp.Data) == 0 {
return nil, errors.New("未找到该自媒体")
}
return userListResp.Data[0], nil
}
func PostComment(ctx *gin.Context) {
var req modelCast.PostCommentReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
artistInfo, err := service.CastProvider.ArtistInfo(context.Background(), &cast.ArtistInfoReq{
ArtistUuid: req.ArtistUuid,
})
if err != nil {
service.Error(ctx, err)
return
}
commentReq := &aryshare.PostCommentRequest{
Id: req.PublishMediaID,
Comment: req.Comment,
Platforms: []string{modelCast.PlatformNameKv[uint32(req.PlatformID)]},
SearchPlatformId: false,
MediaUrls: nil,
ProfileKey: artistInfo.ProfileKey,
}
zap.L().Info("发布评论", zap.Any("commentReq", commentReq))
commentResp, err := service.AyrshareProvider.PostComment(context.Background(), commentReq)
if err != nil {
zap.L().Error("发布评论异常", zap.Error(err), zap.Any("artistInfo", artistInfo))
service.Error(ctx, errors.New("发布评论异常"))
return
}
if commentResp.Status != "success" {
service.Error(ctx, errors.New("发布评论失败"))
return
}
service.Success(ctx, commentResp)
return
}
func GetComment(ctx *gin.Context) {
var req modelCast.GetCommentReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
artistInfo, err := service.CastProvider.ArtistInfo(context.Background(), &cast.ArtistInfoReq{
ArtistUuid: req.ArtistUuid,
})
if err != nil {
service.Error(ctx, err)
return
}
commentResp, err := service.AyrshareProvider.GetComment(context.Background(), &aryshare.GetCommentRequest{
Id: req.PublishMediaID,
ProfileKey: artistInfo.ProfileKey,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, commentResp)
return
}
func DeleteComment(ctx *gin.Context) {
var req modelCast.DeleteCommentReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
artistInfo, err := service.CastProvider.ArtistInfo(context.Background(), &cast.ArtistInfoReq{
ArtistUuid: req.ArtistUuid,
})
if err != nil {
service.Error(ctx, err)
return
}
commentResp, err := service.AyrshareProvider.DeleteComment(context.Background(), &aryshare.DeleteCommentRequest{
Id: req.CommentId,
Platforms: nil,
Platform: modelCast.PlatformNameKv[uint32(req.PlatformID)],
SearchPlatformId: true,
ProfileKey: artistInfo.ProfileKey,
})
if err != nil {
zap.L().Error("删除评论异常", zap.Error(err), zap.Any("artistInfo", artistInfo))
service.Error(ctx, errors.New("删除评论异常"))
return
}
if commentResp.Status != "success" {
service.Error(ctx, errors.New("删除评论失败"))
return
}
service.Success(ctx, commentResp)
return
}
func ReplyComment(ctx *gin.Context) {
var req modelCast.ReplyCommentReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
artistInfo, err := service.CastProvider.ArtistInfo(context.Background(), &cast.ArtistInfoReq{
ArtistUuid: req.ArtistUuid,
})
if err != nil {
service.Error(ctx, err)
return
}
commentResp, err := service.AyrshareProvider.ReplyComment(context.Background(), &aryshare.ReplyCommentRequest{
Id: req.CommentId,
Comment: req.Comment,
Platforms: []string{modelCast.PlatformNameKv[uint32(req.PlatformID)]},
ProfileKey: artistInfo.ProfileKey,
})
if err != nil {
zap.L().Error("回复评论异常", zap.Error(err), zap.Any("artistInfo", artistInfo))
service.Error(ctx, errors.New("回复评论异常"))
return
}
service.Success(ctx, commentResp)
return
}

View File

@ -1,40 +0,0 @@
package cast
import (
"context"
"fonchain-fiee/api/cast"
"fonchain-fiee/pkg/service"
)
func CheckImage(workUuid string) error {
detailResp, err := service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{WorkUuid: workUuid})
if err != nil {
return err
}
if detailResp.CoverUrl == "" {
return nil
}
if detailResp.WorkCategory == 1 {
return nil
}
resourceResp, err := service.CastProvider.WorkResource(context.Background(), &cast.WorkResourceReq{WorkUuid: workUuid})
if err != nil {
return err
}
if detailResp.CoverUrl == resourceResp.OldCoverUrl {
return nil
}
mediaUrls, err := ProcessImg([]string{detailResp.CoverUrl})
if err != nil {
return err
}
if len(mediaUrls) > 0 {
_, _ = service.CastProvider.UpdateWorkResource(context.Background(), &cast.UpdateWorkResourceReq{
Uuid: "",
WorkUuid: detailResp.WorkUuid,
OldCoverUrl: detailResp.CoverUrl,
NewCoverUrl: mediaUrls[0],
})
}
return nil
}

View File

@ -12,19 +12,12 @@ import (
"fonchain-fiee/cmd/config" "fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/e" "fonchain-fiee/pkg/e"
modelCast "fonchain-fiee/pkg/model/cast" modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"net/http" "net/http"
"net/url" "net/url"
"os"
"path/filepath"
"strconv" "strconv"
"strings"
"time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/xuri/excelize/v2"
"go.uber.org/zap" "go.uber.org/zap"
) )
@ -44,45 +37,6 @@ func MediaUserList(ctx *gin.Context) {
service.Error(ctx, err) service.Error(ctx, err)
return return
} }
if req.NeedStats {
var statResp *bundle.ArtistUploadStatsResponse
zap.L().Info("MediaUserList 1")
//取出艺人num
var artistSubNums []string
for _, v := range resp.Data {
artistSubNums = append(artistSubNums, v.ArtistSubNum)
}
statResp, err = service.BundleProvider.GetArtistUploadStatsList(context.Background(), &bundle.TaskQueryRequest{
Keyword: "",
Page: 0,
PageSize: 0,
SortBy: "",
SortType: "",
LastTaskAssignee: "",
SubNums: artistSubNums,
})
zap.L().Info("MediaUserList 2")
if err != nil {
service.Error(ctx, err)
return
}
for _, v := range resp.Data {
for _, vv := range statResp.Items {
if v.ArtistSubNum == vv.SubNum {
info := vv
// "pendingVideoCount": 10, // 待上传视频数 "uploadedVideoCount": 25, // 已上传视频数 "releasedVideoTotal": 35, // 已释放视频总数
//"pendingPostCount": 14, // 待上传图文数 "uploadedPostCount": 21, // 已上传图文数 "releasedPostTotal": 35, // 已释放图文总数
v.PendingVideoCount = info.PendingVideoCount
v.UploadedVideoCount = info.UploadedVideoCount
v.ReleasedVideoTotal = info.ReleasedVideoTotal
v.PendingPostCount = info.PendingPostCount
v.UploadedPostCount = info.UploadedPostCount
v.ReleasedPostTotal = info.ReleasedPostTotal
}
}
}
}
zap.L().Info("MediaUserList 3")
go func() { go func() {
for _, v := range resp.Data { for _, v := range resp.Data {
_ = SyncAsAuth(v.ArtistUuid) _ = SyncAsAuth(v.ArtistUuid)
@ -169,14 +123,14 @@ func UpdateMediaAccount(ctx *gin.Context) {
} }
if userResp != nil && len(userResp.Data) > 0 { if userResp != nil && len(userResp.Data) > 0 {
for _, v := range userResp.Data { for _, v := range userResp.Data {
if v.PlatformID == uint32(req.PlatformID) && v.Expired == 1 { if v.PlatformID == uint32(req.PlatformID) {
service.Error(ctx, errors.New("账号已存在")) service.Error(ctx, errors.New("账号已存在"))
return return
} }
} }
} }
// 字符串转整型 // 字符串转整型
artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64) artistID, err := strconv.ParseUint(req.ArtistUuid, 10, 64)
infoResp, err = GetArtistAccountInfo(artistID) infoResp, err = GetArtistAccountInfo(artistID)
if err != nil { if err != nil {
service.Error(ctx, err) service.Error(ctx, err)
@ -186,6 +140,8 @@ func UpdateMediaAccount(ctx *gin.Context) {
service.Error(ctx, errors.New("用户不存在")) service.Error(ctx, errors.New("用户不存在"))
return return
} }
//TODO 判断是否注册ay
if err = CheckAsProfile(infoResp); err != nil { if err = CheckAsProfile(infoResp); err != nil {
service.Error(ctx, err) service.Error(ctx, err)
return return
@ -193,14 +149,13 @@ func UpdateMediaAccount(ctx *gin.Context) {
req.ArtistName = infoResp.Name req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum req.ArtistPhone = infoResp.TelNum
req.ArtistPhoneAreaCode = infoResp.TelAreaCode req.ArtistPhoneAreaCode = infoResp.TelAreaCode
req.ArtistSubNum = infoResp.SubNum
if _, ok := cast.PlatformIDENUM_name[int32(req.PlatformID)]; !ok { if _, ok := cast.PlatformIDENUM_name[int32(req.PlatformID)]; !ok {
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams))) service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
return return
} }
userID, _ := strconv.ParseInt(req.ArtistUuid, 10, 64) userID, _ := strconv.ParseInt(req.ArtistUuid, 10, 64)
if req.MediaAccountUuid == "" { if req.MediaAccountUuid == "" {
if _, err = CheckUserBundleBalance(int32(userID), modelCast.BalanceTypeAccountValue); err != nil { if err = CheckUserBundleBalance(int32(userID), modelCast.BalanceTypeAccountValue); err != nil {
service.Error(ctx, err) service.Error(ctx, err)
return return
} }
@ -258,10 +213,6 @@ func OAuthAccount(ctx *gin.Context) {
service.Error(ctx, errors.New("未找到该账号")) service.Error(ctx, errors.New("未找到该账号"))
return return
} }
if mediaResp.Data[0].Expired != 1 {
service.Error(ctx, errors.New("账号已过期"))
return
}
if err = SyncAsAuth(mediaResp.Data[0].ArtistUuid); err != nil { if err = SyncAsAuth(mediaResp.Data[0].ArtistUuid); err != nil {
service.Error(ctx, err) service.Error(ctx, err)
return return
@ -329,7 +280,6 @@ func OAuth2Callback(ctx *gin.Context) {
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams))) service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
return return
} }
req.State = state
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state)) zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
_, err := service.CastProvider.OAuthCodeToToken(ctx, req) _, err := service.CastProvider.OAuthCodeToToken(ctx, req)
if err != nil { if err != nil {
@ -375,7 +325,6 @@ func AsOAuth2Callback(ctx *gin.Context) {
func SyncAsAuth(artistUuid string) error { func SyncAsAuth(artistUuid string) error {
resp, err := service.CastProvider.GetArtist(context.Background(), &cast.GetArtistReq{ArtistUuid: artistUuid}) resp, err := service.CastProvider.GetArtist(context.Background(), &cast.GetArtistReq{ArtistUuid: artistUuid})
if err != nil { if err != nil {
zap.L().Error("SyncAsAuth error", zap.Error(err))
return errors.New("获取艺人信息错误") return errors.New("获取艺人信息错误")
} }
if resp == nil || resp.ArtistInfo == nil || resp.ArtistInfo.ProfileKey == "" { if resp == nil || resp.ArtistInfo == nil || resp.ArtistInfo.ProfileKey == "" {
@ -386,10 +335,10 @@ func SyncAsAuth(artistUuid string) error {
InstagramDetails: true, InstagramDetails: true,
}) })
if err != nil { if err != nil {
zap.L().Error("SyncAsAuth error", zap.Error(err))
return errors.New("获取艺人绑定信息错误") return errors.New("获取艺人绑定信息错误")
} }
authReq := &cast.UpdateOAuthReq{Data: make([]*cast.UpdateOAuthReq_Info, 0)} var authReq *cast.UpdateOAuthReq
authReq = &cast.UpdateOAuthReq{Data: make([]*cast.UpdateOAuthReq_Info, 0)}
if len(userResp.DisplayNames) == 0 { if len(userResp.DisplayNames) == 0 {
//return errors.New("没有授权信息") //return errors.New("没有授权信息")
authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{ authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{
@ -413,14 +362,10 @@ func SyncAsAuth(artistUuid string) error {
if platformIDENUM == cast.PlatformIDENUM_UNKNOWN { if platformIDENUM == cast.PlatformIDENUM_UNKNOWN {
continue continue
} }
asID := v.Id
if platformIDENUM == cast.PlatformIDENUM_BULESKY && asID == "" {
asID = v.Username
}
authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{ authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{
ArtistUuid: artistUuid, ArtistUuid: artistUuid,
PlatformID: platformIDENUM, PlatformID: platformIDENUM,
AsID: asID, AsID: v.Id,
PlatformUserName: v.Username, PlatformUserName: v.Username,
AutInfo: string(asInfoB), AutInfo: string(asInfoB),
}) })
@ -542,233 +487,3 @@ func SyncAsProfile(ctx *gin.Context) {
service.Success(ctx, infoResp) service.Success(ctx, infoResp)
return return
} }
// ImportMediaAccount 导入自媒体账号
func ImportMediaAccount(ctx *gin.Context) {
excelFile, err := ctx.FormFile("file")
if err != nil {
service.Error(ctx, err)
return
}
tempDir := "./runtime/media"
_, err = utils.CheckDirPath(tempDir, true)
if err != nil {
service.Error(ctx, err)
return
}
fileName := fmt.Sprintf("%d_media_account.xlsx", time.Now().UnixMicro())
excelPath := filepath.Join(tempDir, fileName)
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
service.Error(ctx, err)
return
}
// Linux系统下需要显式设置文件权限
if err = os.Chmod(excelPath, 0666); err != nil {
zap.L().Warn("设置文件权限失败", zap.Error(err))
}
excelData, err := excelize.OpenFile(excelPath)
if err != nil {
service.Error(ctx, err)
return
}
defer excelData.Close()
rows, err := excelData.GetRows("Sheet1")
if err != nil {
service.Error(ctx, err)
return
}
loginInfo := login.GetUserInfoFromC(ctx)
for line, row := range rows {
if line == 0 {
continue
}
if len(row) < 3 {
continue
}
subNum := strings.TrimSpace(row[1])
if subNum == "" {
continue
}
var subInfoResp *accountFiee.UserInfoResponse
//查询艺人信息
//if config.AppConfig.System.AppMode == "dev" {
//subInfoResp = &accountFiee.UserInfoResponse{
// Id: 1245,
// SubNum: "FL00023",
// Status: 0,
// Name: "测试远",
// TelNum: "1826145872",
// TelAreaCode: "86",
//}
//} else {
subInfoResp, err = service.AccountFieeProvider.SubNumGetInfo(context.Background(), &accountFiee.SubNumGetInfoRequest{
SubNum: subNum,
Domain: "app",
})
//}
if err != nil {
zap.L().Error("查询艺人出错", zap.Error(err))
excelSetRemark(excelData, line, "查询艺人出错")
continue
}
zap.L().Info("查询艺人成功", zap.Any("subInfoResp", subInfoResp))
if subInfoResp.Id == 0 {
excelSetRemark(excelData, line, "艺人不存在")
continue
}
var tiktokName, insName, dmName, youtubeName, blueskyName string
if len(row) >= 3 {
tiktokName = strings.TrimSpace(row[2])
}
if len(row) >= 4 {
insName = strings.TrimSpace(row[3])
}
if len(row) >= 5 {
dmName = strings.TrimSpace(row[4])
}
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
}
if tiktokName != "" {
if err = updateMediaAccount(tiktokName, cast.PlatformIDENUM_TIKTOK, subInfoResp, loginInfo); err != nil {
excelSetRemark(excelData, line, fmt.Sprintf("%s:%s", tiktokName, err.Error()))
}
}
if insName != "" {
if err = updateMediaAccount(insName, cast.PlatformIDENUM_INS, subInfoResp, loginInfo); err != nil {
excelSetRemark(excelData, line, fmt.Sprintf("%s:%s", insName, err.Error()))
}
}
if dmName != "" {
if err = updateMediaAccount(dmName, cast.PlatformIDENUM_DM, subInfoResp, loginInfo); err != nil {
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)
if err = excelData.SaveAs(resultPath); err != nil {
service.Error(ctx, err)
return
}
// Linux系统下需要显式设置文件权限
if err = os.Chmod(resultPath, 0666); err != nil {
zap.L().Warn("设置文件权限失败", zap.Error(err))
}
// 打开文件 遍历一下 F列没有数据success + 1 并且删掉有值的fail+1 留着
var successCount, failCount int
rows, err = excelData.GetRows("Sheet1")
if err != nil {
service.Error(ctx, err)
return
}
// 记录需要删除的行(从后往前删除,避免行号变化)
rowsToDelete := make([]int, 0)
for line := 1; line < len(rows); line++ { // 从第2行开始跳过表头
remarkCell := fmt.Sprintf("H%d", line+1) // 备注列已移动到H列
remark, _ := excelData.GetCellValue("Sheet1", remarkCell)
if remark == "" {
// H列没有数据表示成功
successCount++
rowsToDelete = append(rowsToDelete, line+1)
} else {
// H列有值表示失败
failCount++
}
}
// 从后往前删除成功的行
for i := len(rowsToDelete) - 1; i >= 0; i-- {
if err = excelData.RemoveRow("Sheet1", rowsToDelete[i]); err != nil {
continue
}
}
// 再次保存文件
if err = excelData.SaveAs(resultPath); err != nil {
service.Error(ctx, err)
return
}
// Linux系统下需要显式设置文件权限
if err = os.Chmod(resultPath, 0666); err != nil {
zap.L().Warn("设置文件权限失败", zap.Error(err))
}
urlHost := config.AppConfig.System.FieeHost
urlResult := fmt.Sprintf("%s/api/fiee/static/media/%s", urlHost, fileName)
service.Success(ctx, map[string]interface{}{
"successCount": successCount,
"failCount": failCount,
"url": urlResult,
})
}
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", "H", line+1))
if oldRemark != "" {
remark = fmt.Sprintf("%s\n%s", oldRemark, 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 {
var err error
//if config.AppConfig.System.AppMode != "dev" {
if _, err = CheckUserBundleBalance(int32(subInfoResp.Id), modelCast.BalanceTypeAccountValue); err != nil {
zap.L().Error("CheckUserBundleBalance err", zap.Error(err), zap.Any("platformName", platformName))
return err
}
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
UserId: int32(subInfoResp.Id),
AccountConsumptionNumber: 1,
})
if err != nil {
zap.L().Error("AddBundleBalance err", zap.Error(err), zap.Any("platformName", platformName))
return err
}
//}
_, err = service.CastProvider.UpdateMediaAccount(context.Background(), &cast.UpdateMediaAccountReq{
PlatformID: platformId,
PlatformUserName: platformName,
PlatformUserID: "",
ArtistUuid: fmt.Sprint(subInfoResp.Id),
ArtistName: subInfoResp.Name,
ArtistPhone: subInfoResp.TelNum,
MediaAccountUuid: "",
ManagerUuid: fmt.Sprint(loginInfo.ID),
ManagerUserName: loginInfo.Name,
ArtistSubNum: subInfoResp.SubNum,
})
//if config.AppConfig.System.AppMode != "dev" {
if err != nil {
zap.L().Error("UpdateMediaAccount err", zap.Error(err), zap.Any("platformName", platformName))
_, _err := service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
UserId: int32(subInfoResp.Id),
AccountConsumptionNumber: -1,
})
zap.L().Error("AddBundleBalance err", zap.Error(_err), zap.Any("platformName", platformName))
}
//}
return err
}

View File

@ -1,440 +0,0 @@
package cast
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/aryshare"
"fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"math/rand"
"path/filepath"
"strings"
"time"
"github.com/gin-gonic/gin"
"github.com/xuri/excelize/v2"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/emptypb"
)
// UpdateCastTag 更新话题标签
func UpdateCastTag(ctx *gin.Context) {
var req *cast.UpdateCastTagReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.UpdateCastTag(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// ListCastTags 获取话题标签列表
func ListCastTags(ctx *gin.Context) {
var req *cast.ListCastTagsReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.ListCastTags(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// ImportTagBatch 批量导入话题标签
func ImportTagBatch(ctx *gin.Context) {
// 接收form表单的Excel保存到本地进行解析
excelFile, err := ctx.FormFile("file")
if err != nil {
service.Error(ctx, err)
return
}
tempDir := "./runtime/tag"
_, err = utils.CheckDirPath(tempDir, true)
fileName := time.Now().Format("20060102150405") + "_in_tag.xlsx"
excelPath := filepath.Join(tempDir, fileName)
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
service.Error(ctx, err)
return
}
// 读取Excel中的数据
excelData, err := excelize.OpenFile(excelPath)
if err != nil {
service.Error(ctx, err)
return
}
defer excelData.Close()
// 解析Excel中的数据
rows, err := excelData.GetRows("Sheet1")
if err != nil {
service.Error(ctx, err)
return
}
req := cast.UpdateCastTagBatchReq{
Data: make([]*cast.CastTagInfo, 0),
}
userInfo := login.GetUserInfoFromC(ctx)
for line, row := range rows {
if line == 0 {
continue
}
temp := cast.CastTagInfo{
CreatorUuid: fmt.Sprint(userInfo.ID),
CreatorName: userInfo.Name,
Source: 1, // 固定来源:人工导入
Status: 1, // 固定状态:有效
}
// 解析Excel列A-话题标签B-备注
if len(row) > 0 {
temp.HashTag = strings.TrimSpace(row[0])
}
if len(row) > 1 {
temp.Remark = strings.TrimSpace(row[1])
}
zap.L().Info("ImportTagBatch row", zap.Int("line", line), zap.Strings("row", row))
// 验证必填字段:话题标签不能为空
if utils.CleanString(temp.HashTag) == "" {
temp.Remark = "必填项未填"
req.Data = append(req.Data, &temp)
continue
}
req.Data = append(req.Data, &temp)
}
newCtx := NewCtxWithUserInfo(ctx)
resp, _err := service.CastProvider.UpdateCastTagBatch(newCtx, &req)
if _err != nil {
service.Error(ctx, _err)
return
}
// 打开模板 写入resp 返回的数据
templatePath := "./data/话题标签导入模板.xlsx"
template, err := excelize.OpenFile(templatePath)
if err != nil {
service.Error(ctx, err)
return
}
defer template.Close()
var urlResult string
if resp.FailCount != 0 {
rowIndex := 2 // 从第2行开始写入第1行是表头
for _, v := range resp.Data {
if v.Success {
continue
}
// 写入失败的数据到Excel模板只写入话题标签和备注两列
template.SetCellValue("Sheet1", fmt.Sprintf("A%d", rowIndex), v.HashTag)
template.SetCellValue("Sheet1", fmt.Sprintf("B%d", rowIndex), v.Remark)
rowIndex++
}
resultFilename := strings.Replace(fileName, "_in_tag.xlsx", "_out_tag.xlsx", -1)
resultPath := fmt.Sprintf("./runtime/tag/%s", resultFilename)
if err = template.SaveAs(resultPath); err != nil {
service.Error(ctx, err)
return
}
urlHost := config.AppConfig.System.FieeHost
urlResult = fmt.Sprintf("%s/api/fiee/static/tag/%s", urlHost, resultFilename)
}
service.Success(ctx, map[string]interface{}{
"successCount": resp.SuccessCount,
"failCount": resp.FailCount,
"resultUrl": urlResult,
})
return
}
// RecalculateCastTagQuoteCount 重新计算话题标签引用数量
func RecalculateCastTagQuoteCount(ctx *gin.Context) {
newCtx := NewCtxWithUserInfo(ctx)
// 创建空的请求对象
req := &emptypb.Empty{}
resp, err := service.CastProvider.RecalculateCastTagQuoteCount(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// findNewTags 对比两次标签,找出新增的标签
func findNewTags(beforeTags, afterTags []string) []string {
// 将 beforeTags 转换为 map方便查找
beforeMap := make(map[string]bool)
for _, tag := range beforeTags {
cleanTag := strings.TrimSpace(tag)
if cleanTag != "" {
beforeMap[cleanTag] = true
}
}
// 找出 afterTags 中不在 beforeTags 中的标签
newTags := make([]string, 0)
for _, tag := range afterTags {
cleanTag := strings.TrimSpace(tag)
if cleanTag != "" && !beforeMap[cleanTag] {
newTags = append(newTags, cleanTag)
}
}
return newTags
}
func GetValidProfileKey(ctx context.Context, platformIDs []uint32) (string, error) {
if len(platformIDs) == 0 {
platformIDs = []uint32{1, 2, 3, 5}
}
profileKeys, err := service.CastProvider.GetArtistAyrShareInfoByPlatformIDs(ctx, &cast.GetArtistAyrShareInfoByPlatformIDsReq{
PlatformIDs: platformIDs,
Page: 1,
PageSize: 20,
})
if err != nil {
zap.L().Error("GetArtistAyrShareInfoByPlatformIDs failed", zap.Error(err))
return "", errors.New("获取有效profileKey失败")
}
if len(profileKeys.Data) == 0 {
return "", errors.New("当前没有有效的profileKey")
}
// 过滤出所有非空的 profileKey
validProfileKeys := make([]string, 0)
for _, item := range profileKeys.Data {
if item.ProfileKey != "" {
validProfileKeys = append(validProfileKeys, item.ProfileKey)
}
}
if len(validProfileKeys) == 0 {
return "", errors.New("profileKey为空")
}
// 从有效的 profileKey 中随机选择一个
randIndex := rand.Intn(len(validProfileKeys))
return validProfileKeys[randIndex], nil
}
// SaveTagsToDatabase 将标签保存到数据库
func SaveTagsToDatabase(ctx *gin.Context, tags []string, source uint32) error {
if len(tags) == 0 {
return nil
}
// 获取用户信息
userInfo := login.GetUserInfoFromC(ctx)
newCtx := NewCtxWithUserInfo(ctx)
// 构建批量导入请求
req := cast.UpdateCastTagBatchReq{
Data: make([]*cast.CastTagInfo, 0, len(tags)),
}
for _, tag := range tags {
tagInfo := &cast.CastTagInfo{
HashTag: tag,
CreatorUuid: fmt.Sprint(userInfo.ID),
CreatorName: userInfo.Name,
Source: source, // 4: 自动标签(从内容中自动提取)
Status: 1, // 1: 有效
}
req.Data = append(req.Data, tagInfo)
}
// 调用批量导入接口
_, err := service.CastProvider.UpdateCastTagBatch(newCtx, &req)
if err != nil {
err = errors.New("标签保存到数据库失败")
zap.L().Error("SaveTagsToDatabase UpdateCastTagBatch failed", zap.Error(err))
return err
}
zap.L().Info("SaveTagsToDatabase success", zap.Int("tagCount", len(tags)), zap.Strings("tags", tags), zap.Uint32("source", source))
return nil
}
func GenerateAutoHashtags(ctx context.Context, post string, max int32, position, language string) (*aryshare.AutoHashtagsResponse, []string, bool, error) {
// 验证帖子内容
if post == "" {
return nil, nil, false, errors.New("帖子内容不能为空")
}
// post 的长度不能超过1000个字符
if len(post) > 1000 {
return nil, nil, false, errors.New("自动生成标签的帖子内容不能超过1000个字符")
}
// 提取生成前的标签
beforeTags := utils.ExtractTags(post)
zap.L().Info("GenerateAutoHashtags beforeTags", zap.Strings("beforeTags", beforeTags))
// 如果标签数量已经达到或超过5个不需要生成
if len(beforeTags) >= 5 {
return nil, nil, false, nil
}
// 设置默认值
if position == "" {
position = "end"
}
if language == "" {
language = "zh"
}
// 如果 max 为0则根据现有标签数自动计算确保总数为5
if max == 0 {
max = int32(5 - len(beforeTags))
}
// 如果此时 max 小于等于0则直接返回
if max <= 0 {
return nil, nil, false, nil
}
profileKey, err := GetValidProfileKey(ctx, []uint32{1, 2, 3, 5})
if err != nil {
return nil, nil, false, err
}
// 构建请求
req := &aryshare.AutoHashtagsRequest{
Post: post,
Max: max,
Position: position,
Language: language,
ProfileKey: profileKey,
}
// 调用 Ayrshare 的 AutoHashtags 接口
resp, err := service.AyrshareProvider.AutoHashtags(ctx, req)
if err != nil {
zap.L().Error("AutoHashtags failed", zap.Error(err))
return nil, nil, false, errors.New("自动生成标签失败")
}
if resp.Post == "" {
return nil, nil, false, errors.New("自动生成标签返回的帖子内容为空")
}
// 去掉自动标签返回的帖子内容多余的引号
resp.Post = utils.CleanAutoHashtagsQuote(resp.Post)
// 提取生成后的标签
afterTags := utils.ExtractTags(resp.Post)
zap.L().Info("GenerateAutoHashtags afterTags", zap.Strings("afterTags", afterTags))
// 对比两次标签,找出新增的标签
newTags := findNewTags(beforeTags, afterTags)
return resp, newTags, true, nil
}
// AutoHashtags 自动生成标签
func AutoHashtags(ctx *gin.Context) {
var req *aryshare.AutoHashtagsRequest
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
// 调用核心逻辑生成标签
resp, newTags, needMore, err := GenerateAutoHashtags(
context.Background(),
req.Post,
req.Max,
req.Position,
req.Language,
)
if err != nil {
service.Error(ctx, err)
return
}
// 如果标签已满5个直接返回
if !needMore {
service.Success(ctx, map[string]interface{}{
"message": "当前帖子的标签已经有5个了",
})
return
}
// 保存新增的标签到数据库Source 设置为 4自动标签
if len(newTags) > 0 {
if err = SaveTagsToDatabase(ctx, newTags, 4); err != nil {
zap.L().Error("SaveTagsToDatabase failed", zap.Error(err), zap.Strings("newTags", newTags))
err = errors.New("标签保存到数据库失败")
service.Error(ctx, err)
return
}
}
service.Success(ctx, resp)
return
}
// RecommendHashtags 推荐标签
func RecommendHashtags(ctx *gin.Context) {
var req *aryshare.RecommendHashtagsRequest
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
profileKey, err := GetValidProfileKey(context.Background(), []uint32{1})
if err != nil {
service.Error(ctx, err)
return
}
req.ProfileKey = profileKey
resp, err := service.AyrshareProvider.RecommendHashtags(context.Background(), req)
if err != nil {
fmt.Println("err", err)
zap.L().Error("RecommendHashtags failed", zap.Error(err))
err = errors.New("推荐标签失败")
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// SearchHashtags 搜索标签
func SearchHashtags(ctx *gin.Context) {
var req *aryshare.SearchHashtagsRequest
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
profileKey, err := GetValidProfileKey(context.Background(), []uint32{3})
if err != nil {
service.Error(ctx, err)
return
}
req.ProfileKey = profileKey
resp, err := service.AyrshareProvider.SearchHashtags(context.Background(), req)
if err != nil {
fmt.Println("err", err)
err = errors.New("获取热门话题标签失败")
zap.L().Error("SearchHashtags failed", zap.Error(err))
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}

View File

@ -1,200 +0,0 @@
package cast
import (
"context"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/service/upload"
"os"
"strings"
"time"
"fonchain-fiee/api/cast"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"github.com/gin-gonic/gin"
"github.com/xuri/excelize/v2"
"go.uber.org/zap"
)
func TaskList(ctx *gin.Context) {
var req *cast.ListTaskListReq
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.ListTaskList(context.Background(), req)
if err != nil {
service.Error(ctx, err)
return
}
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)
}
func DownloadTaskFile(ctx *gin.Context) {
var req *cast.GetTaskListReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.CastProvider.GetTaskList(context.Background(), req)
if err != nil {
service.Error(ctx, err)
return
}
if resp == nil || resp.Data == nil {
service.Error(ctx, errors.New("没有此任务"))
return
}
var taskInfo modelCast.PublishTaskDto
if resp.Data.ExtraData != "" {
_ = json.Unmarshal([]byte(resp.Data.ExtraData), &taskInfo)
}
exportUrl, err := PublishTaskExcel(taskInfo.WorkUuids, false, resp.Data.Action)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func PublishTaskExcel(workUuids []string, uploadOss bool, action string) (string, error) {
// 创建Excel文件
f := excelize.NewFile()
sheetName := "Sheet1"
f.SetSheetName("Sheet1", sheetName)
// 设置表头
headers := []interface{}{
"艺人编号", "艺人姓名", "内容类型", "内容标题",
"执行结果", "TIKTOK", "YOUTUBE", "INS", "DM", "BULESKY",
}
sw, err := f.NewStreamWriter(sheetName)
if err != nil {
return "", err
}
if err = sw.SetRow("A1", headers); err != nil {
return "", err
}
// 遍历所有作品,收集数据
rowIndex := 2
for _, workUuid := range workUuids {
var workResp *cast.WorkDetailResp
workResp, err = service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{WorkUuid: workUuid})
if err != nil {
continue // 如果某个作品获取失败,跳过继续处理其他作品
}
// 内容类型
contentType := ""
if workResp.WorkCategory == 1 {
contentType = "图文"
} else if workResp.WorkCategory == 2 {
contentType = "视频"
}
// 执行结果
executionResult := modelCast.WorkStatusMM[int(workResp.WorkStatus)]
tiktokStatus := ""
youtubeStatus := ""
insStatus := ""
dmStatus := ""
blueskyStatus := ""
// 获取平台信息和艺人姓名
artistName := ""
var infoResp *cast.WorkInfoResp
infoResp, err = service.CastProvider.WorkInfo(context.Background(), &cast.WorkInfoReq{WorkUuid: workUuid})
if err == nil && infoResp != nil {
artistName = infoResp.ArtistName
if infoResp.PlatformInfoData != nil {
for _, platform := range infoResp.PlatformInfoData {
statusText := modelCast.PlatformPublishStatusMM[platform.PublishMediaStatus]
switch cast.PlatformIDENUM(platform.PlatformID) {
case cast.PlatformIDENUM_TIKTOK:
tiktokStatus = statusText
case cast.PlatformIDENUM_YOUTUBE:
youtubeStatus = statusText
case cast.PlatformIDENUM_INS:
insStatus = statusText
case cast.PlatformIDENUM_DM:
dmStatus = statusText
case cast.PlatformIDENUM_BULESKY:
blueskyStatus = statusText
}
}
}
}
row := []interface{}{
workResp.ArtistSubNum,
artistName,
contentType,
workResp.Title,
executionResult,
tiktokStatus,
youtubeStatus,
insStatus,
dmStatus,
blueskyStatus,
}
cell, _ := excelize.CoordinatesToCellName(1, rowIndex)
if err = sw.SetRow(cell, row); err != nil {
continue
}
rowIndex++
}
if err = sw.Flush(); err != nil {
zap.L().Error("PublishTaskExcel Flush err", zap.Error(err))
return "", errors.New("生成Excel文件失败")
}
tempDir := "./runtime/task"
if _, err = os.Stat(tempDir); os.IsNotExist(err) {
if err = os.MkdirAll(tempDir, 0755); err != nil {
return "", err
}
}
TaskActionName, ok := modelCast.TaskActionName[action]
if !ok {
TaskActionName = "未知任务"
}
filename := fmt.Sprintf("%s_%s.xlsx", TaskActionName, time.Now().Format("20060102150405"))
filePath := tempDir + "/" + filename
var exportUrl string = fmt.Sprintf("%s/api/fiee/static/%s", config.AppConfig.System.FieeHost, strings.Replace(filePath, "./runtime/", "", 1))
if err = f.SaveAs(filePath); err != nil {
zap.L().Error("PublishTaskExcel SaveAs err", zap.Error(err))
return "", errors.New("保存Excel文件失败")
}
if uploadOss {
// 上传到阿里云
exportUrl, err = upload.PutBos(filePath, "excel", true)
if err != nil {
return "", err
}
}
return exportUrl, nil
}

View File

@ -2,13 +2,11 @@ package cast
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"fonchain-fiee/api/aryshare" "fonchain-fiee/api/aryshare"
"fonchain-fiee/api/cast" "fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config" "fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/check"
"fonchain-fiee/pkg/utils" "fonchain-fiee/pkg/utils"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@ -16,17 +14,6 @@ import (
func Test(ctx *gin.Context) { func Test(ctx *gin.Context) {
action := ctx.PostForm("action") action := ctx.PostForm("action")
if action == "" {
workUuid := ctx.PostForm("workUuid")
err := CheckImage(workUuid)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, nil)
return
}
if action == "getPost" { if action == "getPost" {
id := ctx.PostForm("id") id := ctx.PostForm("id")
profileKey := ctx.PostForm("profileKey") profileKey := ctx.PostForm("profileKey")
@ -81,11 +68,24 @@ func Test(ctx *gin.Context) {
return return
} }
if action == "" {
profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
ProfileKey: profileKey,
InstagramDetails: true,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
if action == "getProfile" { if action == "getProfile" {
//profileKey := ctx.PostForm("profileKey") //profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetProfiles(context.Background(), &aryshare.GetProfilesRequest{ resp, err := service.AyrshareProvider.GetProfiles(context.Background(), &aryshare.GetProfilesRequest{
Title: "", Title: "",
RefId: "79f8d38afe5922f19bd02b21f838354ae8927d66", RefId: "",
HasActiveSocialAccounts: false, HasActiveSocialAccounts: false,
IncludesActiveSocialAccounts: nil, IncludesActiveSocialAccounts: nil,
ActionLog: nil, ActionLog: nil,
@ -99,81 +99,6 @@ func Test(ctx *gin.Context) {
service.Success(ctx, resp) service.Success(ctx, resp)
return return
} }
if action == "upload" {
fileUrl := ctx.PostForm("fileUrl")
uploadResp, err := UploadMediaByURL(ctx, fileUrl, "", "")
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, uploadResp)
return
}
if action == "getUrl" {
fileUrl := ctx.PostForm("fileUrl")
uploadResp, err := VerifyMediaURL(ctx, fileUrl)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, uploadResp)
return
}
if action == "syncArtist" {
service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: action})
return
}
if action == "artistOrderInfo" {
service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: action})
return
}
if action == "SecurityText" {
val := ctx.PostForm("val")
ok, err := check.SecurityFile(val)
if err != nil {
service.Error(ctx, err)
return
}
if !ok {
service.Error(ctx, errors.New("标题鉴定未通过"))
return
}
service.Success(ctx, "ok")
}
if action == "SecurityFile" {
val := ctx.PostForm("val")
ok, err := check.SecurityFile(val)
if err != nil {
service.Error(ctx, err)
return
}
if !ok {
service.Error(ctx, errors.New("标题鉴定未通过"))
return
}
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")
}
if action == "RefreshWorkList" {
resp, err := service.CastProvider.RefreshWorkList(context.Background(), &cast.RefreshWorkListReq{PublishStatus: 1})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
service.Success(ctx, "unknow") service.Success(ctx, "unknow")
return return
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
package check
import (
"errors"
"fmt"
"mime/multipart"
"time"
pkgSecurity "fonchain-fiee/pkg/security"
"github.com/fonchain/utils/security"
)
// ImageCheckUrlValid 图片黄疸检测 true 是通过
func ImageCheckUrlValid(imgUrl string) (bool, error) {
resp, err := pkgSecurity.ImageScanner.ScanImageByURL(imgUrl, fmt.Sprint(time.Now().UnixMicro()), security.BaselineCheckGlobal)
if err != nil {
err = errors.New("图片检测请求失败")
return false, err
}
if resp.Code != 200 {
err = errors.New("图片检测失败,错误码")
return false, err
}
if len(resp.Data) == 0 || len(resp.Data[0].Results) == 0 {
return false, errors.New("图片检测结果异常")
}
riskLevel := resp.Data[0].Results[0].RiskLevel
if *riskLevel == "none" {
return true, nil
}
return false, nil
}
func ImageCheckByte(file *multipart.FileHeader) (bool, error) {
//imageScanner, err := security.NewImageScanner(&security.Config{
// RAMAccessKeyID: "LTAI5tNBzbeEbG1yCitvHsMb",
// RAMAccessKeySecret: "G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO",
// RAMRoleArn: "acs:ram::5828544250383902:role/content-secret",
// Region: "ap-southeast-1",
// Endpoint: "green-cip.ap-southeast-1.aliyuncs.com",
// TempAccessKeyID: "",
// TempAccessKeySecret: "",
// SecurityToken: "",
//})
//if err != nil {
// return false, err
//}
//resp, err := imageScanner.ScanImageByFileByte(file, fmt.Sprint(time.Now().UnixMicro()), security.BaselineCheckGlobal)
//fmt.Println(resp)
return false, nil
}

View File

@ -1,240 +0,0 @@
package check
import (
"errors"
"fmt"
"mime/multipart"
"path/filepath"
"strconv"
"time"
modelSecurity "fonchain-fiee/pkg/model/security"
pkgSecurity "fonchain-fiee/pkg/security"
"github.com/fonchain/utils/security"
"go.uber.org/zap"
)
// ImageCheckUrlValid 图片黄疸检测 true 是通过
func ImageCheckUrlValid(imgUrl string) (bool, error) {
resp, err := pkgSecurity.ImageScanner.ScanImageByURL(imgUrl, fmt.Sprint(time.Now().UnixMicro()), security.BaselineCheckGlobal)
if err != nil {
err = errors.New("图片检测请求失败")
return false, err
}
if resp.Code != 200 {
err = errors.New("图片检测失败,错误码")
return false, err
}
if len(resp.Data) == 0 || len(resp.Data[0].Results) == 0 {
return false, errors.New("图片检测结果异常")
}
riskLevel := resp.Data[0].Results[0].RiskLevel
if *riskLevel == "none" {
return true, nil
}
return false, nil
}
func ImageCheckByte(file *multipart.FileHeader) (bool, error) {
//imageScanner, err := security.NewImageScanner(&security.Config{
// RAMAccessKeyID: "LTAI5tNBzbeEbG1yCitvHsMb",
// RAMAccessKeySecret: "G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO",
// RAMRoleArn: "acs:ram::5828544250383902:role/content-secret",
// Region: "ap-southeast-1",
// Endpoint: "green-cip.ap-southeast-1.aliyuncs.com",
// TempAccessKeyID: "",
// TempAccessKeySecret: "",
// SecurityToken: "",
//})
//if err != nil {
// return false, err
//}
//resp, err := imageScanner.ScanImageByFileByte(file, fmt.Sprint(time.Now().UnixMicro()), security.BaselineCheckGlobal)
//fmt.Println(resp)
return false, nil
}
func SecurityFile(textVal string) (bool, error) {
return true, nil
if textVal == "" {
return true, nil
}
var fileInfo modelSecurity.FileInfo
fileInfo.FileName = textVal
fileInfo.FileUrl = textVal
//获取文件名称后缀
extension := filepath.Ext(textVal)
switch extension {
case ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp":
fileInfo.FileType = "image"
case ".mp4", ".avi", ".mov", ".wmv", ".flv", ".mkv":
fileInfo.FileType = "video"
default:
return true, nil
}
err := securityScan(&fileInfo)
if err != nil {
return false, err
}
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
}
err = aliConfig.GetSTSToken()
if err != nil {
zap.L().Error("获取凭证失败", zap.Error(err))
return false, errors.New("获取凭证失败")
}
if err = handleTextScan(aliConfig, textVal); err != nil {
return false, err
}
return true, nil
}
func securityScan(fileInfo *modelSecurity.FileInfo) (err error) {
//加载阿里云配置获取临时token
aliConfig, err := pkgSecurity.GetGlobalConfig("./data/alibabacloud.env")
if err != nil {
return err
}
err = aliConfig.GetSTSToken()
if err != nil {
zap.L().Error("获取凭证失败", zap.Error(err))
return errors.New("获取凭证失败")
}
switch fileInfo.FileType {
case "image":
return handleImageScan(aliConfig, fileInfo)
case "video":
return handleVideoScan(aliConfig, fileInfo)
default:
return errors.New("不支持的审核类型")
}
}
func handleVideoScan(config *security.Config, fileInfo *modelSecurity.FileInfo) (err error) {
fmt.Println("\n=== 视频内容安全审核 ===")
scanner, err := security.NewVideoScanner(config)
if err != nil {
fmt.Printf("创建视频扫描器失败: %v\n", err)
return errors.New("创建视频扫描器失败")
}
if fileInfo.FileUrl == "" {
fmt.Println("视频不能为空")
return errors.New("视频不能为空")
}
serviceType := security.VideoPostCheckByVLGlobal
dataID := "video_" + time.Now().Format("20060102150405")
fmt.Println("正在扫描视频(这可能需要几分钟)...")
result, err := scanner.ScanVideoAndWait(fileInfo.FileUrl, dataID, serviceType, 10*time.Minute)
if err != nil {
fmt.Printf("扫描失败: %v\n", err)
return errors.New("扫描失败")
}
scanner.PrintResult(result)
for _, v := range result.Data {
fileInfo.SecurityStatus = *v.Results.RiskLevel
if v.Results.FrameResult != nil {
frameResult := *v.Results.FrameResult
if len(frameResult.FrameSummarys) > 0 {
for _, summary := range frameResult.FrameSummarys {
fileInfo.Describe = fileInfo.Describe + *summary.Description + ";"
}
}
if len(frameResult.Frames) > 0 {
for _, frame := range frameResult.Frames {
fileInfo.ProblemTimeFrame = fileInfo.ProblemTimeFrame + strconv.FormatFloat(float64(*frame.Offset), 'f', 2, 64) + "秒;"
}
}
}
if v.Results.RiskLevel != nil {
lv := v.Results.RiskLevel
//if *lv == "none" {
if *lv != "high" {
return nil
}
return errors.New("图片违规")
}
return errors.New("风险等级检测未成功")
}
return nil
}
func handleImageScan(config *security.Config, fileInfo *modelSecurity.FileInfo) (err error) {
fmt.Println("\n=== 图片内容安全审核 ===")
scanner, err := security.NewImageScanner(config)
if err != nil {
fmt.Printf("创建图片扫描器失败:%v", err)
return errors.New("创建图片扫描器失败")
}
if fileInfo.FileUrl == "" {
fmt.Println("文件不能为空")
return errors.New("文件不能为空")
}
serviceType := security.PostImageCheckByVLGlobal
fmt.Println("正在扫描图片...")
result, err := scanner.ScanImageByURL(fileInfo.FileUrl, "image_"+time.Now().Format("20060102150405"), serviceType)
if err != nil {
fmt.Printf("扫描失败: %v\n", err)
return errors.New("扫描失败")
}
scanner.PrintResult(result)
for _, v := range result.Data {
for _, v2 := range v.Results {
fileInfo.SecurityStatus = *v2.RiskLevel
if v2.RiskLevel != nil {
lv := v2.RiskLevel
//if *lv == "none" {
if *lv != "high" {
return nil
}
return errors.New("图片违规")
}
return errors.New("风险等级检测未成功")
}
}
return nil
}
func handleTextScan(config *security.Config, textVal string) (err error) {
fmt.Println("\n=== 图片内容安全审核 ===")
scanner, err := security.NewTextScanner(config)
if err != nil {
fmt.Printf("创建扫描器失败:%v", err)
return errors.New("创建扫描器失败")
}
serviceType := security.TextBaselineCheckGlobal
fmt.Println("正在扫描图片...")
result, err := scanner.ScanText(textVal, "image_"+time.Now().Format("20060102150405"), serviceType)
if err != nil {
fmt.Printf("扫描失败: %v\n", err)
return errors.New("扫描失败")
}
scanner.PrintResult(result)
for _, v := range result.Data {
for _, vv := range v.Results {
label := *vv.Label
if label != "nonLabel" {
return errors.New("风险等级过高")
}
}
}
fmt.Println(result)
return nil
}

View File

@ -1,386 +0,0 @@
package cron
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"
)
func CreateScheduleTask(c *gin.Context) {
var req cron.CreateScheduleTaskRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.CreateScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func UpdateScheduleTask(c *gin.Context) {
var req cron.UpdateScheduleTaskRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.UpdateScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func GetListScheduleTask(c *gin.Context) {
var req cron.GetListScheduleTaskRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.GetListScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func GetListExecutionRecord(c *gin.Context) {
var req cron.GetListExecutionRecordRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.GetListExecutionRecord(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func GetListExecutionResult(c *gin.Context) {
var req cron.GetListExecutionResultRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.GetListExecutionResult(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func ExportExcelExecutionResult(c *gin.Context) {
var req cron.GetListExecutionResultRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.GetListExecutionResult(context.Background(), &req)
if err != nil {
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{
"任务标题", "艺人编号", "艺人姓名", "内容类型", "内容标题", "执行结果", "原因", "TIKTOK", "YOUTUBE", "INS", "DM", "BULESKY",
}
var dataList []interface{}
for _, task := range res.Data {
data := []interface{}{
task.TaskTitle,
idFindSubName[uint64(task.ArtistId)],
task.ArtistName,
task.ContentTypeDescription,
task.WorkTitle,
task.ResultDescription,
task.ResultDesc,
task.TIKTOKStatusDesc,
task.YOUTUBEStatusDesc,
task.INSStatusDesc,
task.DMStatusDesc,
task.BULESKYStatusDesc,
}
dataList = append(dataList, &data)
}
content, err := utils.ToExcelByType(titleList, dataList, "slice", "")
if err != nil {
service.Error(c, errors.New("生成excel失败"))
}
utils.ResponseXls(c, content, fmt.Sprintf("失败任务报告_%s.xlsx", time.Now().Format("20060102150405")))
return
}
func StartScheduleTask(c *gin.Context) {
var req cron.CommonIDRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.StartScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func PauseScheduleTask(c *gin.Context) {
var req cron.CommonIDRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.PauseScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func DeleteScheduleTask(c *gin.Context) {
var req cron.CommonIDRequest
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, errors.New("参数错误"))
return
}
res, err := service.CronProvider.DeleteScheduleTask(context.Background(), &req)
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
service.Success(c, res)
}
func GetScheduleTaskStatus(c *gin.Context) {
res, err := service.CronProvider.GetScheduleTaskStatus(context.Background(), &emptypb.Empty{})
if err != nil {
service.Error(c, errors.New("网络超时,请重试"))
return
}
if res.Code != 200 {
service.Error(c, errors.New(res.Message))
return
}
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

@ -1,38 +0,0 @@
package emailalerts
import (
"errors"
"fonchain-fiee/api/emailAlerts"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
"github.com/gin-gonic/gin"
)
func EmailAlertSubmit(ctx *gin.Context) {
var req emailAlerts.EmailAlertsSubmitReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.EmailAlertsProvider.EmailAlertsSubmit(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.ErrorEmailAlertSubmitFailed))
return
}
service.Success(ctx, resp)
}
func GetEmailInformationList(ctx *gin.Context) {
var req emailAlerts.GetEmailInformationListReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.EmailAlertsProvider.GetEmailInformationList(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.ErrorGetEmailInformationListFailed))
return
}
service.Success(ctx, resp)
}

View File

@ -2,9 +2,7 @@ package file
import ( import (
"bytes" "bytes"
"context"
"errors" "errors"
"fmt"
"fonchain-fiee/api/files" "fonchain-fiee/api/files"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common" "fonchain-fiee/pkg/service/bundle/common"
@ -16,7 +14,6 @@ import (
"time" "time"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.uber.org/zap"
) )
func Raw(ctx *gin.Context) { func Raw(ctx *gin.Context) {
@ -103,15 +100,6 @@ func Create(ctx *gin.Context) {
} }
func Delete(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{ resp, err := service.FilesProvider.Delete(ctx, &files.DeleteReq{
Path: ctx.DefaultQuery("path", "/"), Path: ctx.DefaultQuery("path", "/"),
UserSpacePath: getUserSpacePath(ctx), UserSpacePath: getUserSpacePath(ctx),
@ -294,81 +282,3 @@ func getUserSpacePath(ctx *gin.Context) string {
return "" return ""
} }
func SecurityScan(ctx *gin.Context) {
var req files.SecurityScanReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
go func() {
// 使用独立的 context避免原请求 context 被取消
scanCtx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// 执行安全扫描
_, err := service.FilesProvider.SecurityScan(scanCtx, &req)
if err != nil {
// 记录错误日志
zap.L().Error("安全扫描失败",
zap.String("url", req.Url),
zap.String("fileName", req.FileName),
zap.Error(err))
} else {
zap.L().Info("安全扫描完成",
zap.String("url", req.Url),
zap.String("fileName", req.FileName))
}
}()
service.Success(ctx, gin.H{
"message": "安全扫描任务已提交,正在后台处理",
})
}
func UpdateFileSecurityStatus(ctx *gin.Context) {
var req files.UpdateFileSecurityStatusReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.FilesProvider.UpdateFileSecurityStatus(ctx, &req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
}
func ManualAnti(ctx *gin.Context) {
var req files.ManualAntiReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
go func() {
resp, err := service.FilesProvider.ManualAnti(ctx, &req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
}()
service.Success(ctx, gin.H{
"message": "手动反制任务已提交,正在后台处理",
})
}
func GetFileSecurityStatus(ctx *gin.Context) {
var req files.GetFileSecurityStatusReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.FilesProvider.GetFileSecurityStatus(ctx, &req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
}

Some files were not shown because too many files have changed in this diff Show More