Compare commits
No commits in common. "main" and "feat-hjj-FileManager" have entirely different histories.
main
...
feat-hjj-F
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,5 +31,3 @@
|
||||
/cmd/logs/*.log
|
||||
/cmd/runtime/log/*.log
|
||||
/build/*
|
||||
CLAUDE.md
|
||||
.claude/settings.local.json
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -66,9 +66,6 @@ service AccountFiee {
|
||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
||||
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
rpc GetInviterInfo(InviterInfoRequest) returns(InviterInfoResponse) {} //获取邀请人信息
|
||||
rpc GetInviterList(InviterListRequest) returns(InviterListResponse) {} //获取邀请人信息
|
||||
rpc WriteOff (WriteOffRequest) returns (RemoveResponse) {} //用户注销
|
||||
|
||||
|
||||
rpc CreateUserAndRealName (CreateUserAndRealNameRequest) returns (CreateUserAndRealNameResponse) {}// 创建用户并实名, 自动导入
|
||||
@ -104,21 +101,7 @@ service AccountFiee {
|
||||
rpc GetChatAutoReplyRulerDetail ( GetChatAutoReplyRulerByIdRequest )returns( ChatAutoReplyRulerData ){} //查询自动回复规则详情
|
||||
rpc GetChatAutoReplyRulerList ( GetChatAutoReplyRulerListRequest )returns( GetChatAutoReplyRulerListResp ){} //查询自动回复规则列表
|
||||
}
|
||||
message InviterListRequest{
|
||||
repeated uint64 ids =1;
|
||||
}
|
||||
message InviterListResponse{
|
||||
repeated InviterInfoResponse list = 1;
|
||||
}
|
||||
message InviterInfoRequest{
|
||||
string code = 1;
|
||||
}
|
||||
message InviterInfoResponse{
|
||||
uint64 id = 1;
|
||||
string code = 2;
|
||||
string name = 3;
|
||||
string telNum = 4;
|
||||
}
|
||||
|
||||
message VerifySliderStatusRequest {
|
||||
string nonceStr = 1;
|
||||
}
|
||||
@ -200,11 +183,6 @@ message UserListInfo{
|
||||
string idNumber = 21;
|
||||
string dateOfBirth = 22;
|
||||
string age = 23;
|
||||
string email = 24;
|
||||
string abroadTelAreaCode = 25;
|
||||
string abroadTel = 26;
|
||||
string inviterName = 27;
|
||||
string inviterCode = 28;
|
||||
}
|
||||
message UserListRequest{
|
||||
string domain = 1;
|
||||
@ -220,8 +198,6 @@ message UserListRequest{
|
||||
repeated int64 ids = 11;
|
||||
string nationality = 12;
|
||||
string nameAndNumber = 13;
|
||||
string email = 14;
|
||||
string abroadTel = 15;
|
||||
}
|
||||
message UserInfoResponse{
|
||||
uint64 id = 1;
|
||||
@ -245,11 +221,6 @@ message UserInfoResponse{
|
||||
string telAreaCode = 19;
|
||||
string idNumber = 20;
|
||||
string dateOfBirth = 21;
|
||||
string email = 22;
|
||||
string abroadTelAreaCode = 23;
|
||||
string abroadTel = 24;
|
||||
uint64 inviterId = 25;
|
||||
|
||||
}
|
||||
message RealNameResponse{
|
||||
uint64 id = 1;
|
||||
@ -529,6 +500,20 @@ message RemoveRequest {
|
||||
}
|
||||
message WriteOffRequest{
|
||||
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{
|
||||
uint64 page = 1;
|
||||
@ -556,9 +541,6 @@ message UpdateRequest {
|
||||
string Domain = 2 [json_name = "domain"];
|
||||
string Language = 3 [json_name = "language"];
|
||||
string NickName = 4 [json_name = "nickName"];
|
||||
string Email = 5 [json_name = "email"];
|
||||
string AbroadTel = 6 [json_name = "abroadTel"];
|
||||
string AbroadTelAreaCode = 7 [json_name = "abroadTelAreaCode"];
|
||||
}
|
||||
|
||||
message Operator {
|
||||
@ -650,8 +632,6 @@ message RegistRequest {
|
||||
string telAreaCode = 5;
|
||||
string language = 6;
|
||||
string nickName = 7;
|
||||
uint64 inviterID = 8;
|
||||
string inviterCode = 9;
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
@ -729,7 +709,6 @@ message AccountInfo {
|
||||
string updatedAt = 41;
|
||||
string SecurityCode = 42 [json_name = "securityCode"];
|
||||
string BlockAddr = 43 [json_name = "blockAddr"];
|
||||
bool WriteOff = 44 [json_name = "writeOff"];
|
||||
}
|
||||
|
||||
message UserInfoV2 {
|
||||
|
||||
@ -17,25 +17,6 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *InviterListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InviterListResponse) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *InviterInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InviterInfoResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderStatusRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -70,9 +70,6 @@ type AccountFieeClient interface {
|
||||
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
||||
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||
GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment)
|
||||
GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment)
|
||||
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)
|
||||
// submit info
|
||||
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)
|
||||
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
GetInviterInfo func(ctx context.Context, in *InviterInfoRequest) (*InviterInfoResponse, error)
|
||||
GetInviterList func(ctx context.Context, in *InviterListRequest) (*InviterListResponse, error)
|
||||
WriteOff func(ctx context.Context, in *WriteOffRequest) (*RemoveResponse, error)
|
||||
CreateUserAndRealName func(ctx context.Context, in *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
||||
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
||||
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
||||
@ -442,24 +436,6 @@ func (c *accountFieeClient) SendNationTemplateMsg(ctx context.Context, in *SendN
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationTemplateMsg", in, out)
|
||||
}
|
||||
|
||||
func (c *accountFieeClient) GetInviterInfo(ctx context.Context, in *InviterInfoRequest, opts ...grpc_go.CallOption) (*InviterInfoResponse, common.ErrorWithAttachment) {
|
||||
out := new(InviterInfoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *accountFieeClient) GetInviterList(ctx context.Context, in *InviterListRequest, opts ...grpc_go.CallOption) (*InviterListResponse, common.ErrorWithAttachment) {
|
||||
out := new(InviterListResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetInviterList", in, out)
|
||||
}
|
||||
|
||||
func (c *accountFieeClient) 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) {
|
||||
out := new(CreateUserAndRealNameResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -674,9 +650,6 @@ type AccountFieeServer interface {
|
||||
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||
GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error)
|
||||
GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error)
|
||||
WriteOff(context.Context, *WriteOffRequest) (*RemoveResponse, error)
|
||||
CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error)
|
||||
// submit info
|
||||
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
||||
@ -838,15 +811,6 @@ func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *Verif
|
||||
func (UnimplementedAccountFieeServer) SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendNationTemplateMsg not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) GetInviterInfo(context.Context, *InviterInfoRequest) (*InviterInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInviterInfo not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) GetInviterList(context.Context, *InviterListRequest) (*InviterListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInviterList not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) WriteOff(context.Context, *WriteOffRequest) (*RemoveResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WriteOff not implemented")
|
||||
}
|
||||
func (UnimplementedAccountFieeServer) CreateUserAndRealName(context.Context, *CreateUserAndRealNameRequest) (*CreateUserAndRealNameResponse, error) {
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
in := new(CreateUserAndRealNameRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -3218,18 +3095,6 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "SendNationTemplateMsg",
|
||||
Handler: _AccountFiee_SendNationTemplateMsg_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInviterInfo",
|
||||
Handler: _AccountFiee_GetInviterInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInviterList",
|
||||
Handler: _AccountFiee_GetInviterList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WriteOff",
|
||||
Handler: _AccountFiee_WriteOff_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateUserAndRealName",
|
||||
Handler: _AccountFiee_CreateUserAndRealName_Handler,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -206,15 +206,6 @@ func (this *GenerateJWTRequest) Validate() error {
|
||||
func (this *GenerateJWTResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UnlinkSocialNetworkRequest) Validate() error {
|
||||
if this.Platform == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Platform", fmt.Errorf(`platform不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UnlinkSocialNetworkResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *HistoryPostId) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v6.32.0--rc2
|
||||
// - protoc v3.21.1
|
||||
// source: pb/ayrshare.proto
|
||||
|
||||
package aryshare
|
||||
@ -37,7 +37,6 @@ type AyrshareClient interface {
|
||||
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)
|
||||
GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment)
|
||||
UnlinkSocialNetwork(ctx context.Context, in *UnlinkSocialNetworkRequest, opts ...grpc_go.CallOption) (*UnlinkSocialNetworkResponse, 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)
|
||||
@ -72,7 +71,6 @@ type AyrshareClientImpl struct {
|
||||
CreateProfile func(ctx context.Context, in *CreateProfileRequest) (*CreateProfileResponse, error)
|
||||
GetProfiles func(ctx context.Context, in *GetProfilesRequest) (*GetProfilesResponse, error)
|
||||
GenerateJWT func(ctx context.Context, in *GenerateJWTRequest) (*GenerateJWTResponse, error)
|
||||
UnlinkSocialNetwork func(ctx context.Context, in *UnlinkSocialNetworkRequest) (*UnlinkSocialNetworkResponse, 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)
|
||||
@ -139,12 +137,6 @@ func (c *ayrshareClient) GenerateJWT(ctx context.Context, in *GenerateJWTRequest
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateJWT", in, out)
|
||||
}
|
||||
|
||||
func (c *ayrshareClient) UnlinkSocialNetwork(ctx context.Context, in *UnlinkSocialNetworkRequest, opts ...grpc_go.CallOption) (*UnlinkSocialNetworkResponse, common.ErrorWithAttachment) {
|
||||
out := new(UnlinkSocialNetworkResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnlinkSocialNetwork", 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)
|
||||
@ -254,7 +246,6 @@ type AyrshareServer interface {
|
||||
CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error)
|
||||
GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error)
|
||||
GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error)
|
||||
UnlinkSocialNetwork(context.Context, *UnlinkSocialNetworkRequest) (*UnlinkSocialNetworkResponse, error)
|
||||
// 历史记录相关 api
|
||||
GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error)
|
||||
GetHistoryById(context.Context, *GetHistoryByIdRequest) (*GetHistoryByIdResponse, error)
|
||||
@ -302,9 +293,6 @@ func (UnimplementedAyrshareServer) GetProfiles(context.Context, *GetProfilesRequ
|
||||
func (UnimplementedAyrshareServer) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateJWT not implemented")
|
||||
}
|
||||
func (UnimplementedAyrshareServer) UnlinkSocialNetwork(context.Context, *UnlinkSocialNetworkRequest) (*UnlinkSocialNetworkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnlinkSocialNetwork not implemented")
|
||||
}
|
||||
func (UnimplementedAyrshareServer) GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetHistory not implemented")
|
||||
}
|
||||
@ -555,35 +543,6 @@ func _Ayrshare_GenerateJWT_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Ayrshare_UnlinkSocialNetwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UnlinkSocialNetworkRequest)
|
||||
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("UnlinkSocialNetwork", 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_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 {
|
||||
@ -1079,10 +1038,6 @@ var Ayrshare_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "GenerateJWT",
|
||||
Handler: _Ayrshare_GenerateJWT_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnlinkSocialNetwork",
|
||||
Handler: _Ayrshare_UnlinkSocialNetwork_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetHistory",
|
||||
Handler: _Ayrshare_GetHistory_Handler,
|
||||
|
||||
16415
api/bundle/bundle.pb.go
16415
api/bundle/bundle.pb.go
File diff suppressed because it is too large
Load Diff
@ -17,9 +17,6 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *GetInEffectOrderRecordRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *QueryTheOrderSnapshotInformationReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -487,12 +484,6 @@ func (this *GetBundleBalanceByUserIdReq) Validate() error {
|
||||
func (this *GetBundleBalanceByUserIdResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceByOrderUUIDReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceByOrderUUIDResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OnlyAddValueListByOrderNoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -749,22 +740,6 @@ func (this *SetPendingTaskLayoutReq) Validate() error {
|
||||
func (this *SetPendingTaskLayoutResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TaskWorkLogQueryRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TaskWorkLogInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TaskWorkLogQueryResponse) Validate() error {
|
||||
for _, item := range this.Records {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Records", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateTaskWorkLogRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -837,320 +812,3 @@ func (this *MetricsVideoSubmitExportItem) Validate() error {
|
||||
func (this *MetricsBalanceDetailExportReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerListResponse) 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 *CustomerDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerDetailResponse) Validate() error {
|
||||
if this.Customer != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Customer); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Customer", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerUpdateRequest) Validate() error {
|
||||
if this.Customer != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Customer); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Customer", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CustomerInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Customer) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ReferralPersonListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ReferralPersonListResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractUpdateRequest) Validate() error {
|
||||
if this.Contract != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Contract); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Contract", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ContractListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractListResponse) 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 *ContractDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractDetailResponse) Validate() error {
|
||||
if this.Contract != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Contract); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Contract", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetDevelopmentCyclesByContractUUIDRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetDevelopmentCyclesByContractUUIDResponse) 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 *GetPaymentCyclesByContractUUIDRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetPaymentCyclesByContractUUIDResponse) 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 *AttachmentItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ContractInfo) Validate() error {
|
||||
for _, item := range this.ContractAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ContractAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.OtherAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OtherAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Contract) Validate() error {
|
||||
for _, item := range this.ContractAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ContractAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.OtherAttachments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OtherAttachments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.PaymentCycles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("PaymentCycles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.DevelopmentCycles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DevelopmentCycles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ContractPaymentCycle) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DevelopmentCycle) 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 *CreateInvoiceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateInvoiceResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreatePaperInvoiceAddressReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreatePaperInvoiceAddressResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InvoiceInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceListResp) 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 *UpdateInvoiceExpressInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateInvoiceExpressInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceExpressInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceExpressInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetOrderInfoByOrderNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetOrderInfoByOrderNoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WorkCastInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ExportWorkCastInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ExportWorkCastInfoResp) 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 *OrderInfoByOrderUuidRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceInfoByOrderNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *InvoiceInfoByOrderNo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetInvoiceInfoByOrderNoResp) 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 *GetLastInvoiceNoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetLastInvoiceNoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdataInvoiceInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdataInvoiceInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SendQuestionnaireSurveyRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SendQuestionnaireSurveyResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuestionnaireSurveyInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SurveyBundleInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuestionnaireSurveyInfoResponse) Validate() error {
|
||||
if this.BundleInfo != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.BundleInfo); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("BundleInfo", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SurveyAnswer) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SurveyFeedback) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateQuestionnaireSurveyAnswerRequest) Validate() error {
|
||||
if this.SurveyAnswer != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.SurveyAnswer); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("SurveyAnswer", err)
|
||||
}
|
||||
}
|
||||
if this.SurveyFeedback != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.SurveyFeedback); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("SurveyFeedback", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateQuestionnaireSurveyAnswerResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuestionnaireSurveyListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SurveyListInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetQuestionnaireSurveyListResponse) Validate() error {
|
||||
for _, item := range this.SurveyList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("SurveyList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
18615
api/cast/cast.pb.go
18615
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ package cron
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
_ "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
@ -641,16 +641,6 @@ type ExecutionResult struct {
|
||||
StatusDescription string `protobuf:"bytes,110,opt,name=status_description,json=statusDescription,proto3" json:"status_description"` // 执行状态描述
|
||||
ResultDescription string `protobuf:"bytes,111,opt,name=result_description,json=resultDescription,proto3" json:"result_description"` // 执行结果描述
|
||||
ContentTypeDescription string `protobuf:"bytes,115,opt,name=content_type_description,json=contentTypeDescription,proto3" json:"content_type_description"` // 内容类型描述
|
||||
TIKTOKStatusDesc string `protobuf:"bytes,121,opt,name=TIKTOKStatusDesc,proto3" json:"TIKTOKStatusDesc"`
|
||||
YOUTUBEStatusDesc string `protobuf:"bytes,122,opt,name=YOUTUBEStatusDesc,proto3" json:"YOUTUBEStatusDesc"`
|
||||
INSStatusDesc string `protobuf:"bytes,123,opt,name=INSStatusDesc,proto3" json:"INSStatusDesc"`
|
||||
DMStatusDesc string `protobuf:"bytes,124,opt,name=DMStatusDesc,proto3" json:"DMStatusDesc"`
|
||||
BULESKYStatusDesc string `protobuf:"bytes,125,opt,name=BULESKYStatusDesc,proto3" json:"BULESKYStatusDesc"`
|
||||
TIKTOKResult string `protobuf:"bytes,131,opt,name=TIKTOKResult,proto3" json:"TIKTOKResult"`
|
||||
YOUTUBEResult string `protobuf:"bytes,132,opt,name=YOUTUBEResult,proto3" json:"YOUTUBEResult"`
|
||||
INSResult string `protobuf:"bytes,133,opt,name=INSResult,proto3" json:"INSResult"`
|
||||
DMResult string `protobuf:"bytes,134,opt,name=DMResult,proto3" json:"DMResult"`
|
||||
BULESKYResult string `protobuf:"bytes,135,opt,name=BULESKYResult,proto3" json:"BULESKYResult"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -804,76 +794,6 @@ func (x *ExecutionResult) GetContentTypeDescription() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetTIKTOKStatusDesc() string {
|
||||
if x != nil {
|
||||
return x.TIKTOKStatusDesc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetYOUTUBEStatusDesc() string {
|
||||
if x != nil {
|
||||
return x.YOUTUBEStatusDesc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetINSStatusDesc() string {
|
||||
if x != nil {
|
||||
return x.INSStatusDesc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetDMStatusDesc() string {
|
||||
if x != nil {
|
||||
return x.DMStatusDesc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetBULESKYStatusDesc() string {
|
||||
if x != nil {
|
||||
return x.BULESKYStatusDesc
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetTIKTOKResult() string {
|
||||
if x != nil {
|
||||
return x.TIKTOKResult
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetYOUTUBEResult() string {
|
||||
if x != nil {
|
||||
return x.YOUTUBEResult
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetINSResult() string {
|
||||
if x != nil {
|
||||
return x.INSResult
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetDMResult() string {
|
||||
if x != nil {
|
||||
return x.DMResult
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExecutionResult) GetBULESKYResult() string {
|
||||
if x != nil {
|
||||
return x.BULESKYResult
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateScheduleTaskRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TaskTitle string `protobuf:"bytes,1,opt,name=task_title,json=taskTitle,proto3" json:"task_title"` // 任务标题
|
||||
@ -1119,18 +1039,18 @@ func (x *CreateScheduleTaskResponse) GetData() *ScheduleTask {
|
||||
}
|
||||
|
||||
type UpdateScheduleTaskRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TaskId uint64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id"` // 任务ID,用于标识需要更新的任务
|
||||
TaskTitle string `protobuf:"bytes,2,opt,name=task_title,json=taskTitle,proto3" json:"task_title"` // 任务标题
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description"` // 描述
|
||||
PeriodType int32 `protobuf:"varint,4,opt,name=period_type,json=periodType,proto3" json:"period_type"` // 周期类型
|
||||
Weekdays []int32 `protobuf:"varint,5,rep,packed,name=weekdays,proto3" json:"weekdays"` // 每周任务的星期几
|
||||
CustomDays []string `protobuf:"bytes,6,rep,name=custom_days,json=customDays,proto3" json:"custom_days"` // 自定义日期
|
||||
StartDate string `protobuf:"bytes,7,opt,name=start_date,json=startDate,proto3" json:"start_date"` // 开始日期
|
||||
ExecuteStartTime string `protobuf:"bytes,8,opt,name=execute_start_time,json=executeStartTime,proto3" json:"execute_start_time"` // 执行开始时间
|
||||
ExecuteEndTime string `protobuf:"bytes,9,opt,name=execute_end_time,json=executeEndTime,proto3" json:"execute_end_time"` // 执行结束时间
|
||||
Remark string `protobuf:"bytes,10,opt,name=remark,proto3" json:"remark"` // 备注
|
||||
TaskDetail *UpdateScheduleTaskRequestTaskDetail `protobuf:"bytes,11,opt,name=task_detail,json=taskDetail,proto3" json:"task_detail"` // 任务详情
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
TaskId uint64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id"` // 任务ID,用于标识需要更新的任务
|
||||
TaskTitle string `protobuf:"bytes,2,opt,name=task_title,json=taskTitle,proto3" json:"task_title"` // 任务标题
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description"` // 描述
|
||||
PeriodType int32 `protobuf:"varint,4,opt,name=period_type,json=periodType,proto3" json:"period_type"` // 周期类型
|
||||
Weekdays []int32 `protobuf:"varint,5,rep,packed,name=weekdays,proto3" json:"weekdays"` // 每周任务的星期几
|
||||
CustomDays []string `protobuf:"bytes,6,rep,name=custom_days,json=customDays,proto3" json:"custom_days"` // 自定义日期
|
||||
StartDate string `protobuf:"bytes,7,opt,name=start_date,json=startDate,proto3" json:"start_date"` // 开始日期
|
||||
ExecuteStartTime string `protobuf:"bytes,8,opt,name=execute_start_time,json=executeStartTime,proto3" json:"execute_start_time"` // 执行开始时间
|
||||
ExecuteEndTime string `protobuf:"bytes,9,opt,name=execute_end_time,json=executeEndTime,proto3" json:"execute_end_time"` // 执行结束时间
|
||||
Remark string `protobuf:"bytes,10,opt,name=remark,proto3" json:"remark"` // 备注
|
||||
TaskDetail *TaskDetailRequest `protobuf:"bytes,11,opt,name=task_detail,json=taskDetail,proto3" json:"task_detail"` // 任务详情
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -1235,97 +1155,13 @@ func (x *UpdateScheduleTaskRequest) GetRemark() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequest) GetTaskDetail() *UpdateScheduleTaskRequestTaskDetail {
|
||||
func (x *UpdateScheduleTaskRequest) GetTaskDetail() *TaskDetailRequest {
|
||||
if x != nil {
|
||||
return x.TaskDetail
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdateScheduleTaskRequestTaskDetail struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int32 `protobuf:"varint,5,opt,name=id,proto3" json:"id"`
|
||||
TaskId int32 `protobuf:"varint,6,opt,name=task_id,json=taskId,proto3" json:"task_id"`
|
||||
ArtistCount int32 `protobuf:"varint,1,opt,name=artist_count,json=artistCount,proto3" json:"artist_count"` // 艺人数量
|
||||
Artists []*ArtistInfo `protobuf:"bytes,2,rep,name=artists,proto3" json:"artists"` // 艺人信息列表
|
||||
Num int32 `protobuf:"varint,3,opt,name=num,proto3" json:"num"` // 任务数量
|
||||
ContentType int32 `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3" json:"content_type"` // 内容类型
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) Reset() {
|
||||
*x = UpdateScheduleTaskRequestTaskDetail{}
|
||||
mi := &file_pb_cron_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateScheduleTaskRequestTaskDetail) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[11]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateScheduleTaskRequestTaskDetail.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateScheduleTaskRequestTaskDetail) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetTaskId() int32 {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetArtistCount() int32 {
|
||||
if x != nil {
|
||||
return x.ArtistCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetArtists() []*ArtistInfo {
|
||||
if x != nil {
|
||||
return x.Artists
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetNum() int32 {
|
||||
if x != nil {
|
||||
return x.Num
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskRequestTaskDetail) GetContentType() int32 {
|
||||
if x != nil {
|
||||
return x.ContentType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UpdateScheduleTaskResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` // 响应码
|
||||
@ -1337,7 +1173,7 @@ type UpdateScheduleTaskResponse struct {
|
||||
|
||||
func (x *UpdateScheduleTaskResponse) Reset() {
|
||||
*x = UpdateScheduleTaskResponse{}
|
||||
mi := &file_pb_cron_proto_msgTypes[12]
|
||||
mi := &file_pb_cron_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1349,7 +1185,7 @@ func (x *UpdateScheduleTaskResponse) String() string {
|
||||
func (*UpdateScheduleTaskResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateScheduleTaskResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[12]
|
||||
mi := &file_pb_cron_proto_msgTypes[11]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1362,7 +1198,7 @@ func (x *UpdateScheduleTaskResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateScheduleTaskResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateScheduleTaskResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{12}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UpdateScheduleTaskResponse) GetCode() int32 {
|
||||
@ -1396,14 +1232,13 @@ type GetListScheduleTaskRequest struct {
|
||||
EndTime string `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time"` // 结束日期
|
||||
Status int32 `protobuf:"varint,7,opt,name=Status,proto3" json:"Status"` // 任务状态
|
||||
ContentType int32 `protobuf:"varint,8,opt,name=content_type,json=contentType,proto3" json:"content_type"` // 内容类型
|
||||
Sorts map[string]string `protobuf:"bytes,9,rep,name=sorts,proto3" json:"sorts" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetListScheduleTaskRequest) Reset() {
|
||||
*x = GetListScheduleTaskRequest{}
|
||||
mi := &file_pb_cron_proto_msgTypes[13]
|
||||
mi := &file_pb_cron_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1415,7 +1250,7 @@ func (x *GetListScheduleTaskRequest) String() string {
|
||||
func (*GetListScheduleTaskRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetListScheduleTaskRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[13]
|
||||
mi := &file_pb_cron_proto_msgTypes[12]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1428,7 +1263,7 @@ func (x *GetListScheduleTaskRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListScheduleTaskRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetListScheduleTaskRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{13}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *GetListScheduleTaskRequest) GetPage() int32 {
|
||||
@ -1487,13 +1322,6 @@ func (x *GetListScheduleTaskRequest) GetContentType() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetListScheduleTaskRequest) GetSorts() map[string]string {
|
||||
if x != nil {
|
||||
return x.Sorts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetListScheduleTaskResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` // 响应码
|
||||
@ -1508,7 +1336,7 @@ type GetListScheduleTaskResponse struct {
|
||||
|
||||
func (x *GetListScheduleTaskResponse) Reset() {
|
||||
*x = GetListScheduleTaskResponse{}
|
||||
mi := &file_pb_cron_proto_msgTypes[14]
|
||||
mi := &file_pb_cron_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1520,7 +1348,7 @@ func (x *GetListScheduleTaskResponse) String() string {
|
||||
func (*GetListScheduleTaskResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetListScheduleTaskResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[14]
|
||||
mi := &file_pb_cron_proto_msgTypes[13]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1533,7 +1361,7 @@ func (x *GetListScheduleTaskResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListScheduleTaskResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetListScheduleTaskResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{14}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *GetListScheduleTaskResponse) GetCode() int32 {
|
||||
@ -1594,7 +1422,7 @@ type GetListExecutionRecordRequest struct {
|
||||
|
||||
func (x *GetListExecutionRecordRequest) Reset() {
|
||||
*x = GetListExecutionRecordRequest{}
|
||||
mi := &file_pb_cron_proto_msgTypes[15]
|
||||
mi := &file_pb_cron_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1606,7 +1434,7 @@ func (x *GetListExecutionRecordRequest) String() string {
|
||||
func (*GetListExecutionRecordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetListExecutionRecordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[15]
|
||||
mi := &file_pb_cron_proto_msgTypes[14]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1619,7 +1447,7 @@ func (x *GetListExecutionRecordRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListExecutionRecordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetListExecutionRecordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{15}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *GetListExecutionRecordRequest) GetPage() int32 {
|
||||
@ -1692,7 +1520,7 @@ type GetListExecutionRecordResponse struct {
|
||||
|
||||
func (x *GetListExecutionRecordResponse) Reset() {
|
||||
*x = GetListExecutionRecordResponse{}
|
||||
mi := &file_pb_cron_proto_msgTypes[16]
|
||||
mi := &file_pb_cron_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1704,7 +1532,7 @@ func (x *GetListExecutionRecordResponse) String() string {
|
||||
func (*GetListExecutionRecordResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetListExecutionRecordResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[16]
|
||||
mi := &file_pb_cron_proto_msgTypes[15]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1717,7 +1545,7 @@ func (x *GetListExecutionRecordResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListExecutionRecordResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetListExecutionRecordResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{16}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *GetListExecutionRecordResponse) GetCode() int32 {
|
||||
@ -1779,7 +1607,7 @@ type GetListExecutionResultRequest struct {
|
||||
|
||||
func (x *GetListExecutionResultRequest) Reset() {
|
||||
*x = GetListExecutionResultRequest{}
|
||||
mi := &file_pb_cron_proto_msgTypes[17]
|
||||
mi := &file_pb_cron_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1791,7 +1619,7 @@ func (x *GetListExecutionResultRequest) String() string {
|
||||
func (*GetListExecutionResultRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetListExecutionResultRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[17]
|
||||
mi := &file_pb_cron_proto_msgTypes[16]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1804,7 +1632,7 @@ func (x *GetListExecutionResultRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListExecutionResultRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetListExecutionResultRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{17}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *GetListExecutionResultRequest) GetPage() int32 {
|
||||
@ -1884,7 +1712,7 @@ type GetListExecutionResultResponse struct {
|
||||
|
||||
func (x *GetListExecutionResultResponse) Reset() {
|
||||
*x = GetListExecutionResultResponse{}
|
||||
mi := &file_pb_cron_proto_msgTypes[18]
|
||||
mi := &file_pb_cron_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1896,7 +1724,7 @@ func (x *GetListExecutionResultResponse) String() string {
|
||||
func (*GetListExecutionResultResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetListExecutionResultResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[18]
|
||||
mi := &file_pb_cron_proto_msgTypes[17]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1909,7 +1737,7 @@ func (x *GetListExecutionResultResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetListExecutionResultResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetListExecutionResultResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{18}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *GetListExecutionResultResponse) GetCode() int32 {
|
||||
@ -1964,7 +1792,7 @@ type TaskStatus struct {
|
||||
|
||||
func (x *TaskStatus) Reset() {
|
||||
*x = TaskStatus{}
|
||||
mi := &file_pb_cron_proto_msgTypes[19]
|
||||
mi := &file_pb_cron_proto_msgTypes[18]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1976,7 +1804,7 @@ func (x *TaskStatus) String() string {
|
||||
func (*TaskStatus) ProtoMessage() {}
|
||||
|
||||
func (x *TaskStatus) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[19]
|
||||
mi := &file_pb_cron_proto_msgTypes[18]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1989,7 +1817,7 @@ func (x *TaskStatus) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead.
|
||||
func (*TaskStatus) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{19}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{18}
|
||||
}
|
||||
|
||||
func (x *TaskStatus) GetKey() int32 {
|
||||
@ -2017,7 +1845,7 @@ type GetScheduleTaskStatusResponse struct {
|
||||
|
||||
func (x *GetScheduleTaskStatusResponse) Reset() {
|
||||
*x = GetScheduleTaskStatusResponse{}
|
||||
mi := &file_pb_cron_proto_msgTypes[20]
|
||||
mi := &file_pb_cron_proto_msgTypes[19]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2029,7 +1857,7 @@ func (x *GetScheduleTaskStatusResponse) String() string {
|
||||
func (*GetScheduleTaskStatusResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetScheduleTaskStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_cron_proto_msgTypes[20]
|
||||
mi := &file_pb_cron_proto_msgTypes[19]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2042,7 +1870,7 @@ func (x *GetScheduleTaskStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetScheduleTaskStatusResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetScheduleTaskStatusResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{20}
|
||||
return file_pb_cron_proto_rawDescGZIP(), []int{19}
|
||||
}
|
||||
|
||||
func (x *GetScheduleTaskStatusResponse) GetCode() int32 {
|
||||
@ -2140,7 +1968,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"task_title\x18\x0e \x01(\tR\ttaskTitle\x12!\n" +
|
||||
"\fcontent_type\x18\x0f \x01(\x05R\vcontentType\x12\x0e\n" +
|
||||
"\x02id\x18\x10 \x01(\x04R\x02id\"\xc9\a\n" +
|
||||
"\x02id\x18\x10 \x01(\x04R\x02id\"\xc8\x04\n" +
|
||||
"\x0fExecutionResult\x12!\n" +
|
||||
"\fexecution_id\x18\x01 \x01(\x05R\vexecutionId\x12\x17\n" +
|
||||
"\atask_id\x18\x02 \x01(\x05R\x06taskId\x12\x1b\n" +
|
||||
@ -2164,17 +1992,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"work_title\x18\x10 \x01(\tR\tworkTitle\x12-\n" +
|
||||
"\x12status_description\x18n \x01(\tR\x11statusDescription\x12-\n" +
|
||||
"\x12result_description\x18o \x01(\tR\x11resultDescription\x128\n" +
|
||||
"\x18content_type_description\x18s \x01(\tR\x16contentTypeDescription\x12*\n" +
|
||||
"\x10TIKTOKStatusDesc\x18y \x01(\tR\x10TIKTOKStatusDesc\x12,\n" +
|
||||
"\x11YOUTUBEStatusDesc\x18z \x01(\tR\x11YOUTUBEStatusDesc\x12$\n" +
|
||||
"\rINSStatusDesc\x18{ \x01(\tR\rINSStatusDesc\x12\"\n" +
|
||||
"\fDMStatusDesc\x18| \x01(\tR\fDMStatusDesc\x12,\n" +
|
||||
"\x11BULESKYStatusDesc\x18} \x01(\tR\x11BULESKYStatusDesc\x12#\n" +
|
||||
"\fTIKTOKResult\x18\x83\x01 \x01(\tR\fTIKTOKResult\x12%\n" +
|
||||
"\rYOUTUBEResult\x18\x84\x01 \x01(\tR\rYOUTUBEResult\x12\x1d\n" +
|
||||
"\tINSResult\x18\x85\x01 \x01(\tR\tINSResult\x12\x1b\n" +
|
||||
"\bDMResult\x18\x86\x01 \x01(\tR\bDMResult\x12%\n" +
|
||||
"\rBULESKYResult\x18\x87\x01 \x01(\tR\rBULESKYResult\"\x83\x03\n" +
|
||||
"\x18content_type_description\x18s \x01(\tR\x16contentTypeDescription\"\x83\x03\n" +
|
||||
"\x19CreateScheduleTaskRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"task_title\x18\x01 \x01(\tR\ttaskTitle\x12 \n" +
|
||||
@ -2200,7 +2018,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"\x1aCreateScheduleTaskResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12&\n" +
|
||||
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\xae\x03\n" +
|
||||
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\x9c\x03\n" +
|
||||
"\x19UpdateScheduleTaskRequest\x12\x17\n" +
|
||||
"\atask_id\x18\x01 \x01(\x04R\x06taskId\x12\x1d\n" +
|
||||
"\n" +
|
||||
@ -2216,20 +2034,13 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"\x12execute_start_time\x18\b \x01(\tR\x10executeStartTime\x12(\n" +
|
||||
"\x10execute_end_time\x18\t \x01(\tR\x0eexecuteEndTime\x12\x16\n" +
|
||||
"\x06remark\x18\n" +
|
||||
" \x01(\tR\x06remark\x12J\n" +
|
||||
"\vtask_detail\x18\v \x01(\v2).cron.UpdateScheduleTaskRequestTaskDetailR\n" +
|
||||
"taskDetail\"\xd2\x01\n" +
|
||||
"#UpdateScheduleTaskRequestTaskDetail\x12\x0e\n" +
|
||||
"\x02id\x18\x05 \x01(\x05R\x02id\x12\x17\n" +
|
||||
"\atask_id\x18\x06 \x01(\x05R\x06taskId\x12!\n" +
|
||||
"\fartist_count\x18\x01 \x01(\x05R\vartistCount\x12*\n" +
|
||||
"\aartists\x18\x02 \x03(\v2\x10.cron.ArtistInfoR\aartists\x12\x10\n" +
|
||||
"\x03num\x18\x03 \x01(\x05R\x03num\x12!\n" +
|
||||
"\fcontent_type\x18\x04 \x01(\x05R\vcontentType\"r\n" +
|
||||
" \x01(\tR\x06remark\x128\n" +
|
||||
"\vtask_detail\x18\v \x01(\v2\x17.cron.TaskDetailRequestR\n" +
|
||||
"taskDetail\"r\n" +
|
||||
"\x1aUpdateScheduleTaskResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12&\n" +
|
||||
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\xff\x02\n" +
|
||||
"\x04data\x18\x03 \x01(\v2\x12.cron.ScheduleTaskR\x04data\"\x82\x02\n" +
|
||||
"\x1aGetListScheduleTaskRequest\x12\x12\n" +
|
||||
"\x04page\x18\x01 \x01(\x05R\x04page\x12\x1b\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +
|
||||
@ -2241,12 +2052,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"start_time\x18\x05 \x01(\tR\tstartTime\x12\x19\n" +
|
||||
"\bend_time\x18\x06 \x01(\tR\aendTime\x12\x16\n" +
|
||||
"\x06Status\x18\a \x01(\x05R\x06Status\x12!\n" +
|
||||
"\fcontent_type\x18\b \x01(\x05R\vcontentType\x12A\n" +
|
||||
"\x05sorts\x18\t \x03(\v2+.cron.GetListScheduleTaskRequest.SortsEntryR\x05sorts\x1a8\n" +
|
||||
"\n" +
|
||||
"SortsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb1\x01\n" +
|
||||
"\fcontent_type\x18\b \x01(\x05R\vcontentType\"\xb1\x01\n" +
|
||||
"\x1bGetListScheduleTaskResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12\x14\n" +
|
||||
@ -2300,18 +2106,7 @@ const file_pb_cron_proto_rawDesc = "" +
|
||||
"\x1dGetScheduleTaskStatusResponse\x12\x12\n" +
|
||||
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x18\n" +
|
||||
"\amessage\x18\x02 \x01(\tR\amessage\x12$\n" +
|
||||
"\x04data\x18\x03 \x03(\v2\x10.cron.TaskStatusR\x04data2\xd5\x06\n" +
|
||||
"\x04Cron\x12Y\n" +
|
||||
"\x12CreateScheduleTask\x12\x1f.cron.CreateScheduleTaskRequest\x1a .cron.CreateScheduleTaskResponse\"\x00\x12Y\n" +
|
||||
"\x12UpdateScheduleTask\x12\x1f.cron.UpdateScheduleTaskRequest\x1a .cron.UpdateScheduleTaskResponse\"\x00\x12C\n" +
|
||||
"\x12DeleteScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12\\\n" +
|
||||
"\x13GetListScheduleTask\x12 .cron.GetListScheduleTaskRequest\x1a!.cron.GetListScheduleTaskResponse\"\x00\x12e\n" +
|
||||
"\x16GetListExecutionRecord\x12#.cron.GetListExecutionRecordRequest\x1a$.cron.GetListExecutionRecordResponse\"\x00\x12e\n" +
|
||||
"\x16GetListExecutionResult\x12#.cron.GetListExecutionResultRequest\x1a$.cron.GetListExecutionResultResponse\"\x00\x12V\n" +
|
||||
"\x15GetScheduleTaskStatus\x12\x16.google.protobuf.Empty\x1a#.cron.GetScheduleTaskStatusResponse\"\x00\x12B\n" +
|
||||
"\x11PauseScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12B\n" +
|
||||
"\x11StartScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00\x12F\n" +
|
||||
"\x15RepublishScheduleTask\x12\x15.cron.CommonIDRequest\x1a\x14.cron.CommonResponse\"\x00B\bZ\x06./cronb\x06proto3"
|
||||
"\x04data\x18\x03 \x03(\v2\x10.cron.TaskStatusR\x04dataB\bZ\x06./cronb\x06proto3"
|
||||
|
||||
var (
|
||||
file_pb_cron_proto_rawDescOnce sync.Once
|
||||
@ -2325,31 +2120,28 @@ func file_pb_cron_proto_rawDescGZIP() []byte {
|
||||
return file_pb_cron_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pb_cron_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||
var file_pb_cron_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||
var file_pb_cron_proto_goTypes = []any{
|
||||
(*CommonIDRequest)(nil), // 0: cron.CommonIDRequest
|
||||
(*CommonResponse)(nil), // 1: cron.CommonResponse
|
||||
(*ScheduleTask)(nil), // 2: cron.ScheduleTask
|
||||
(*TaskDetail)(nil), // 3: cron.TaskDetail
|
||||
(*ArtistInfo)(nil), // 4: cron.ArtistInfo
|
||||
(*ExecutionRecord)(nil), // 5: cron.ExecutionRecord
|
||||
(*ExecutionResult)(nil), // 6: cron.ExecutionResult
|
||||
(*CreateScheduleTaskRequest)(nil), // 7: cron.CreateScheduleTaskRequest
|
||||
(*TaskDetailRequest)(nil), // 8: cron.TaskDetailRequest
|
||||
(*CreateScheduleTaskResponse)(nil), // 9: cron.CreateScheduleTaskResponse
|
||||
(*UpdateScheduleTaskRequest)(nil), // 10: cron.UpdateScheduleTaskRequest
|
||||
(*UpdateScheduleTaskRequestTaskDetail)(nil), // 11: cron.UpdateScheduleTaskRequestTaskDetail
|
||||
(*UpdateScheduleTaskResponse)(nil), // 12: cron.UpdateScheduleTaskResponse
|
||||
(*GetListScheduleTaskRequest)(nil), // 13: cron.GetListScheduleTaskRequest
|
||||
(*GetListScheduleTaskResponse)(nil), // 14: cron.GetListScheduleTaskResponse
|
||||
(*GetListExecutionRecordRequest)(nil), // 15: cron.GetListExecutionRecordRequest
|
||||
(*GetListExecutionRecordResponse)(nil), // 16: cron.GetListExecutionRecordResponse
|
||||
(*GetListExecutionResultRequest)(nil), // 17: cron.GetListExecutionResultRequest
|
||||
(*GetListExecutionResultResponse)(nil), // 18: cron.GetListExecutionResultResponse
|
||||
(*TaskStatus)(nil), // 19: cron.TaskStatus
|
||||
(*GetScheduleTaskStatusResponse)(nil), // 20: cron.GetScheduleTaskStatusResponse
|
||||
nil, // 21: cron.GetListScheduleTaskRequest.SortsEntry
|
||||
(*emptypb.Empty)(nil), // 22: google.protobuf.Empty
|
||||
(*CommonIDRequest)(nil), // 0: cron.CommonIDRequest
|
||||
(*CommonResponse)(nil), // 1: cron.CommonResponse
|
||||
(*ScheduleTask)(nil), // 2: cron.ScheduleTask
|
||||
(*TaskDetail)(nil), // 3: cron.TaskDetail
|
||||
(*ArtistInfo)(nil), // 4: cron.ArtistInfo
|
||||
(*ExecutionRecord)(nil), // 5: cron.ExecutionRecord
|
||||
(*ExecutionResult)(nil), // 6: cron.ExecutionResult
|
||||
(*CreateScheduleTaskRequest)(nil), // 7: cron.CreateScheduleTaskRequest
|
||||
(*TaskDetailRequest)(nil), // 8: cron.TaskDetailRequest
|
||||
(*CreateScheduleTaskResponse)(nil), // 9: cron.CreateScheduleTaskResponse
|
||||
(*UpdateScheduleTaskRequest)(nil), // 10: cron.UpdateScheduleTaskRequest
|
||||
(*UpdateScheduleTaskResponse)(nil), // 11: cron.UpdateScheduleTaskResponse
|
||||
(*GetListScheduleTaskRequest)(nil), // 12: cron.GetListScheduleTaskRequest
|
||||
(*GetListScheduleTaskResponse)(nil), // 13: cron.GetListScheduleTaskResponse
|
||||
(*GetListExecutionRecordRequest)(nil), // 14: cron.GetListExecutionRecordRequest
|
||||
(*GetListExecutionRecordResponse)(nil), // 15: cron.GetListExecutionRecordResponse
|
||||
(*GetListExecutionResultRequest)(nil), // 16: cron.GetListExecutionResultRequest
|
||||
(*GetListExecutionResultResponse)(nil), // 17: cron.GetListExecutionResultResponse
|
||||
(*TaskStatus)(nil), // 18: cron.TaskStatus
|
||||
(*GetScheduleTaskStatusResponse)(nil), // 19: cron.GetScheduleTaskStatusResponse
|
||||
}
|
||||
var file_pb_cron_proto_depIdxs = []int32{
|
||||
3, // 0: cron.ScheduleTask.task_detail:type_name -> cron.TaskDetail
|
||||
@ -2359,39 +2151,17 @@ var file_pb_cron_proto_depIdxs = []int32{
|
||||
8, // 4: cron.CreateScheduleTaskRequest.task_detail:type_name -> cron.TaskDetailRequest
|
||||
4, // 5: cron.TaskDetailRequest.artists:type_name -> cron.ArtistInfo
|
||||
2, // 6: cron.CreateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
|
||||
11, // 7: cron.UpdateScheduleTaskRequest.task_detail:type_name -> cron.UpdateScheduleTaskRequestTaskDetail
|
||||
4, // 8: cron.UpdateScheduleTaskRequestTaskDetail.artists:type_name -> cron.ArtistInfo
|
||||
2, // 9: cron.UpdateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
|
||||
21, // 10: cron.GetListScheduleTaskRequest.sorts:type_name -> cron.GetListScheduleTaskRequest.SortsEntry
|
||||
2, // 11: cron.GetListScheduleTaskResponse.data:type_name -> cron.ScheduleTask
|
||||
5, // 12: cron.GetListExecutionRecordResponse.data:type_name -> cron.ExecutionRecord
|
||||
6, // 13: cron.GetListExecutionResultResponse.data:type_name -> cron.ExecutionResult
|
||||
19, // 14: cron.GetScheduleTaskStatusResponse.data:type_name -> cron.TaskStatus
|
||||
7, // 15: cron.Cron.CreateScheduleTask:input_type -> cron.CreateScheduleTaskRequest
|
||||
10, // 16: cron.Cron.UpdateScheduleTask:input_type -> cron.UpdateScheduleTaskRequest
|
||||
0, // 17: cron.Cron.DeleteScheduleTask:input_type -> cron.CommonIDRequest
|
||||
13, // 18: cron.Cron.GetListScheduleTask:input_type -> cron.GetListScheduleTaskRequest
|
||||
15, // 19: cron.Cron.GetListExecutionRecord:input_type -> cron.GetListExecutionRecordRequest
|
||||
17, // 20: cron.Cron.GetListExecutionResult:input_type -> cron.GetListExecutionResultRequest
|
||||
22, // 21: cron.Cron.GetScheduleTaskStatus:input_type -> google.protobuf.Empty
|
||||
0, // 22: cron.Cron.PauseScheduleTask:input_type -> cron.CommonIDRequest
|
||||
0, // 23: cron.Cron.StartScheduleTask:input_type -> cron.CommonIDRequest
|
||||
0, // 24: cron.Cron.RepublishScheduleTask:input_type -> cron.CommonIDRequest
|
||||
9, // 25: cron.Cron.CreateScheduleTask:output_type -> cron.CreateScheduleTaskResponse
|
||||
12, // 26: cron.Cron.UpdateScheduleTask:output_type -> cron.UpdateScheduleTaskResponse
|
||||
1, // 27: cron.Cron.DeleteScheduleTask:output_type -> cron.CommonResponse
|
||||
14, // 28: cron.Cron.GetListScheduleTask:output_type -> cron.GetListScheduleTaskResponse
|
||||
16, // 29: cron.Cron.GetListExecutionRecord:output_type -> cron.GetListExecutionRecordResponse
|
||||
18, // 30: cron.Cron.GetListExecutionResult:output_type -> cron.GetListExecutionResultResponse
|
||||
20, // 31: cron.Cron.GetScheduleTaskStatus:output_type -> cron.GetScheduleTaskStatusResponse
|
||||
1, // 32: cron.Cron.PauseScheduleTask:output_type -> cron.CommonResponse
|
||||
1, // 33: cron.Cron.StartScheduleTask:output_type -> cron.CommonResponse
|
||||
1, // 34: cron.Cron.RepublishScheduleTask:output_type -> cron.CommonResponse
|
||||
25, // [25:35] is the sub-list for method output_type
|
||||
15, // [15:25] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
8, // 7: cron.UpdateScheduleTaskRequest.task_detail:type_name -> cron.TaskDetailRequest
|
||||
2, // 8: cron.UpdateScheduleTaskResponse.data:type_name -> cron.ScheduleTask
|
||||
2, // 9: cron.GetListScheduleTaskResponse.data:type_name -> cron.ScheduleTask
|
||||
5, // 10: cron.GetListExecutionRecordResponse.data:type_name -> cron.ExecutionRecord
|
||||
6, // 11: cron.GetListExecutionResultResponse.data:type_name -> cron.ExecutionResult
|
||||
18, // 12: cron.GetScheduleTaskStatusResponse.data:type_name -> cron.TaskStatus
|
||||
13, // [13:13] is the sub-list for method output_type
|
||||
13, // [13:13] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pb_cron_proto_init() }
|
||||
@ -2405,9 +2175,9 @@ func file_pb_cron_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pb_cron_proto_rawDesc), len(file_pb_cron_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 22,
|
||||
NumMessages: 20,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_pb_cron_proto_goTypes,
|
||||
DependencyIndexes: file_pb_cron_proto_depIdxs,
|
||||
|
||||
@ -97,16 +97,6 @@ func (this *UpdateScheduleTaskRequest) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateScheduleTaskRequestTaskDetail) Validate() error {
|
||||
for _, item := range this.Artists {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Artists", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateScheduleTaskResponse) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
@ -116,7 +106,6 @@ func (this *UpdateScheduleTaskResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetListScheduleTaskRequest) Validate() error {
|
||||
// Validation of proto3 map<> fields is unsupported.
|
||||
return nil
|
||||
}
|
||||
func (this *GetListScheduleTaskResponse) Validate() error {
|
||||
|
||||
@ -31,14 +31,13 @@ const _ = grpc_go.SupportPackageIsVersion7
|
||||
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)
|
||||
DeleteScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, 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)
|
||||
GetScheduleTaskStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*GetScheduleTaskStatusResponse, 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)
|
||||
RepublishScheduleTask(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 {
|
||||
@ -48,14 +47,13 @@ type cronClient struct {
|
||||
type CronClientImpl struct {
|
||||
CreateScheduleTask func(ctx context.Context, in *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
|
||||
UpdateScheduleTask func(ctx context.Context, in *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
|
||||
DeleteScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, 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)
|
||||
GetScheduleTaskStatus func(ctx context.Context, in *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
PauseScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
StartScheduleTask func(ctx context.Context, in *CommonIDRequest) (*CommonResponse, error)
|
||||
RepublishScheduleTask 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 {
|
||||
@ -82,11 +80,6 @@ func (c *cronClient) UpdateScheduleTask(ctx context.Context, in *UpdateScheduleT
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateScheduleTask", 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) GetListScheduleTask(ctx context.Context, in *GetListScheduleTaskRequest, opts ...grpc_go.CallOption) (*GetListScheduleTaskResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetListScheduleTaskResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -105,12 +98,6 @@ func (c *cronClient) GetListExecutionResult(ctx context.Context, in *GetListExec
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetListExecutionResult", 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)
|
||||
}
|
||||
|
||||
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)
|
||||
@ -123,10 +110,16 @@ func (c *cronClient) StartScheduleTask(ctx context.Context, in *CommonIDRequest,
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/StartScheduleTask", in, out)
|
||||
}
|
||||
|
||||
func (c *cronClient) RepublishScheduleTask(ctx context.Context, in *CommonIDRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
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+"/RepublishScheduleTask", in, out)
|
||||
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.
|
||||
@ -135,14 +128,13 @@ func (c *cronClient) RepublishScheduleTask(ctx context.Context, in *CommonIDRequ
|
||||
type CronServer interface {
|
||||
CreateScheduleTask(context.Context, *CreateScheduleTaskRequest) (*CreateScheduleTaskResponse, error)
|
||||
UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error)
|
||||
DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error)
|
||||
GetListExecutionRecord(context.Context, *GetListExecutionRecordRequest) (*GetListExecutionRecordResponse, error)
|
||||
GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error)
|
||||
GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
PauseScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
StartScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
RepublishScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error)
|
||||
GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error)
|
||||
mustEmbedUnimplementedCronServer()
|
||||
}
|
||||
|
||||
@ -157,9 +149,6 @@ func (UnimplementedCronServer) CreateScheduleTask(context.Context, *CreateSchedu
|
||||
func (UnimplementedCronServer) UpdateScheduleTask(context.Context, *UpdateScheduleTaskRequest) (*UpdateScheduleTaskResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) DeleteScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteScheduleTask not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) GetListScheduleTask(context.Context, *GetListScheduleTaskRequest) (*GetListScheduleTaskResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetListScheduleTask not implemented")
|
||||
}
|
||||
@ -169,17 +158,17 @@ func (UnimplementedCronServer) GetListExecutionRecord(context.Context, *GetListE
|
||||
func (UnimplementedCronServer) GetListExecutionResult(context.Context, *GetListExecutionResultRequest) (*GetListExecutionResultResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetListExecutionResult not implemented")
|
||||
}
|
||||
func (UnimplementedCronServer) GetScheduleTaskStatus(context.Context, *emptypb.Empty) (*GetScheduleTaskStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetScheduleTaskStatus 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) RepublishScheduleTask(context.Context, *CommonIDRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RepublishScheduleTask 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
|
||||
@ -267,35 +256,6 @@ func _Cron_UpdateScheduleTask_Handler(srv interface{}, ctx context.Context, dec
|
||||
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_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 {
|
||||
@ -383,35 +343,6 @@ func _Cron_GetListExecutionResult_Handler(srv interface{}, ctx context.Context,
|
||||
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)
|
||||
}
|
||||
|
||||
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 {
|
||||
@ -470,7 +401,7 @@ func _Cron_StartScheduleTask_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cron_RepublishScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
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
|
||||
@ -483,7 +414,36 @@ func _Cron_RepublishScheduleTask_Handler(srv interface{}, ctx context.Context, d
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("RepublishScheduleTask", args, invAttachment)
|
||||
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()
|
||||
@ -514,10 +474,6 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "UpdateScheduleTask",
|
||||
Handler: _Cron_UpdateScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteScheduleTask",
|
||||
Handler: _Cron_DeleteScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetListScheduleTask",
|
||||
Handler: _Cron_GetListScheduleTask_Handler,
|
||||
@ -530,10 +486,6 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "GetListExecutionResult",
|
||||
Handler: _Cron_GetListExecutionResult_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetScheduleTaskStatus",
|
||||
Handler: _Cron_GetScheduleTaskStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PauseScheduleTask",
|
||||
Handler: _Cron_PauseScheduleTask_Handler,
|
||||
@ -543,8 +495,12 @@ var Cron_ServiceDesc = grpc_go.ServiceDesc{
|
||||
Handler: _Cron_StartScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RepublishScheduleTask",
|
||||
Handler: _Cron_RepublishScheduleTask_Handler,
|
||||
MethodName: "DeleteScheduleTask",
|
||||
Handler: _Cron_DeleteScheduleTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetScheduleTaskStatus",
|
||||
Handler: _Cron_GetScheduleTaskStatus_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
@ -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",
|
||||
}
|
||||
@ -2049,116 +2049,6 @@ func (x *SecurityScanResp) GetProblemTimeFrame() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type SecurityScanByTextReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text"` // 文本
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextReq) Reset() {
|
||||
*x = SecurityScanByTextReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[31]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SecurityScanByTextReq) ProtoMessage() {}
|
||||
|
||||
func (x *SecurityScanByTextReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[31]
|
||||
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 SecurityScanByTextReq.ProtoReflect.Descriptor instead.
|
||||
func (*SecurityScanByTextReq) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{31}
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextReq) GetText() string {
|
||||
if x != nil {
|
||||
return x.Text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SecurityScanByTextResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SecurityStatus string `protobuf:"bytes,1,opt,name=securityStatus,proto3" json:"securityStatus"` // 安全状态
|
||||
Describe string `protobuf:"bytes,2,opt,name=describe,proto3" json:"describe"` // 描述
|
||||
ProblemText string `protobuf:"bytes,3,opt,name=problemText,proto3" json:"problemText"` // 问题文本
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextResp) Reset() {
|
||||
*x = SecurityScanByTextResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[32]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SecurityScanByTextResp) ProtoMessage() {}
|
||||
|
||||
func (x *SecurityScanByTextResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[32]
|
||||
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 SecurityScanByTextResp.ProtoReflect.Descriptor instead.
|
||||
func (*SecurityScanByTextResp) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{32}
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextResp) GetSecurityStatus() string {
|
||||
if x != nil {
|
||||
return x.SecurityStatus
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextResp) GetDescribe() string {
|
||||
if x != nil {
|
||||
return x.Describe
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SecurityScanByTextResp) GetProblemText() string {
|
||||
if x != nil {
|
||||
return x.ProblemText
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdateFileSecurityStatusReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -2170,7 +2060,7 @@ type UpdateFileSecurityStatusReq struct {
|
||||
func (x *UpdateFileSecurityStatusReq) Reset() {
|
||||
*x = UpdateFileSecurityStatusReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[33]
|
||||
mi := &file_files_proto_msgTypes[31]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2183,7 +2073,7 @@ func (x *UpdateFileSecurityStatusReq) String() string {
|
||||
func (*UpdateFileSecurityStatusReq) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateFileSecurityStatusReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[33]
|
||||
mi := &file_files_proto_msgTypes[31]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2196,7 +2086,7 @@ func (x *UpdateFileSecurityStatusReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateFileSecurityStatusReq.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateFileSecurityStatusReq) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{33}
|
||||
return file_files_proto_rawDescGZIP(), []int{31}
|
||||
}
|
||||
|
||||
func (x *UpdateFileSecurityStatusReq) GetSecurityStatusData() []*SecurityStatusData {
|
||||
@ -2215,7 +2105,7 @@ type UpdateFileSecurityStatusResp struct {
|
||||
func (x *UpdateFileSecurityStatusResp) Reset() {
|
||||
*x = UpdateFileSecurityStatusResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[34]
|
||||
mi := &file_files_proto_msgTypes[32]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2228,7 +2118,7 @@ func (x *UpdateFileSecurityStatusResp) String() string {
|
||||
func (*UpdateFileSecurityStatusResp) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateFileSecurityStatusResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[34]
|
||||
mi := &file_files_proto_msgTypes[32]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2241,7 +2131,7 @@ func (x *UpdateFileSecurityStatusResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UpdateFileSecurityStatusResp.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateFileSecurityStatusResp) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{34}
|
||||
return file_files_proto_rawDescGZIP(), []int{32}
|
||||
}
|
||||
|
||||
type ManualAntiReq struct {
|
||||
@ -2255,7 +2145,7 @@ type ManualAntiReq struct {
|
||||
func (x *ManualAntiReq) Reset() {
|
||||
*x = ManualAntiReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[35]
|
||||
mi := &file_files_proto_msgTypes[33]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2268,7 +2158,7 @@ func (x *ManualAntiReq) String() string {
|
||||
func (*ManualAntiReq) ProtoMessage() {}
|
||||
|
||||
func (x *ManualAntiReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[35]
|
||||
mi := &file_files_proto_msgTypes[33]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2281,7 +2171,7 @@ func (x *ManualAntiReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ManualAntiReq.ProtoReflect.Descriptor instead.
|
||||
func (*ManualAntiReq) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{35}
|
||||
return file_files_proto_rawDescGZIP(), []int{33}
|
||||
}
|
||||
|
||||
func (x *ManualAntiReq) GetSecurityStatusData() []*SecurityStatusData {
|
||||
@ -2300,7 +2190,7 @@ type ManualAntiResp struct {
|
||||
func (x *ManualAntiResp) Reset() {
|
||||
*x = ManualAntiResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[36]
|
||||
mi := &file_files_proto_msgTypes[34]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2313,7 +2203,7 @@ func (x *ManualAntiResp) String() string {
|
||||
func (*ManualAntiResp) ProtoMessage() {}
|
||||
|
||||
func (x *ManualAntiResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[36]
|
||||
mi := &file_files_proto_msgTypes[34]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2326,7 +2216,7 @@ func (x *ManualAntiResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ManualAntiResp.ProtoReflect.Descriptor instead.
|
||||
func (*ManualAntiResp) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{36}
|
||||
return file_files_proto_rawDescGZIP(), []int{34}
|
||||
}
|
||||
|
||||
type GetFileSecurityStatusReq struct {
|
||||
@ -2341,7 +2231,7 @@ type GetFileSecurityStatusReq struct {
|
||||
func (x *GetFileSecurityStatusReq) Reset() {
|
||||
*x = GetFileSecurityStatusReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[37]
|
||||
mi := &file_files_proto_msgTypes[35]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2354,7 +2244,7 @@ func (x *GetFileSecurityStatusReq) String() string {
|
||||
func (*GetFileSecurityStatusReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetFileSecurityStatusReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[37]
|
||||
mi := &file_files_proto_msgTypes[35]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2367,7 +2257,7 @@ func (x *GetFileSecurityStatusReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetFileSecurityStatusReq.ProtoReflect.Descriptor instead.
|
||||
func (*GetFileSecurityStatusReq) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{37}
|
||||
return file_files_proto_rawDescGZIP(), []int{35}
|
||||
}
|
||||
|
||||
func (x *GetFileSecurityStatusReq) GetUrl() string {
|
||||
@ -2397,7 +2287,7 @@ type GetFileSecurityStatusResp struct {
|
||||
func (x *GetFileSecurityStatusResp) Reset() {
|
||||
*x = GetFileSecurityStatusResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[38]
|
||||
mi := &file_files_proto_msgTypes[36]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2410,7 +2300,7 @@ func (x *GetFileSecurityStatusResp) String() string {
|
||||
func (*GetFileSecurityStatusResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetFileSecurityStatusResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[38]
|
||||
mi := &file_files_proto_msgTypes[36]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2423,7 +2313,7 @@ func (x *GetFileSecurityStatusResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetFileSecurityStatusResp.ProtoReflect.Descriptor instead.
|
||||
func (*GetFileSecurityStatusResp) Descriptor() ([]byte, []int) {
|
||||
return file_files_proto_rawDescGZIP(), []int{38}
|
||||
return file_files_proto_rawDescGZIP(), []int{36}
|
||||
}
|
||||
|
||||
func (x *GetFileSecurityStatusResp) GetSecurityStatus() string {
|
||||
@ -2462,7 +2352,7 @@ type SearchResp_Nested struct {
|
||||
func (x *SearchResp_Nested) Reset() {
|
||||
*x = SearchResp_Nested{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_files_proto_msgTypes[39]
|
||||
mi := &file_files_proto_msgTypes[37]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2475,7 +2365,7 @@ func (x *SearchResp_Nested) String() string {
|
||||
func (*SearchResp_Nested) ProtoMessage() {}
|
||||
|
||||
func (x *SearchResp_Nested) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_files_proto_msgTypes[39]
|
||||
mi := &file_files_proto_msgTypes[37]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2742,118 +2632,102 @@ var file_files_proto_rawDesc = []byte{
|
||||
0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f,
|
||||
0x62, 0x6c, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x2b, 0x0a, 0x15, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x63, 0x61, 0x6e, 0x42, 0x79, 0x54, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65,
|
||||
0x78, 0x74, 0x22, 0x7e, 0x0a, 0x16, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63,
|
||||
0x61, 0x6e, 0x42, 0x79, 0x54, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x54, 0x65, 0x78, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x54, 0x65,
|
||||
0x78, 0x74, 0x22, 0x68, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||
0x71, 0x12, 0x49, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
|
||||
0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x1c,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
|
||||
0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5a, 0x0a, 0x0d,
|
||||
0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x71, 0x12, 0x49, 0x0a,
|
||||
0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44,
|
||||
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x44, 0x61, 0x74, 0x61, 0x52, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x22, 0x10, 0x0a, 0x0e, 0x4d, 0x61, 0x6e, 0x75,
|
||||
0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x73, 0x70, 0x22, 0x48, 0x0a, 0x18, 0x47, 0x65,
|
||||
0x74, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75,
|
||||
0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65,
|
||||
0x6d, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x10, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61,
|
||||
0x6d, 0x65, 0x32, 0xe5, 0x08, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
|
||||
0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x31,
|
||||
0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||
0x00, 0x12, 0x2f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x10, 0x2e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52,
|
||||
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
|
||||
0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
|
||||
0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x13, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x11, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1b,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x65, 0x71, 0x12, 0x49, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x12, 0x73, 0x65, 0x63,
|
||||
0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x22,
|
||||
0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63,
|
||||
0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||
0x5a, 0x0a, 0x0d, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x71,
|
||||
0x12, 0x49, 0x0a, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x52, 0x12, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x61, 0x74, 0x61, 0x22, 0x10, 0x0a, 0x0e, 0x4d,
|
||||
0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x73, 0x70, 0x22, 0x48, 0x0a,
|
||||
0x18, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73,
|
||||
0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x72, 0x6f,
|
||||
0x62, 0x6c, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x32, 0x90, 0x08, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x31,
|
||||
0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22,
|
||||
0x00, 0x12, 0x31, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
|
||||
0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x10,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
|
||||
0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
|
||||
0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52,
|
||||
0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63,
|
||||
0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75,
|
||||
0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12,
|
||||
0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73,
|
||||
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x11,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
|
||||
0x72, 0x12, 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1c,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61,
|
||||
0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, 0x50,
|
||||
0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50,
|
||||
0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
|
||||
0x2f, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
|
||||
0x12, 0x40, 0x0a, 0x0b, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12,
|
||||
0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44,
|
||||
0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
|
||||
0x30, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0f, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
|
||||
0x12, 0x41, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e,
|
||||
0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
|
||||
0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53,
|
||||
0x63, 0x61, 0x6e, 0x42, 0x79, 0x54, 0x65, 0x78, 0x74, 0x12, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x42, 0x79,
|
||||
0x54, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
|
||||
0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x42, 0x79, 0x54, 0x65,
|
||||
0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72,
|
||||
0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
|
||||
0x3b, 0x0a, 0x0a, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x12, 0x14, 0x2e,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x6e, 0x75,
|
||||
0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x15,
|
||||
0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x47, 0x65,
|
||||
0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32,
|
||||
0x0a, 0x07, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70,
|
||||
0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x12, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f,
|
||||
0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0f,
|
||||
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53,
|
||||
0x63, 0x61, 0x6e, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75,
|
||||
0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x61, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74,
|
||||
0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3b, 0x0a,
|
||||
0x0a, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x12, 0x14, 0x2e, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x6e, 0x74, 0x69, 0x52, 0x65,
|
||||
0x71, 0x1a, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c,
|
||||
0x41, 0x6e, 0x74, 0x69, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x15, 0x47, 0x65,
|
||||
0x74, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f,
|
||||
0x3b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -2868,7 +2742,7 @@ func file_files_proto_rawDescGZIP() []byte {
|
||||
return file_files_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_files_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
|
||||
var file_files_proto_msgTypes = make([]protoimpl.MessageInfo, 38)
|
||||
var file_files_proto_goTypes = []interface{}{
|
||||
(*FileListReq)(nil), // 0: files.FileListReq
|
||||
(*Items)(nil), // 1: files.Items
|
||||
@ -2901,21 +2775,19 @@ var file_files_proto_goTypes = []interface{}{
|
||||
(*SecurityStatusData)(nil), // 28: files.SecurityStatusData
|
||||
(*SecurityScanReq)(nil), // 29: files.SecurityScanReq
|
||||
(*SecurityScanResp)(nil), // 30: files.SecurityScanResp
|
||||
(*SecurityScanByTextReq)(nil), // 31: files.SecurityScanByTextReq
|
||||
(*SecurityScanByTextResp)(nil), // 32: files.SecurityScanByTextResp
|
||||
(*UpdateFileSecurityStatusReq)(nil), // 33: files.UpdateFileSecurityStatusReq
|
||||
(*UpdateFileSecurityStatusResp)(nil), // 34: files.UpdateFileSecurityStatusResp
|
||||
(*ManualAntiReq)(nil), // 35: files.ManualAntiReq
|
||||
(*ManualAntiResp)(nil), // 36: files.ManualAntiResp
|
||||
(*GetFileSecurityStatusReq)(nil), // 37: files.GetFileSecurityStatusReq
|
||||
(*GetFileSecurityStatusResp)(nil), // 38: files.GetFileSecurityStatusResp
|
||||
(*SearchResp_Nested)(nil), // 39: files.searchResp.Nested
|
||||
(*UpdateFileSecurityStatusReq)(nil), // 31: files.UpdateFileSecurityStatusReq
|
||||
(*UpdateFileSecurityStatusResp)(nil), // 32: files.UpdateFileSecurityStatusResp
|
||||
(*ManualAntiReq)(nil), // 33: files.ManualAntiReq
|
||||
(*ManualAntiResp)(nil), // 34: files.ManualAntiResp
|
||||
(*GetFileSecurityStatusReq)(nil), // 35: files.GetFileSecurityStatusReq
|
||||
(*GetFileSecurityStatusResp)(nil), // 36: files.GetFileSecurityStatusResp
|
||||
(*SearchResp_Nested)(nil), // 37: files.searchResp.Nested
|
||||
}
|
||||
var file_files_proto_depIdxs = []int32{
|
||||
2, // 0: files.FileListReq.sorting:type_name -> files.Sorting
|
||||
1, // 1: files.FileListResp.items:type_name -> files.Items
|
||||
2, // 2: files.FileListResp.sorting:type_name -> files.Sorting
|
||||
39, // 3: files.searchResp.items:type_name -> files.searchResp.Nested
|
||||
37, // 3: files.searchResp.items:type_name -> files.searchResp.Nested
|
||||
28, // 4: files.UpdateFileSecurityStatusReq.securityStatusData:type_name -> files.SecurityStatusData
|
||||
28, // 5: files.ManualAntiReq.securityStatusData:type_name -> files.SecurityStatusData
|
||||
0, // 6: files.File.List:input_type -> files.FileListReq
|
||||
@ -2932,30 +2804,28 @@ var file_files_proto_depIdxs = []int32{
|
||||
24, // 17: files.File.DirDownload:input_type -> files.DirDownloadReq
|
||||
26, // 18: files.File.Usage:input_type -> files.UsageReq
|
||||
29, // 19: files.File.SecurityScan:input_type -> files.SecurityScanReq
|
||||
31, // 20: files.File.SecurityScanByText:input_type -> files.SecurityScanByTextReq
|
||||
33, // 21: files.File.UpdateFileSecurityStatus:input_type -> files.UpdateFileSecurityStatusReq
|
||||
35, // 22: files.File.ManualAnti:input_type -> files.ManualAntiReq
|
||||
37, // 23: files.File.GetFileSecurityStatus:input_type -> files.GetFileSecurityStatusReq
|
||||
3, // 24: files.File.List:output_type -> files.FileListResp
|
||||
19, // 25: files.File.Info:output_type -> files.FileInfoResp
|
||||
5, // 26: files.File.Create:output_type -> files.CreateResp
|
||||
7, // 27: files.File.Delete:output_type -> files.DeleteResp
|
||||
11, // 28: files.File.Search:output_type -> files.searchResp
|
||||
9, // 29: files.File.Upload:output_type -> files.UploadResp
|
||||
13, // 30: files.File.TusCreate:output_type -> files.TusCreateResp
|
||||
15, // 31: files.File.TusUpload:output_type -> files.TusUploadResp
|
||||
17, // 32: files.File.ResumableTransfer:output_type -> files.ResumableTransferResp
|
||||
21, // 33: files.File.Preview:output_type -> files.PreviewResp
|
||||
23, // 34: files.File.Action:output_type -> files.ActionResp
|
||||
25, // 35: files.File.DirDownload:output_type -> files.DirDownloadResp
|
||||
27, // 36: files.File.Usage:output_type -> files.UsageResp
|
||||
30, // 37: files.File.SecurityScan:output_type -> files.SecurityScanResp
|
||||
32, // 38: files.File.SecurityScanByText:output_type -> files.SecurityScanByTextResp
|
||||
34, // 39: files.File.UpdateFileSecurityStatus:output_type -> files.UpdateFileSecurityStatusResp
|
||||
36, // 40: files.File.ManualAnti:output_type -> files.ManualAntiResp
|
||||
38, // 41: files.File.GetFileSecurityStatus:output_type -> files.GetFileSecurityStatusResp
|
||||
24, // [24:42] is the sub-list for method output_type
|
||||
6, // [6:24] is the sub-list for method input_type
|
||||
31, // 20: files.File.UpdateFileSecurityStatus:input_type -> files.UpdateFileSecurityStatusReq
|
||||
33, // 21: files.File.ManualAnti:input_type -> files.ManualAntiReq
|
||||
35, // 22: files.File.GetFileSecurityStatus:input_type -> files.GetFileSecurityStatusReq
|
||||
3, // 23: files.File.List:output_type -> files.FileListResp
|
||||
19, // 24: files.File.Info:output_type -> files.FileInfoResp
|
||||
5, // 25: files.File.Create:output_type -> files.CreateResp
|
||||
7, // 26: files.File.Delete:output_type -> files.DeleteResp
|
||||
11, // 27: files.File.Search:output_type -> files.searchResp
|
||||
9, // 28: files.File.Upload:output_type -> files.UploadResp
|
||||
13, // 29: files.File.TusCreate:output_type -> files.TusCreateResp
|
||||
15, // 30: files.File.TusUpload:output_type -> files.TusUploadResp
|
||||
17, // 31: files.File.ResumableTransfer:output_type -> files.ResumableTransferResp
|
||||
21, // 32: files.File.Preview:output_type -> files.PreviewResp
|
||||
23, // 33: files.File.Action:output_type -> files.ActionResp
|
||||
25, // 34: files.File.DirDownload:output_type -> files.DirDownloadResp
|
||||
27, // 35: files.File.Usage:output_type -> files.UsageResp
|
||||
30, // 36: files.File.SecurityScan:output_type -> files.SecurityScanResp
|
||||
32, // 37: files.File.UpdateFileSecurityStatus:output_type -> files.UpdateFileSecurityStatusResp
|
||||
34, // 38: files.File.ManualAnti:output_type -> files.ManualAntiResp
|
||||
36, // 39: files.File.GetFileSecurityStatus:output_type -> files.GetFileSecurityStatusResp
|
||||
23, // [23:40] is the sub-list for method output_type
|
||||
6, // [6:23] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
@ -3340,30 +3210,6 @@ func file_files_proto_init() {
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SecurityScanByTextReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SecurityScanByTextResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateFileSecurityStatusReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3375,7 +3221,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateFileSecurityStatusResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3387,7 +3233,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ManualAntiReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3399,7 +3245,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ManualAntiResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3411,7 +3257,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetFileSecurityStatusReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3423,7 +3269,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetFileSecurityStatusResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3435,7 +3281,7 @@ func file_files_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_files_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_files_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SearchResp_Nested); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -3454,7 +3300,7 @@ func file_files_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_files_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 40,
|
||||
NumMessages: 38,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@ -135,12 +135,6 @@ func (this *SecurityScanReq) Validate() error {
|
||||
func (this *SecurityScanResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecurityScanByTextReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecurityScanByTextResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateFileSecurityStatusReq) Validate() error {
|
||||
for _, item := range this.SecurityStatusData {
|
||||
if item != nil {
|
||||
|
||||
@ -43,7 +43,6 @@ type FileClient interface {
|
||||
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)
|
||||
SecurityScan(ctx context.Context, in *SecurityScanReq, opts ...grpc_go.CallOption) (*SecurityScanResp, common.ErrorWithAttachment)
|
||||
SecurityScanByText(ctx context.Context, in *SecurityScanByTextReq, opts ...grpc_go.CallOption) (*SecurityScanByTextResp, 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)
|
||||
@ -68,7 +67,6 @@ type FileClientImpl struct {
|
||||
DirDownload func(ctx context.Context, in *DirDownloadReq) (File_DirDownloadClient, error)
|
||||
Usage func(ctx context.Context, in *UsageReq) (*UsageResp, error)
|
||||
SecurityScan func(ctx context.Context, in *SecurityScanReq) (*SecurityScanResp, error)
|
||||
SecurityScanByText func(ctx context.Context, in *SecurityScanByTextReq) (*SecurityScanByTextResp, 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)
|
||||
@ -197,12 +195,6 @@ func (c *fileClient) SecurityScan(ctx context.Context, in *SecurityScanReq, opts
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SecurityScan", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) SecurityScanByText(ctx context.Context, in *SecurityScanByTextReq, opts ...grpc_go.CallOption) (*SecurityScanByTextResp, common.ErrorWithAttachment) {
|
||||
out := new(SecurityScanByTextResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SecurityScanByText", 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)
|
||||
@ -239,7 +231,6 @@ type FileServer interface {
|
||||
DirDownload(*DirDownloadReq, File_DirDownloadServer) error
|
||||
Usage(context.Context, *UsageReq) (*UsageResp, error)
|
||||
SecurityScan(context.Context, *SecurityScanReq) (*SecurityScanResp, error)
|
||||
SecurityScanByText(context.Context, *SecurityScanByTextReq) (*SecurityScanByTextResp, error)
|
||||
UpdateFileSecurityStatus(context.Context, *UpdateFileSecurityStatusReq) (*UpdateFileSecurityStatusResp, error)
|
||||
ManualAnti(context.Context, *ManualAntiReq) (*ManualAntiResp, error)
|
||||
GetFileSecurityStatus(context.Context, *GetFileSecurityStatusReq) (*GetFileSecurityStatusResp, error)
|
||||
@ -293,9 +284,6 @@ func (UnimplementedFileServer) Usage(context.Context, *UsageReq) (*UsageResp, er
|
||||
func (UnimplementedFileServer) SecurityScan(context.Context, *SecurityScanReq) (*SecurityScanResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SecurityScan not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) SecurityScanByText(context.Context, *SecurityScanByTextReq) (*SecurityScanByTextResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SecurityScanByText not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) UpdateFileSecurityStatus(context.Context, *UpdateFileSecurityStatusReq) (*UpdateFileSecurityStatusResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateFileSecurityStatus not implemented")
|
||||
}
|
||||
@ -737,35 +725,6 @@ func _File_SecurityScan_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_SecurityScanByText_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SecurityScanByTextReq)
|
||||
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("SecurityScanByText", 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 {
|
||||
@ -912,10 +871,6 @@ var File_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "SecurityScan",
|
||||
Handler: _File_SecurityScan_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SecurityScanByText",
|
||||
Handler: _File_SecurityScanByText_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateFileSecurityStatus",
|
||||
Handler: _File_UpdateFileSecurityStatus_Handler,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,53 +9,20 @@ service Governance{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc UpdataStatus(UpdataStatusReq) returns (UpdataStatusResp) {}
|
||||
rpc GetGovernanceInfo(GetGovernanceInfoReq) returns (GetGovernanceInfoResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
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{
|
||||
string uuid = 1;
|
||||
int32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
repeated LangSetting langSetting = 5;//语言设置
|
||||
int32 sort = 6;
|
||||
int32 status = 7;
|
||||
int64 updatedAt = 8;
|
||||
string operator = 9;
|
||||
int32 operatorId = 10;
|
||||
}
|
||||
|
||||
message DisplayItem{
|
||||
string title = 1;
|
||||
string attachment = 2;
|
||||
string attachmentName = 3;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
int64 updatedAt = 7;
|
||||
string operator = 8;
|
||||
int32 operatorId = 9;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
@ -71,48 +38,34 @@ message ListResp{
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
string uuid = 1;
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
string uuid = 1;
|
||||
repeated GovernanceLang dataByLang = 2;
|
||||
int32 sort = 3;
|
||||
string operator = 4;
|
||||
int32 operatorId = 5;
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
string operator = 7;
|
||||
int32 operatorId = 8;
|
||||
}
|
||||
|
||||
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{
|
||||
string uuid = 1;
|
||||
repeated GovernanceLang dataByLang = 2;
|
||||
uint32 sort = 3;
|
||||
int32 status = 4;
|
||||
string operator = 5;
|
||||
int32 operatorId = 6;
|
||||
string title = 1;
|
||||
uint32 sort = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 status = 5;
|
||||
string operator = 6;
|
||||
int32 operatorId = 7;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
@ -120,9 +73,9 @@ message CreateResp{
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
string langType = 1;//语言类型
|
||||
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
repeated DisplayItem data = 1;
|
||||
repeated Item data = 1;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/governance/governance.proto
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
@ -15,41 +15,7 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
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 {
|
||||
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
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
@ -72,43 +38,12 @@ func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
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
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
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 {
|
||||
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 *CreateResp) Validate() error {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/governance/governance.proto
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
@ -31,8 +31,6 @@ type GovernanceClient interface {
|
||||
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)
|
||||
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)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
}
|
||||
@ -42,13 +40,11 @@ type governanceClient struct {
|
||||
}
|
||||
|
||||
type GovernanceClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, 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)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) GetDubboStub(cc *triple.TripleConn) GovernanceClient {
|
||||
@ -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)
|
||||
}
|
||||
|
||||
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) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -112,8 +96,6 @@ type GovernanceServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, 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)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
@ -133,12 +115,6 @@ func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*Delet
|
||||
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
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) {
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -395,14 +313,6 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "Edit",
|
||||
Handler: _Governance_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdataStatus",
|
||||
Handler: _Governance_UpdataStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetGovernanceInfo",
|
||||
Handler: _Governance_GetGovernanceInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Governance_Create_Handler,
|
||||
@ -413,5 +323,5 @@ var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/governance/governance.proto",
|
||||
Metadata: "governance.proto",
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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
119
api/pressreleases/press_releases.proto
Normal file
119
api/pressreleases/press_releases.proto
Normal 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;
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/pressreleases/press_releases.proto
|
||||
// source: press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
@ -15,37 +15,7 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *LangSetting) 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayItem) Validate() error {
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (this *Item) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
@ -61,32 +31,6 @@ func (this *ListResp) Validate() error {
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -100,44 +44,13 @@ func (this *DisplayResp) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Files) Validate() error {
|
||||
return nil
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Files {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Files", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
@ -153,10 +66,5 @@ func (this *GetReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.26.0
|
||||
// source: api/pressreleases/press_releases.proto
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: press_releases.proto
|
||||
|
||||
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.
|
||||
type PressReleasesClient interface {
|
||||
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)
|
||||
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)
|
||||
@ -43,14 +41,12 @@ type pressReleasesClient struct {
|
||||
}
|
||||
|
||||
type PressReleasesClientImpl struct {
|
||||
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)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) GetDubboStub(cc *triple.TripleConn) PressReleasesClient {
|
||||
@ -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)
|
||||
}
|
||||
|
||||
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) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -118,8 +102,6 @@ func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_
|
||||
// for forward compatibility
|
||||
type PressReleasesServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
SortAndStatus(context.Context, *SortAndStatusReq) (*SortAndStatusResp, error)
|
||||
Info(context.Context, *InfoReq) (*InfoResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
@ -136,12 +118,6 @@ type UnimplementedPressReleasesServer struct {
|
||||
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
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) {
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -428,14 +346,6 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "List",
|
||||
Handler: _PressReleases_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SortAndStatus",
|
||||
Handler: _PressReleases_SortAndStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Info",
|
||||
Handler: _PressReleases_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _PressReleases_Display_Handler,
|
||||
@ -458,5 +368,5 @@ var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/pressreleases/press_releases.proto",
|
||||
Metadata: "press_releases.proto",
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
}
|
||||
@ -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
@ -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;
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
@ -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",
|
||||
}
|
||||
@ -38,11 +38,4 @@ TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[service]
|
||||
IsHTTPS = false
|
||||
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
maxsize = 5
|
||||
maxage = 30
|
||||
maxbackups = 30
|
||||
IsHTTPS = false
|
||||
@ -54,9 +54,6 @@ dubbo:
|
||||
FieeCronClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.cron
|
||||
SupplierClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.supplier
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
Binary file not shown.
BIN
data/invoice.pdf
BIN
data/invoice.pdf
Binary file not shown.
BIN
data/图文导入模板.xlsx
BIN
data/图文导入模板.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -43,6 +43,6 @@ Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
maxsize = 5
|
||||
maxage = 30
|
||||
maxbackups = 30
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
||||
@ -61,9 +61,6 @@ dubbo:
|
||||
methods:
|
||||
- name: SecurityScan
|
||||
timeout: 120000
|
||||
SupplierClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.supplier
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
@ -43,6 +43,6 @@ Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
maxsize = 5
|
||||
maxage = 30
|
||||
maxbackups = 30
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
||||
@ -63,9 +63,6 @@ dubbo:
|
||||
methods:
|
||||
- name: SecurityScan
|
||||
timeout: 120000
|
||||
SupplierClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.supplier
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
@ -44,6 +44,6 @@ Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
maxsize = 5
|
||||
maxage = 30
|
||||
maxbackups = 30
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
||||
@ -61,9 +61,6 @@ dubbo:
|
||||
methods:
|
||||
- name: SecurityScan
|
||||
timeout: 120000
|
||||
SupplierClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.supplier
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
||||
6
go.mod
6
go.mod
@ -106,6 +106,7 @@ require (
|
||||
github.com/BurntSushi/toml v1.2.1
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/duke-git/lancet/v2 v2.3.8
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0
|
||||
github.com/fonchain/utils/security v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000
|
||||
@ -113,10 +114,8 @@ require (
|
||||
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/mholt/archiver v3.1.1+incompatible
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
github.com/phpdave11/gofpdf v1.4.3
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
|
||||
github.com/samber/lo v1.52.0
|
||||
github.com/shopspring/decimal v1.4.0
|
||||
@ -166,6 +165,7 @@ require (
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-resty/resty/v2 v2.7.0 // indirect
|
||||
github.com/golang/mock v1.5.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
@ -180,7 +180,7 @@ require (
|
||||
github.com/nxadm/tail v1.4.11 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/onsi/gomega v1.18.1 // indirect
|
||||
github.com/phpdave11/gofpdi v1.0.15 // indirect
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
github.com/polarismesh/polaris-go v1.1.0 // indirect
|
||||
github.com/richardlehane/mscfb v1.0.4 // indirect
|
||||
|
||||
11
go.sum
11
go.sum
@ -168,7 +168,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
|
||||
github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
|
||||
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
|
||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
@ -258,6 +257,8 @@ github.com/dubbogo/net v0.0.4/go.mod h1:1CGOnM7X3he+qgGNqjeADuE5vKZQx/eMSeUkpU3u
|
||||
github.com/dubbogo/triple v1.0.9/go.mod h1:1t9me4j4CTvNDcsMZy6/OGarbRyAUSY0tFXGXHCp7Iw=
|
||||
github.com/dubbogo/triple v1.1.8 h1:yE+J3W1NTZCEPa1FoX+VWZH6UF1c0+A2MGfERlU2zbI=
|
||||
github.com/dubbogo/triple v1.1.8/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk=
|
||||
github.com/duke-git/lancet/v2 v2.3.8 h1:dlkqn6Nj2LRWFuObNxttkMHxrFeaV6T26JR8jbEVbPg=
|
||||
github.com/duke-git/lancet/v2 v2.3.8/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
@ -582,7 +583,6 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
||||
@ -747,11 +747,8 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO
|
||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/phpdave11/gofpdf v1.4.3 h1:M/zHvS8FO3zh9tUd2RCOPEjyuVcs281FCyF22Qlz/IA=
|
||||
github.com/phpdave11/gofpdf v1.4.3/go.mod h1:MAwzoUIgD3J55u0rxIG2eu37c+XWhBtXSpPAhnQXf/o=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 h1:zyWXQ6vu27ETMpYsEMAsisQ+GqJ4e1TPvSNfdOPF0no=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/phpdave11/gofpdi v1.0.15 h1:iJazY1BQ07I9s7N5EWjBO1YbhmKfHGxNligUv/Rw4Lc=
|
||||
github.com/phpdave11/gofpdi v1.0.15/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI=
|
||||
@ -830,7 +827,6 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
@ -1085,7 +1081,6 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
|
||||
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
|
||||
|
||||
@ -182,30 +182,6 @@ var EnMessages = map[string]string{
|
||||
"未知增值服务": "Unknown value-added service",
|
||||
"套餐未绑定增值服务": "Bundle not bound to value-added service",
|
||||
"网络错误": "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{
|
||||
@ -382,30 +358,6 @@ var DeDEMessages = map[string]string{
|
||||
"未知增值服务": "Unbekannter Mehrwertdienst",
|
||||
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
|
||||
"网络错误": "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{
|
||||
@ -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{
|
||||
@ -794,28 +722,4 @@ var ZhTWMessages = map[string]string{
|
||||
"未知增值服务": "未知增值服務",
|
||||
"套餐未绑定增值服务": "套餐未綁定增值服務",
|
||||
"网络错误": "網絡錯誤",
|
||||
|
||||
// Website report related messages
|
||||
"创建官网报告失败": "創建官網報告失敗",
|
||||
"删除官网报告失败": "刪除官網報告失敗",
|
||||
"官网报告列表查询失败": "官網報告列表查詢失敗",
|
||||
"编辑官网报告失败": "編輯官網報告失敗",
|
||||
"显示官网报告失败": "顯示官網報告失敗",
|
||||
|
||||
// Website member management related messages
|
||||
"创建官网成员失败": "創建官網成員失敗",
|
||||
"删除官网成员失败": "刪除官網成員失敗",
|
||||
"官网成员列表查询失败": "官網成員列表查詢失敗",
|
||||
"编辑官网成员失败": "編輯官網成員失敗",
|
||||
"显示官网成员失败": "顯示官網成員失敗",
|
||||
"编辑董事会成员失败": "編輯董事會成員失敗",
|
||||
"编辑委员会成员失败": "編輯委員會成員失敗",
|
||||
"显示委员会成员失败": "顯示委員會成員失敗",
|
||||
"编辑管理员失败": "編輯管理員失敗",
|
||||
"显示管理员失败": "顯示管理員失敗",
|
||||
"显示董事会成员失败": "顯示董事會成員失敗",
|
||||
|
||||
// Website email alert related messages
|
||||
"提交邮箱通知失败": "提交郵箱通知失敗",
|
||||
"获取邮箱通知列表失败": "獲取郵箱通知列表失敗",
|
||||
}
|
||||
|
||||
@ -1,109 +0,0 @@
|
||||
package qwen
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
modelQwen "fonchain-fiee/pkg/model/qwen"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// VL 调用通义千问视觉多模态API,支持多个视频、多张图片和文本
|
||||
func VL(videoURLs []string, imageURLs []string, text string, model string) (resp *modelQwen.VLResponse, err error) {
|
||||
// 设置默认模型
|
||||
if model == "" {
|
||||
model = "qwen3-vl-plus"
|
||||
}
|
||||
|
||||
// 构建内容列表
|
||||
content := make([]modelQwen.VLContent, 0)
|
||||
|
||||
// 添加视频内容,支持自定义fps
|
||||
for _, videoURL := range videoURLs {
|
||||
fps := 2 // 默认fps为2
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "video_url",
|
||||
VideoURL: &modelQwen.VideoURL{
|
||||
URL: videoURL,
|
||||
},
|
||||
FPS: fps,
|
||||
})
|
||||
}
|
||||
|
||||
// 添加图片内容
|
||||
for _, imageURL := range imageURLs {
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "image_url",
|
||||
ImageURL: &modelQwen.ImageURL{
|
||||
URL: imageURL,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 添加文本内容
|
||||
if text != "" {
|
||||
content = append(content, modelQwen.VLContent{
|
||||
Type: "text",
|
||||
Text: text,
|
||||
})
|
||||
}
|
||||
|
||||
// 构建请求
|
||||
req := modelQwen.VLRequest{
|
||||
Model: model,
|
||||
Messages: []modelQwen.VLMessage{
|
||||
{
|
||||
Role: "user",
|
||||
Content: content,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// 序列化请求
|
||||
jsonData, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
zap.L().Error("VL Marshal failed", zap.Error(err))
|
||||
return nil, errors.New("序列化请求失败")
|
||||
}
|
||||
|
||||
// 发送请求,使用PostBytesHeader获取状态码和响应体
|
||||
statusCode, body, err := utils.PostBytesHeader(modelQwen.DashscopeVLURL, map[string]interface{}{
|
||||
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
|
||||
"Content-Type": "application/json",
|
||||
// "X-DashScope-OssResourceResolve": "enable", // 启用OSS资源解析
|
||||
}, jsonData)
|
||||
if err != nil {
|
||||
zap.L().Error("VL Post failed", zap.Error(err))
|
||||
return nil, errors.New("请求视觉AI失败")
|
||||
}
|
||||
|
||||
// 检查状态码,如果不是200,尝试解析错误响应
|
||||
if statusCode != 200 {
|
||||
// 尝试解析错误响应
|
||||
var errorResp struct {
|
||||
Error struct {
|
||||
Message string `json:"message"`
|
||||
Type string `json:"type"`
|
||||
Code string `json:"code"`
|
||||
} `json:"error"`
|
||||
}
|
||||
if err := json.Unmarshal(body, &errorResp); err == nil && errorResp.Error.Message != "" {
|
||||
zap.L().Error("VL API error", zap.Int("status", statusCode), zap.String("message", errorResp.Error.Message))
|
||||
return nil, fmt.Errorf("%s", errorResp.Error.Message)
|
||||
}
|
||||
// 如果无法解析错误响应,返回通用错误
|
||||
zap.L().Error("VL API error", zap.Int("status", statusCode), zap.String("body", string(body)))
|
||||
return nil, fmt.Errorf("接口返回错误")
|
||||
}
|
||||
|
||||
// 解析响应
|
||||
var result modelQwen.VLResponse
|
||||
if err = json.Unmarshal(body, &result); err != nil {
|
||||
zap.L().Error("VL Unmarshal failed", zap.Error(err), zap.String("body", string(body)))
|
||||
return nil, fmt.Errorf("解析响应失败: %v", err)
|
||||
}
|
||||
|
||||
return &result, nil
|
||||
}
|
||||
402
pkg/cron/task.go
402
pkg/cron/task.go
@ -5,20 +5,16 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/aryshare"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
bundleModel "fonchain-fiee/pkg/model/bundle"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
serverCast "fonchain-fiee/pkg/service/cast"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"log"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis"
|
||||
@ -28,16 +24,13 @@ import (
|
||||
// InitTasks 初始化定时任务
|
||||
func InitTasks() error {
|
||||
cm := GetCronManager()
|
||||
err := cm.AddTask("refreshWorkApprovalStatus", "0 */5 * * * *", RefreshApprovalStatusTask)
|
||||
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
|
||||
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
|
||||
err = cm.AddTask("refreshPublishStatus", "0 */5 * * * *", PublishTask)
|
||||
err = cm.AddTask("scheduledPublish", "0 */1 * * * *", ScheduledPublishTask) //FIXME
|
||||
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", RefreshPublishStatusTask)
|
||||
err = cm.AddTask("scheduledPublish", "0 */1 * * * *", ScheduledPublishTask)
|
||||
|
||||
err = cm.AddTask("artistAutoConfirmAnalysis", "0 */1 * * * *", ArtistAutoConfirmAnalysisTask)
|
||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */5 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||
err = cm.AddTask("artistAutoConfirmReport", "0 */1 * * * *", ArtistAutoConfirmReportTask)
|
||||
err = cm.AddTask("refreshCompetitiveReportApprovalStatus", "0 */5 * * * *", RefreshCompetitiveReportApprovalStatusTask)
|
||||
err = cm.AddTask("refreshArtistOrder", "0 */5 * * * *", RefreshArtistOrderTask)
|
||||
err = cm.AddTask("refreshWorkAnalysisApprovalStatus", "0 */1 * * * *", RefreshWorkAnalysisApprovalStatusTask)
|
||||
|
||||
// 每天 00:30 和 12:30 执行 Ayrshare 指标采集任务
|
||||
// err = cm.AddTask("ayrshareMetricsCollector", "0 30 0,12 * * *", AyrshareMetricsCollectorTask)
|
||||
@ -45,9 +38,6 @@ func InitTasks() error {
|
||||
if err != nil {
|
||||
log.Printf("添加定时任务失败: %v", err)
|
||||
}
|
||||
|
||||
// 每2分钟执行一次标签观看次数更新任务
|
||||
// err = cm.AddTask("updateCastTagWatchCount", "0 */1 * * * *", UpdateCastTagWatchCountTask)
|
||||
cm.Start()
|
||||
|
||||
// 启动队列消费者
|
||||
@ -59,12 +49,6 @@ func InitTasks() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func RefreshApprovalStatusTask() {
|
||||
go RefreshWorkApprovalStatusTask()
|
||||
go RefreshScriptApprovalStatusTask()
|
||||
}
|
||||
|
||||
// RefreshWorkApprovalStatusTask 刷新作品审批状态任务
|
||||
func RefreshWorkApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.WorkList(context.Background(), &cast.WorkListReq{
|
||||
Page: 1,
|
||||
@ -81,50 +65,6 @@ func RefreshWorkApprovalStatusTask() {
|
||||
serverCast.RefreshWorkApproval(nil, resp.Data)
|
||||
}
|
||||
|
||||
// RefreshScriptApprovalStatusTask 刷新脚本审批状态任务
|
||||
func RefreshScriptApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.ListVideoScripts(context.Background(), &cast.ListVideoScriptsReq{
|
||||
Status: 2,
|
||||
Page: 1,
|
||||
PageSize: 9999,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("获取工作列表失败: %v", err)
|
||||
return
|
||||
}
|
||||
if resp.Data == nil || len(resp.Data) == 0 {
|
||||
return
|
||||
}
|
||||
var approvalIds []int
|
||||
for _, v := range resp.Data {
|
||||
if v.ApprovalID == "" {
|
||||
continue
|
||||
}
|
||||
id, _ := strconv.ParseInt(v.ApprovalID, 10, 64)
|
||||
approvalIds = append(approvalIds, int(id))
|
||||
}
|
||||
var data map[int]modelCast.Item
|
||||
castService := new(serverCast.CastService)
|
||||
data, err = castService.ApprovalDetail(approvalIds)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
for approvalID, v := range data {
|
||||
var scriptReq cast.UpdateScriptStatusReq
|
||||
scriptReq.ApprovalID = fmt.Sprint(approvalID)
|
||||
uTimes, _ := stime.DatetimeToTimes(v.UpdatedAt, "2006-01-02 15:04:05")
|
||||
if v.Status == 2 && int64(uTimes) <= time.Now().Unix() {
|
||||
scriptReq.WorkAction = cast.WorkActionENUM_APPROVAL_PASS
|
||||
}
|
||||
if v.Status == 3 {
|
||||
scriptReq.WorkAction = cast.WorkActionENUM_APPROVAL_REJECT
|
||||
}
|
||||
scriptReq.ApprovalReply = v.Reply
|
||||
scriptReq.ApprovalTime = v.UpdatedAt
|
||||
_, _ = service.CastProvider.UpdateScriptStatus(context.Background(), &scriptReq)
|
||||
}
|
||||
}
|
||||
|
||||
// AutoManuallyConfirmWorkTaskWithRandomInterval 以随机间隔(3-7分钟)执行自动确认任务
|
||||
func AutoManuallyConfirmWorkTaskWithRandomInterval() {
|
||||
|
||||
@ -197,42 +137,12 @@ func AutoManuallyConfirmWorkTask() {
|
||||
continue
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
log.Printf("套餐已过期,作品uuid:"+req.WorkUuid, zap.Error(err))
|
||||
continue
|
||||
}
|
||||
|
||||
wordInfoRes, err := service.CastProvider.WorkDetail(context.Background(), &cast.WorkDetailReq{
|
||||
WorkUuid: req.WorkUuid,
|
||||
})
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
//判断作品对应订单是否相同
|
||||
if wordInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
//订单号不相同
|
||||
//新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
log.Printf("订单号不相同,作品uuid:"+req.WorkUuid, zap.Error(err))
|
||||
continue
|
||||
}
|
||||
//相同着正常走流程
|
||||
}
|
||||
if wordInfoRes.WorkStatus != 4 {
|
||||
continue
|
||||
}
|
||||
@ -246,11 +156,10 @@ func AutoManuallyConfirmWorkTask() {
|
||||
{
|
||||
if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_NOTENOUGH,
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
log.Printf("图文余量不足,作品uuid:"+req.WorkUuid, zap.Error(err))
|
||||
continue
|
||||
@ -261,11 +170,10 @@ func AutoManuallyConfirmWorkTask() {
|
||||
{
|
||||
if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_NOTENOUGH,
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
log.Printf("视频余量不足,作品uuid:"+req.WorkUuid, zap.Error(err))
|
||||
continue
|
||||
@ -299,7 +207,7 @@ func RefreshWorkAnalysisApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.ListWorkAnalysis(context.Background(), &cast.ListWorkAnalysisReq{
|
||||
Page: 1,
|
||||
StatusList: []uint32{2}, // 状态为2表示待审批
|
||||
PageSize: 9999,
|
||||
PageSize: 999999,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("获取数据分析列表失败: %v", err)
|
||||
@ -312,7 +220,6 @@ func RefreshWorkAnalysisApprovalStatusTask() {
|
||||
}
|
||||
|
||||
func ArtistAutoConfirmTask() {
|
||||
//FIXME 再加一个定时确认 不完全依赖于队列
|
||||
now := float64(time.Now().Unix())
|
||||
opt := redis.ZRangeBy{
|
||||
Min: fmt.Sprintf("%d", 0),
|
||||
@ -352,15 +259,11 @@ func RefreshPublishStatusTask() {
|
||||
//zap.L().Info("刷新发布状态成功")
|
||||
}
|
||||
|
||||
// PublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
||||
func PublishTask() {
|
||||
go RefreshPublishStatusTask() // 刷新发布状态
|
||||
go TaskStatus() // 异步任务状态
|
||||
}
|
||||
// ScheduledPublishTask 定时发布任务,从Redis Sorted Set中获取所有workUuid并根据score判断处理
|
||||
func ScheduledPublishTask() {
|
||||
// 加上锁
|
||||
lockKey := "scheduled_publish:lock"
|
||||
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), 2*time.Hour)
|
||||
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), 1*time.Hour)
|
||||
if !reply.Val() {
|
||||
zap.L().Warn("定时发布任务正在被其他实例处理")
|
||||
return
|
||||
@ -387,15 +290,12 @@ func ScheduledPublishTask() {
|
||||
|
||||
publishCount := 0
|
||||
expiredCount := 0
|
||||
const batchSize = 8 // 每批发布8个,与PublishWork的workerCount保持一致
|
||||
const batchSize = 10 // 每批发布10个
|
||||
|
||||
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 {
|
||||
@ -418,32 +318,11 @@ func ScheduledPublishTask() {
|
||||
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 {
|
||||
@ -451,6 +330,15 @@ func ScheduledPublishTask() {
|
||||
_ = serverCast.PublishWork(context.Background(), &cast.PublishReq{
|
||||
WorkUuids: publishBatch,
|
||||
})
|
||||
// 批量删除已发布的任务
|
||||
for _, uuid := range publishBatch {
|
||||
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, uuid).Result()
|
||||
if delErr != nil {
|
||||
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", uuid))
|
||||
} else if removed > 0 {
|
||||
publishCount++
|
||||
}
|
||||
}
|
||||
zap.L().Info("批次发布完成", zap.Int("published", len(publishBatch)))
|
||||
// 清空批次,准备下一批
|
||||
publishBatch = make([]string, 0, batchSize)
|
||||
@ -461,9 +349,17 @@ func ScheduledPublishTask() {
|
||||
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,
|
||||
PublishSource: cast.PublishSourceENUM_RePublishType_SCHEDULED,
|
||||
WorkUuids: publishBatch,
|
||||
})
|
||||
// 批量删除已发布的任务
|
||||
for _, uuid := range publishBatch {
|
||||
removed, delErr := cache.RedisClient.ZRem(modelCast.ScheduledPublishQueueKey, uuid).Result()
|
||||
if delErr != nil {
|
||||
zap.L().Error("删除定时发布任务失败", zap.Error(delErr), zap.String("work_uuid", uuid))
|
||||
} else if removed > 0 {
|
||||
publishCount++
|
||||
}
|
||||
}
|
||||
zap.L().Info("剩余批次发布完成", zap.Int("published", len(publishBatch)))
|
||||
}
|
||||
|
||||
@ -473,61 +369,6 @@ func ScheduledPublishTask() {
|
||||
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队列的消费者
|
||||
func WorkPublishQueueConsumer() {
|
||||
zap.L().Info("开始监听work:publish:queue队列(批量处理模式)")
|
||||
@ -646,180 +487,7 @@ func ArtistAutoConfirmAnalysisTask() {
|
||||
}
|
||||
}
|
||||
|
||||
func ArtistAutoConfirmReportTask() {
|
||||
now := float64(time.Now().Unix())
|
||||
opt := redis.ZRangeBy{
|
||||
Min: fmt.Sprintf("%d", 0),
|
||||
Max: fmt.Sprintf("%f", now),
|
||||
}
|
||||
reportUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmReportQueueKey, opt).Result()
|
||||
if err != nil {
|
||||
zap.L().Error("获取到期竞品报告任务失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
if len(reportUuids) == 0 {
|
||||
zap.L().Debug("没有到期的竞品报告任务")
|
||||
return
|
||||
}
|
||||
zap.L().Info("发现到期竞品报告任务", zap.Int("count", len(reportUuids)))
|
||||
for _, reportUuid := range reportUuids {
|
||||
serverCast.ProcessReportTask(context.Background(), reportUuid)
|
||||
}
|
||||
}
|
||||
|
||||
func RefreshCompetitiveReportApprovalStatusTask() {
|
||||
resp, err := service.CastProvider.ListCompetitiveReport(context.Background(), &cast.ListCompetitiveReportReq{
|
||||
Page: 1,
|
||||
StatusList: []uint32{2}, // 状态为2表示待审批
|
||||
PageSize: 9999,
|
||||
})
|
||||
if err != nil {
|
||||
log.Printf("获取竞品报告列表失败: %v", err)
|
||||
return
|
||||
}
|
||||
if resp.Data == nil || len(resp.Data) == 0 {
|
||||
return
|
||||
}
|
||||
serverCast.RefreshCompetitiveReportApproval(nil, resp.Data)
|
||||
}
|
||||
|
||||
// AyrshareMetricsCollectorTask Ayrshare 指标采集定时任务(每天 00:30 和 12:30 执行)
|
||||
func AyrshareMetricsCollectorTask() {
|
||||
serverCast.ExecuteAyrshareMetricsCollector()
|
||||
}
|
||||
|
||||
func RefreshArtistOrderTask() {
|
||||
now := time.Now()
|
||||
if now.Day() == 1 && now.Hour() < 1 {
|
||||
return
|
||||
}
|
||||
_, _ = 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更新为1,IsWatchCountCalled更新为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
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fonchain-fiee/api/cast"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"strings"
|
||||
@ -25,7 +24,7 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
|
||||
|
||||
// 表头
|
||||
headers := []interface{}{
|
||||
"艺人", "手机号", "用户编号", "作品标题", "脚本", "作品类型", "类型", "Ins", "Tiktok", "DM", "Youtube", "Bulesky", "作品状态", "验收确认类型",
|
||||
"艺人", "手机号", "用户编号", "作品标题", "脚本", "作品类型", "类型", "Ins", "Tiktok", "DM", "作品状态", "验收确认类型",
|
||||
"说明", "发布账号", "管理人", "上传时间", "待艺人确认时间", "验收确认通过时间", "发布成功时间",
|
||||
}
|
||||
if err := sw.SetRow("A1", headers); err != nil {
|
||||
@ -73,14 +72,12 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
|
||||
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.InsStatus)],
|
||||
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.TiktokStatus)],
|
||||
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.DmStatus)],
|
||||
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.YoutubeStatus)],
|
||||
modelCast.PlatformPublishStatusMM[cast.PublishStatusENUM(info.BlueskyStatus)],
|
||||
modelCast.WorkStatusMM[int(info.WorkStatus)],
|
||||
modelCast.ConfirmTypeMM[int(info.ConfirmType)],
|
||||
info.Remark,
|
||||
mediaAccountNames,
|
||||
managerNames,
|
||||
info.SubmitTime,
|
||||
info.Status1Time,
|
||||
info.Status4Time,
|
||||
info.Status9Time,
|
||||
info.Status6Time,
|
||||
@ -103,44 +100,3 @@ func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.Fi
|
||||
|
||||
return f, nil
|
||||
}
|
||||
|
||||
func (w *Work) ExportPublishLogList(data []*cast.PublishLogInfo, savePath string) error {
|
||||
f := excelize.NewFile()
|
||||
defer f.Close()
|
||||
|
||||
sheetName := "Sheet1"
|
||||
f.SetSheetName("Sheet1", sheetName)
|
||||
|
||||
headers := []string{
|
||||
"状态", "失败原因", "提交发布时间", "发布平台", "发布方式", "作品类型", "作品标题", "艺人", "用户编号",
|
||||
}
|
||||
for col, h := range headers {
|
||||
cell, _ := excelize.CoordinatesToCellName(col+1, 1)
|
||||
f.SetCellValue(sheetName, cell, h)
|
||||
}
|
||||
|
||||
for rowIndex, info := range data {
|
||||
row := rowIndex + 2
|
||||
platformName := modelCast.PlatformNameKv[info.PlatformID]
|
||||
if platformName == "" {
|
||||
platformName = fmt.Sprintf("%d", info.PlatformID)
|
||||
}
|
||||
values := []interface{}{
|
||||
modelCast.PublishStatusMM[int(info.PublishMediaStatus)],
|
||||
info.Detail,
|
||||
info.CreatedAt,
|
||||
modelCast.PlatformNameKv[info.PlatformID],
|
||||
modelCast.PublishSourceMM[int(info.PublishSource)],
|
||||
modelCast.WorkCategoryMM[int(info.WorkCategory)],
|
||||
info.Title,
|
||||
info.ArtistName,
|
||||
info.ArtistSubNum,
|
||||
}
|
||||
for col, v := range values {
|
||||
cell, _ := excelize.CoordinatesToCellName(col+1, row)
|
||||
f.SetCellValue(sheetName, cell, v)
|
||||
}
|
||||
}
|
||||
|
||||
return f.SaveAs(savePath)
|
||||
}
|
||||
|
||||
@ -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")
|
||||
}
|
||||
@ -70,7 +70,6 @@ func CheckLogin(provider *api.AccountFieeClientImpl) gin.HandlerFunc {
|
||||
TelNum: jwt.Phone,
|
||||
SubscriberNumber: infoRes.SubscriberNumber,
|
||||
IdNumber: infoRes.IdNumber,
|
||||
InviterID: infoRes.InviterId,
|
||||
}
|
||||
|
||||
ctx.Set("jwtInfo", loginInfo)
|
||||
|
||||
@ -13,6 +13,7 @@ type UserWorkAnalysisConfirmReq struct {
|
||||
}
|
||||
|
||||
type GetBundleBalanceListResp struct {
|
||||
|
||||
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
|
||||
Data []*BundleBalanceItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data"`
|
||||
}
|
||||
@ -32,8 +33,6 @@ type BundleBalanceItem struct {
|
||||
ImageConsumptionNumber int32 `protobuf:"varint,12,opt,name=imageConsumptionNumber,proto3" json:"imageConsumptionNumber"`
|
||||
DataAnalysisNumber int32 `protobuf:"varint,13,opt,name=dataAnalysisNumber,proto3" json:"dataAnalysisNumber"`
|
||||
DataAnalysisConsumptionNumber int32 `protobuf:"varint,14,opt,name=dataAnalysisConsumptionNumber,proto3" json:"dataAnalysisConsumptionNumber"`
|
||||
CompetitiveNumber int32 `protobuf:"varint,15,opt,name=competitiveNumber,proto3" json:"competitiveNumber"`
|
||||
CompetitiveConsumptionNumber int32 `protobuf:"varint,16,opt,name=competitiveConsumptionNumber,proto3" json:"competitiveConsumptionNumber"`
|
||||
ExpansionPacksNumber int32 `protobuf:"varint,17,opt,name=expansionPacksNumber,proto3" json:"expansionPacksNumber"`
|
||||
Bought int32 `protobuf:"varint,18,opt,name=bought,proto3" json:"bought"`
|
||||
ExpansionPacksNumber int32 `protobuf:"varint,15,opt,name=expansionPacksNumber,proto3" json:"expansionPacksNumber"`
|
||||
Bought int32 `protobuf:"varint,16,opt,name=bought,proto3" json:"bought"`
|
||||
}
|
||||
|
||||
@ -8,29 +8,25 @@ type SyncAsProfileReq struct {
|
||||
|
||||
// 定义枚举值
|
||||
const (
|
||||
BalanceTypeAccountValue BalanceTypeEnum = 1 //账号
|
||||
BalanceTypeImageValue BalanceTypeEnum = 2 //图文
|
||||
BalanceTypeVideoValue BalanceTypeEnum = 3 //视频
|
||||
BalanceTypeDataValue BalanceTypeEnum = 4 //数据分析
|
||||
BalanceTypeCompetitiveValue BalanceTypeEnum = 5 //竞品数
|
||||
BalanceTypeAccountValue BalanceTypeEnum = 1
|
||||
BalanceTypeImageValue BalanceTypeEnum = 2
|
||||
BalanceTypeVideoValue BalanceTypeEnum = 3
|
||||
BalanceTypeDataValue BalanceTypeEnum = 4
|
||||
)
|
||||
|
||||
var PlatformNameKv = map[uint32]string{
|
||||
1: "tiktok",
|
||||
2: "youtube",
|
||||
3: "instagram",
|
||||
4: "DM",
|
||||
5: "bluesky",
|
||||
}
|
||||
|
||||
var NamePlatformIDKv = map[string]uint32{
|
||||
"tiktok": 1,
|
||||
"youtube": 2,
|
||||
"instagram": 3,
|
||||
"DM": 4,
|
||||
"bluesky": 5,
|
||||
}
|
||||
|
||||
type UnbindAccountReq struct {
|
||||
MediaAccountUuids []string `json:"mediaAccountUuids"`
|
||||
var PlatformIDStrKv = map[string]uint8{
|
||||
"TIKTOK": 1,
|
||||
"INS": 2,
|
||||
"DM": 4,
|
||||
}
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
package cast
|
||||
|
||||
type PublishTaskDto struct {
|
||||
WorkUuids []string
|
||||
MediaAccountUuids []string
|
||||
PlatformIds []string
|
||||
}
|
||||
|
||||
var TaskActionName = map[string]string{
|
||||
"importWorkBatch": "批量导入图文",
|
||||
"publishBatch1": "批量发布",
|
||||
"publishBatch2": "多账号同步",
|
||||
}
|
||||
@ -21,9 +21,6 @@ const (
|
||||
AutoConfirmAnalysisQueueKey = "auto_confirm:analysis:queue"
|
||||
AutoConfirmAnalysisLockKey = "auto_confirm:analysis:lock:%s"
|
||||
|
||||
AutoConfirmReportQueueKey = "auto_confirm:report:queue"
|
||||
AutoConfirmReportLockKey = "auto_confirm:report:lock:%s"
|
||||
|
||||
// AyrshareMetricsCollectorLockKey Ayrshare 指标采集任务锁
|
||||
AyrshareMetricsCollectorLockKey = "ayrshare:metrics:collector:lock"
|
||||
)
|
||||
@ -32,18 +29,6 @@ var WorkCategoryMM = map[int]string{
|
||||
1: "图文",
|
||||
2: "视频",
|
||||
}
|
||||
var PublishSourceMM = map[int]string{
|
||||
1: "手动发布",
|
||||
2: "定时任务",
|
||||
3: "手动发布",
|
||||
}
|
||||
|
||||
var PublishStatusMM = map[int]string{
|
||||
1: "进行中",
|
||||
2: "发布成功",
|
||||
3: "发布失败",
|
||||
4: "发布异常",
|
||||
}
|
||||
|
||||
var WorkCostTypeMM = map[int]string{
|
||||
1: "套餐",
|
||||
@ -58,6 +43,13 @@ var PlatformPublishStatusMM = map[cast.PublishStatusENUM]string{
|
||||
cast.PublishStatusENUM_PublishMediaStatus_EXCEPTION: "异常",
|
||||
}
|
||||
|
||||
var PlatformIDMM = map[int]string{
|
||||
1: "TIKTOK",
|
||||
2: "YouTube",
|
||||
3: "Ins",
|
||||
4: "DM",
|
||||
}
|
||||
|
||||
var WorkStatusMM = map[int]string{
|
||||
1: "草稿",
|
||||
2: "审核中",
|
||||
|
||||
@ -29,7 +29,6 @@ type Info struct {
|
||||
TelNum string `json:"telNum"`
|
||||
SubscriberNumber string `json:"subscriberNumber"`
|
||||
IdNumber string `json:"idNumber"`
|
||||
InviterID uint64 `json:"inviterId"`
|
||||
}
|
||||
|
||||
func GetUserInfoFromC(c *gin.Context) Info {
|
||||
|
||||
@ -4,7 +4,6 @@ const (
|
||||
DashscopeAPIKey string = "sk-5ae9df5d3bcf4755ad5d12012058a2e7"
|
||||
DashscopeText2ImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis"
|
||||
DashscopeEditImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis"
|
||||
DashscopeVLURL string = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
|
||||
)
|
||||
|
||||
// QwenImageRequest 通义千问文生图请求
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
package qwen
|
||||
|
||||
// VLContent 视觉多模态内容结构,支持文本、图片和视频
|
||||
type VLContent struct {
|
||||
Type string `json:"type"` // text, image_url, video_url
|
||||
Text string `json:"text,omitempty"` // type=text 时使用
|
||||
ImageURL *ImageURL `json:"image_url,omitempty"` // type=image_url 时使用
|
||||
VideoURL *VideoURL `json:"video_url,omitempty"` // type=video_url 时使用
|
||||
FPS int `json:"fps,omitempty"` // type=video_url 时可选,视频帧率
|
||||
}
|
||||
|
||||
// VideoURL 视频URL结构
|
||||
type VideoURL struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// VLRequest 视觉多模态请求结构
|
||||
type VLRequest struct {
|
||||
Model string `json:"model"` // 模型名称,如 qwen3-vl-plus
|
||||
Messages []VLMessage `json:"messages"` // 消息列表
|
||||
Seed int64 `json:"seed,omitempty"` // 随机种子
|
||||
EnableSearch bool `json:"enable_search,omitempty"` // 是否启用搜索
|
||||
}
|
||||
|
||||
// VLMessage 视觉多模态消息结构
|
||||
type VLMessage struct {
|
||||
Role string `json:"role"` // user, assistant, system
|
||||
Content []VLContent `json:"content"` // 内容列表,可包含文本、图片、视频
|
||||
}
|
||||
|
||||
// VLResponse 视觉多模态响应结构
|
||||
type VLResponse struct {
|
||||
Choices []VLChoice `json:"choices"`
|
||||
Model string `json:"model,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// VLChoice 视觉多模态选择结果
|
||||
type VLChoice struct {
|
||||
Message struct {
|
||||
Content string `json:"content"`
|
||||
ReasoningContent string `json:"reasoning_content"`
|
||||
Role string `json:"role"`
|
||||
} `json:"message"`
|
||||
FinishReason string `json:"finish_reason"`
|
||||
Index int `json:"index,omitempty"`
|
||||
}
|
||||
@ -31,51 +31,20 @@ func AnalysisRouter(r *gin.RouterGroup) {
|
||||
analysis.POST("artist-metrics-single", serviceCast.ArtistMetricsDailyWindow) // 艺人指标日窗口
|
||||
analysis.POST("tobe-confirmed-list", serviceCast.TobeConfirmedList) // 待确认数据列表
|
||||
analysis.POST("update-approval-id", serviceCast.UpdateWorkAnalysisApprovalID) // 更新作品分析审批ID
|
||||
analysis.POST("update-pdf-url", serviceCast.UpdateWorkAnalysisPdfUrl) // 更新作品分析PDF链接
|
||||
|
||||
// 刷数据专用的导入接口
|
||||
analysis.POST("import-batch", serviceCast.ImportWorkAnalysisBatch) // Excel 批量导入数据分析
|
||||
|
||||
analysis.POST("trigger-ayrshare-metrics", serviceCast.TriggerAyrshareMetricsCollector) // 手动触发 Ayrshare 指标采集任务
|
||||
}
|
||||
|
||||
competitiveReport := r.Group("report")
|
||||
competitiveReport.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
{
|
||||
competitiveReport.POST("create", serviceCast.CreateCompetitiveReport) // 创建竞品报告
|
||||
competitiveReport.POST("import-batch", serviceCast.ImportCompetitiveReportBatch) // 批量导入竞品报告
|
||||
competitiveReport.POST("update-status", serviceCast.UpdateCompetitiveReportStatus) // 更新竞品报告状态
|
||||
competitiveReport.POST("detail", serviceCast.GetCompetitiveReport) // 获取竞品报告详情
|
||||
competitiveReport.POST("list", serviceCast.ListCompetitiveReport) // 获取竞品报告列表
|
||||
competitiveReport.POST("single-list", serviceCast.ListCompetitiveReportByArtistUuid) // 根据艺人UUID获取竞品报告列表
|
||||
competitiveReport.POST("delete", serviceCast.DeleteCompetitiveReport) // 删除竞品报告
|
||||
competitiveReport.POST("update-approval-id", serviceCast.UpdateCompetitiveReportApprovalID) // 更新竞品报告审批ID
|
||||
competitiveReport.POST("count-by-work-uuids", serviceCast.CountCompetitiveReportByWorkUuids) // 根据作品UUID统计竞品报告数量
|
||||
competitiveReport.POST("export-list", serviceCast.ListCompetitiveReportExport) // 竞品报告列表导出
|
||||
competitiveReport.POST("export-single-list", serviceCast.ListCompetitiveReportSingleExport) // 竞品报告单个列表导出
|
||||
competitiveReport.POST("import-pdf-batch", serviceCast.ImportPdfBatch) // 批量导入PDF(下载、重命名、上传)
|
||||
|
||||
// 刷竞品报告专用的导入接口
|
||||
competitiveReport.POST("import-history-batch", serviceCast.ImportCompetitiveReportHistoryBatch) // Excel 批量刷写竞品报告历史数据
|
||||
}
|
||||
|
||||
// 员工任务相关路由(需要App登录验证
|
||||
analysisAppRoute := r.Group("app/analysis")
|
||||
analysisAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
analysisAppRoute.POST("list", serviceCast.ListWorkAnalysisForApp) // 作品列表
|
||||
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)
|
||||
}
|
||||
|
||||
competitiveReportAppRoute := r.Group("app/report")
|
||||
competitiveReportAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
competitiveReportAppRoute.POST("detail", serviceCast.GetCompetitiveReportForApp) // 获取竞品报告详情(App端)
|
||||
competitiveReportAppRoute.POST("list", serviceCast.ListReportByArtistUuidForApp) // 根据艺人UUID获取竞品报告列表(App端)
|
||||
competitiveReportAppRoute.POST("update-status", serviceCast.UpdateCompetitiveReportStatus) // 更新竞品报告状态(App端)
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,16 +14,8 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleAppRoute := r.Group("bundle")
|
||||
bundleAppNoAuthRoute := r.Group("bundle")
|
||||
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
bundleClientNoAuthRoute := r.Group("bundle/no-auth")
|
||||
// 套餐
|
||||
{
|
||||
{
|
||||
bundleClientNoAuthRoute.POST("export/work-cast-info", bundle.ExportWorkCastInfo)
|
||||
bundleClientNoAuthRoute.POST("export/bundle-price-info", bundle.ExportBundlePriceInfo)
|
||||
bundleClientNoAuthRoute.POST("survey/is-send", bundle.IsSendSurvey)
|
||||
bundleClientNoAuthRoute.POST("survey/bundleInfo", bundle.QuestionnaireSurveyBundleInfo)
|
||||
bundleClientNoAuthRoute.POST("survey/create", bundle.QuestionnaireSurveyCreate)
|
||||
}
|
||||
bundleClientRoute := bundleRoute.Group("system")
|
||||
{
|
||||
bundleClientRoute.POST("create", bundle.CreateBundle)
|
||||
@ -58,11 +50,6 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
metrics.POST("export/balance-detail", bundle.MetricsBalanceDetailExport)
|
||||
metrics.POST("export/balance-metrics", bundle.BalanceMetricsExport)
|
||||
}
|
||||
survey := bundleClientRoute.Group("survey")
|
||||
{
|
||||
survey.POST("list", bundle.QuestionnaireSurveyList)
|
||||
}
|
||||
|
||||
}
|
||||
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
||||
{
|
||||
|
||||
@ -16,13 +16,10 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
bundleOrderRoute := r.Group("bundle-order")
|
||||
bundleOrderRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
bundleOrderWebRoute := r.Group("bundle-order")
|
||||
bundleOrderWebRoute.POST("password-free/bundle-order-list-download", bundle.OrderRecordsListPasswordFreeDownload)
|
||||
bundleOrderWebRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
bundleOrderNoAuthRoute := r.Group("bundle-order")
|
||||
|
||||
// 套餐
|
||||
{
|
||||
bundleOrderNoAuthRoute.POST("common/web/no-auth/reconciliation-list-download", bundle.GetReconciliationListDownload)
|
||||
bundleOrderNoAuthRoute.POST("common/web/no-auth/creat-invoice", bundle.CreatInvoice)
|
||||
bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web")
|
||||
{
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
@ -33,22 +30,10 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
bundleOrderClientWebRoute.POST("query-order-snapshot-information", bundle.QueryTheOrderSnapshotInformation)
|
||||
// 自动创建用户和订单
|
||||
bundleOrderClientWebRoute.POST("auto-create-user-order", bundle.AutoCreateUserAndOrder)
|
||||
// 发票管理相关接口
|
||||
bundleOrderClientWebRoute.POST("invoice-list", bundle.GetBundleInvoiceList)
|
||||
bundleOrderClientWebRoute.POST("invoice-express-info", bundle.GetInvoiceExpressInfo)
|
||||
bundleOrderClientWebRoute.POST("updata-invoice-express-info", bundle.UpdateInvoiceExpressInfo)
|
||||
bundleOrderClientWebRoute.GET("country-list", bundle.GetCountryList)
|
||||
bundleOrderClientWebRoute.POST("export-invoice", bundle.ExportInvoice)
|
||||
}
|
||||
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
||||
{
|
||||
bundleOrderClientAppRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
//发票管理
|
||||
bundleOrderClientAppRoute.POST("creat-paper-invoice", bundle.CreatePaperInvoiceAddress)
|
||||
bundleOrderClientAppRoute.POST("invoice-express-info", bundle.GetInvoiceExpressInfo)
|
||||
bundleOrderClientAppRoute.POST("invoice-list", bundle.GetInvoiceList)
|
||||
bundleOrderClientAppRoute.GET("country-list", bundle.GetCountryList)
|
||||
bundleOrderClientAppRoute.POST("download-invoice", bundle.CreateDownloadInvoice)
|
||||
}
|
||||
|
||||
//bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
||||
|
||||
@ -17,14 +17,12 @@ func cronRouter(r *gin.RouterGroup) {
|
||||
cron.POST("updateScheduleTask", cronService.UpdateScheduleTask)
|
||||
cron.POST("pauseScheduleTask", cronService.PauseScheduleTask)
|
||||
cron.POST("startScheduleTask", cronService.StartScheduleTask)
|
||||
cron.POST("republishScheduleTask", cronService.RepublishScheduleTask)
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
serviceCustomerContract "fonchain-fiee/pkg/service/customerContract"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// CustomerContractRouter 客户与合同管理路由,参考 MediaRouter 实现
|
||||
func CustomerContractRouter(r *gin.RouterGroup) {
|
||||
auth := r.Group("")
|
||||
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
// 客户管理
|
||||
customer := auth.Group("customer")
|
||||
{
|
||||
customer.POST("list", serviceCustomerContract.GetCustomerList)
|
||||
customer.POST("detail", serviceCustomerContract.GetCustomerDetail)
|
||||
customer.POST("update", serviceCustomerContract.UpdateCustomer)
|
||||
customer.POST("list/referral-person", serviceCustomerContract.GetReferralPersonList)
|
||||
}
|
||||
|
||||
// 合同管理
|
||||
contract := auth.Group("contract")
|
||||
{
|
||||
contract.POST("list", serviceCustomerContract.GetContractList)
|
||||
contract.POST("detail", serviceCustomerContract.GetContractDetail)
|
||||
contract.POST("update", serviceCustomerContract.UpdateContract)
|
||||
contract.POST("development-cycles", serviceCustomerContract.GetDevelopmentCyclesByContractUUID)
|
||||
contract.POST("payment-cycles", serviceCustomerContract.GetPaymentCyclesByContractUUID)
|
||||
contract.POST("upload-attachment", serviceCustomerContract.UploadContractAttachment)
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,6 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
media.POST("artist-info", serviceCast.ArtistInfo)
|
||||
media.POST("sync-as-profile", serviceCast.SyncAsProfile)
|
||||
media.POST("import-media-account", serviceCast.ImportMediaAccount)
|
||||
media.POST("unbind-auth", serviceCast.UnbindAuth)
|
||||
}
|
||||
mediaNoLogin := r.Group("media")
|
||||
{
|
||||
@ -48,15 +47,6 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
work.POST("remind", serviceCast.Remind)
|
||||
work.POST("publish-info", serviceCast.PublishInfo)
|
||||
work.POST("import-batch", serviceCast.ImportWorkBatch)
|
||||
work.POST("list-published", serviceCast.WorkListPublished)
|
||||
work.POST("update-work-script", serviceCast.UpdateWorkScript)
|
||||
work.POST("publish-log-list", serviceCast.PublishLogList)
|
||||
work.Any("publish-log-list-export", serviceCast.PublishLogListExport)
|
||||
}
|
||||
|
||||
workNoAuth := noAuth.Group("work")
|
||||
{
|
||||
workNoAuth.POST("cron-republish", serviceCast.CronRePublish)
|
||||
}
|
||||
|
||||
script := auth.Group("script")
|
||||
@ -72,8 +62,6 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
task := auth.Group("task")
|
||||
{
|
||||
task.POST("list", serviceCast.TaskList)
|
||||
task.POST("delete", serviceCast.DeleteTasK)
|
||||
task.POST("download", serviceCast.DownloadTaskFile)
|
||||
}
|
||||
|
||||
layout := auth.Group("layout")
|
||||
@ -91,30 +79,16 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
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 生图
|
||||
aiNoAuth := noAuth.Group("ai")
|
||||
{
|
||||
aiNoAuth.POST("image-generate", serviceAI.AIImageGenerate)
|
||||
aiNoAuth.POST("text-generate", serviceAI.AIChat)
|
||||
aiNoAuth.POST("video-vl", serviceAI.AIVideoVL)
|
||||
}
|
||||
aiAuth := auth.Group("ai")
|
||||
{
|
||||
aiAuth.POST("one-text", serviceAI.OneText)
|
||||
aiAuth.POST("more-text", serviceAI.MoreText)
|
||||
aiAuth.POST("generate-report", serviceAI.AICompetitorReport)
|
||||
}
|
||||
|
||||
social := noAuth.Group("social")
|
||||
|
||||
@ -7,17 +7,13 @@ import (
|
||||
"fonchain-fiee/pkg/service/account"
|
||||
"fonchain-fiee/pkg/service/asChat"
|
||||
"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/governance"
|
||||
imports "fonchain-fiee/pkg/service/import"
|
||||
"fonchain-fiee/pkg/service/lang"
|
||||
"fonchain-fiee/pkg/service/members"
|
||||
"fonchain-fiee/pkg/service/pressreleases"
|
||||
"fonchain-fiee/pkg/service/qr"
|
||||
"fonchain-fiee/pkg/service/redirect"
|
||||
"fonchain-fiee/pkg/service/reports"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/service/version"
|
||||
"net/http"
|
||||
@ -57,26 +53,22 @@ func NewRouter() *gin.Engine {
|
||||
ValueAddBundleRouter(privateGroup)
|
||||
TaskBenchRouter(privateGroup) // 新增任务台路由
|
||||
MediaRouter(privateGroup)
|
||||
CustomerContractRouter(privateGroup)
|
||||
AnalysisRouter(privateGroup)
|
||||
SecFilingRouter(privateGroup)
|
||||
app.MediaAppRouter(privateGroup)
|
||||
cronRouter(privateGroup)
|
||||
SupplierRouter(privateGroup)
|
||||
{
|
||||
v1.POST("version", version.Version) //版本号公共
|
||||
}
|
||||
//账号模块
|
||||
{
|
||||
privateGroup.POST("user/register", account.UserRegister) //h5注册登录
|
||||
privateGroup.POST("user/login", account.UserLogin) //后台登录
|
||||
privateGroup.POST("user/send", account.SendMsg) //发送验证码
|
||||
privateGroup.POST("user/send/no-slider", account.SendMsgNoSlider) //发送验证码(不验证滑块)
|
||||
privateGroup.POST("user/logout", account.UserLogout) //登出
|
||||
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
|
||||
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
privateGroup.POST("check/register", account.CheckRegister) //校验是否注册
|
||||
privateGroup.POST("user/register", account.UserRegister) //h5注册登录
|
||||
privateGroup.POST("user/login", account.UserLogin) //后台登录
|
||||
privateGroup.POST("user/send", account.SendMsg) //发送验证码
|
||||
privateGroup.POST("user/logout", account.UserLogout) //登出
|
||||
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
|
||||
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
acRoute := privateGroup.Group("/user")
|
||||
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
@ -84,7 +76,6 @@ func NewRouter() *gin.Engine {
|
||||
acRoute.POST("info", account.UserInfo) //用户详情
|
||||
acRoute.POST("update", account.UserUpdate) //用户更新
|
||||
acRoute.POST("ocr", account.CheckIdOcr) //
|
||||
acRoute.POST("write/off", account.WriteOff) //
|
||||
}
|
||||
webAcRouter := privateGroup.Group("/user")
|
||||
//webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
@ -92,7 +83,6 @@ func NewRouter() *gin.Engine {
|
||||
{
|
||||
webAcRouter.POST("list", account.UserList) //用户列表
|
||||
webAcRouter.POST("approval", account.UserApproval) //实名审核
|
||||
webAcRouter.POST("admin-update", account.AdminUpdate) //更新用户信息
|
||||
webAcRouter.POST("excel/download", account.UserExcelDownload) //excel下载
|
||||
}
|
||||
}
|
||||
@ -187,13 +177,11 @@ func NewRouter() *gin.Engine {
|
||||
governanceRoute := v1.Group("/governance")
|
||||
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("", governance.Create)
|
||||
governanceRouteLogin.POST("/edit", governance.Edit)
|
||||
governanceRouteLogin.POST("/delete", governance.Delete)
|
||||
governanceRouteLogin.POST("/updataStatus", governance.UpdataStatus)
|
||||
governanceRouteLogin.POST("/getGovernanceInfo", governance.GetGovernanceInfo)
|
||||
|
||||
}
|
||||
{
|
||||
@ -203,72 +191,12 @@ func NewRouter() *gin.Engine {
|
||||
|
||||
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
||||
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
||||
pressreleasesRouteLogin.POST("/sortAndStatus", pressreleases.SortAndStatus)
|
||||
pressreleasesRouteLogin.POST("/info", pressreleases.Info)
|
||||
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
||||
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
||||
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
||||
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.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
@ -287,10 +215,6 @@ func NewRouter() *gin.Engine {
|
||||
importRoute.GET("generate/photo/test2", imports.Test2)
|
||||
|
||||
}
|
||||
{
|
||||
//健康检测
|
||||
v1.GET("health", bundle.HealthCheck)
|
||||
}
|
||||
//静态文件
|
||||
r.StaticFS("/api/fiee/static", http.Dir("./runtime"))
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
@ -16,22 +16,28 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
taskBenchRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
// 任务台管理
|
||||
{
|
||||
// 查询待指派任务记录
|
||||
taskBenchRoute.POST("pending-task-list", taskbench.GetPendingTaskList)
|
||||
|
||||
// 待指派任务布局
|
||||
taskBenchRoute.POST("pending-task-layout", taskbench.GetPendingTaskLayout)
|
||||
taskBenchRoute.POST("set-pending-task-layout", taskbench.SetPendingTaskLayout)
|
||||
|
||||
// 指派
|
||||
// 指派某位员工完成某个艺人的任务
|
||||
taskBenchRoute.POST("assign-task", taskbench.AssignTask)
|
||||
|
||||
// 批量指派
|
||||
// 批量指派任务
|
||||
taskBenchRoute.POST("batch-assign-task", taskbench.BatchAssignTask)
|
||||
|
||||
// 中止指派
|
||||
// 中止指派任务(根据任务指派记录UUID)
|
||||
taskBenchRoute.POST("terminate-task-by-uuid", taskbench.TerminateTaskByUUID)
|
||||
|
||||
// 批量中止指派
|
||||
// 批量中止指派任务(根据多个任务指派记录UUID)
|
||||
taskBenchRoute.POST("batch-terminate-task", taskbench.BatchTerminateTask)
|
||||
|
||||
// 修改待发数量
|
||||
taskBenchRoute.POST("update-pending-count", taskbench.UpdatePendingCount)
|
||||
|
||||
// 查询最近被指派记录
|
||||
taskBenchRoute.POST("recent-assign-records", taskbench.GetRecentAssignRecords)
|
||||
|
||||
@ -50,15 +56,18 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
// 员工完成视频脚本(带任务UUID)
|
||||
taskBenchRoute.POST("update-script-with-task-uuid", taskbench.UpdateVideoScriptWithUUID)
|
||||
|
||||
taskBenchRoute.POST("create-analysis-with-task-uuid", taskbench.CreateWorkAnalysisWithTaskUUID)
|
||||
taskBenchRoute.POST("create-report-with-task-uuid", taskbench.CreateCompetitiveReportWithTaskUUID)
|
||||
|
||||
// 根据登录人信息查询被指派给该员工的任务
|
||||
taskBenchRoute.POST("assigned-tasks", taskbench.GetEmployeeAssignedTasks)
|
||||
|
||||
// 员工手动点击完成任务
|
||||
taskBenchRoute.POST("complete-manually", taskbench.CompleteTaskManually)
|
||||
|
||||
// 查询艺人套餐剩余数量
|
||||
taskBenchRoute.POST("artist-bundle-balance", taskbench.GetArtistBundleBalance)
|
||||
|
||||
// 批量查询艺人待上传数量
|
||||
taskBenchRoute.POST("batch-get-pending-upload", taskbench.GetPendingUploadBreakdown)
|
||||
|
||||
// 查询艺人待上传列表
|
||||
taskBenchRoute.POST("pending-upload-list", taskbench.GetArtistUploadStatsList)
|
||||
|
||||
@ -70,9 +79,14 @@ func TaskBenchRouter(r *gin.RouterGroup) {
|
||||
|
||||
// 查询待指派数据
|
||||
taskBenchRoute.POST("pending-data-list", taskbench.GetPendingAssign)
|
||||
|
||||
// 查询指派任务中已完成任务
|
||||
taskBenchRoute.POST("completed-list", taskbench.GetTaskWorkLogListItems)
|
||||
}
|
||||
|
||||
// 员工任务相关路由(需要App登录验证)
|
||||
taskBenchAppRoute := r.Group("task-bench")
|
||||
taskBenchAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
|
||||
{
|
||||
// 员工实际完成任务状态更新
|
||||
taskBenchAppRoute.POST("update-progress", taskbench.UpdateTaskProgress)
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ import (
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain_enterprise/utils/baidu"
|
||||
@ -37,7 +36,7 @@ func UserExcelDownload(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
titleList := []string{
|
||||
"用户编号", "姓名", "性别", "国籍", "手机号", "证件类型", "有效期至", "证件号码", "出生日期", "年龄", "现所在地", "注册时间", "审核时间", "审核状态", "不通过备注", "非大陆手机号", "邮箱",
|
||||
"用户编号", "姓名", "性别", "国籍", "手机号", "证件类型", "有效期至", "证件号码", "出生日期", "年龄", "现所在地", "注册时间", "审核时间", "审核状态", "不通过备注",
|
||||
}
|
||||
var dataList []interface{}
|
||||
|
||||
@ -60,8 +59,6 @@ func UserExcelDownload(c *gin.Context) {
|
||||
i.AuditTime,
|
||||
Status,
|
||||
i.NotPassRemarks,
|
||||
i.AbroadTelAreaCode + i.AbroadTel,
|
||||
i.Email,
|
||||
}
|
||||
dataList = append(dataList, &data)
|
||||
}
|
||||
@ -129,41 +126,10 @@ func UserUpdate(c *gin.Context) {
|
||||
req.ID = user.ID
|
||||
req.Domain = user.Domain
|
||||
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 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,
|
||||
ID: req.ID,
|
||||
Domain: req.Domain,
|
||||
Language: req.Language,
|
||||
NickName: req.NickName,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -191,26 +157,6 @@ func CheckIdOcr(c *gin.Context) {
|
||||
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地址
|
||||
@ -278,40 +224,6 @@ func dd(dateStr string) string {
|
||||
|
||||
}
|
||||
|
||||
func isValidMainlandID(id string) bool {
|
||||
id = strings.TrimSpace(strings.ToUpper(id))
|
||||
if len(id) != 18 {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < 17; i++ {
|
||||
if id[i] < '0' || id[i] > '9' {
|
||||
return false
|
||||
}
|
||||
}
|
||||
last := id[17]
|
||||
if (last < '0' || last > '9') && last != 'X' {
|
||||
return false
|
||||
}
|
||||
|
||||
birthday := id[6:14]
|
||||
birthTime, err := time.Parse("20060102", birthday)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if birthTime.After(time.Now()) {
|
||||
return false
|
||||
}
|
||||
|
||||
weights := []int{7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}
|
||||
checkMap := "10X98765432"
|
||||
sum := 0
|
||||
for i := 0; i < 17; i++ {
|
||||
sum += int(id[i]-'0') * weights[i]
|
||||
}
|
||||
checkCode := checkMap[sum%11]
|
||||
return byte(checkCode) == last
|
||||
}
|
||||
|
||||
// SendMsg 用户发送验证码
|
||||
func SendMsg(c *gin.Context) {
|
||||
var req account.SendMsgRequest
|
||||
@ -329,11 +241,6 @@ func SendMsg(c *gin.Context) {
|
||||
}
|
||||
req.Project = "fiee"
|
||||
req.TelNum = req.Zone + req.TelNum
|
||||
//todo 审核使用账号
|
||||
if req.TelNum == "8618888888888" {
|
||||
service.Success1(c, "发送成功", &account.SendMsgStatusResponse{})
|
||||
return
|
||||
}
|
||||
if req.Zone != e.ZoneCn && req.Zone != "" {
|
||||
// ============================== redis检查ip开始
|
||||
ip := c.ClientIP()
|
||||
@ -378,6 +285,7 @@ func SendMsg(c *gin.Context) {
|
||||
//cache.RedisClient.Incr(daykey)
|
||||
//cache.RedisClient.Incr(minutekey)
|
||||
// ============================== redis检查ip结束
|
||||
|
||||
tempReq := &account.SendNationMsgRequest{
|
||||
Domain: req.Domain,
|
||||
TelNum: req.TelNum,
|
||||
@ -413,54 +321,6 @@ func SendMsg(c *gin.Context) {
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
// 用户发送验证码(不验证滑块)
|
||||
func SendMsgNoSlider(c *gin.Context) {
|
||||
var req account.SendMsgRequest
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
req.Project = "fiee"
|
||||
req.TelNum = req.Zone + req.TelNum
|
||||
//todo 审核使用账号
|
||||
if req.TelNum == "8618888888888" {
|
||||
service.Success1(c, "发送成功", &account.SendMsgStatusResponse{})
|
||||
return
|
||||
}
|
||||
if req.Zone != e.ZoneCn && req.Zone != "" {
|
||||
// ============================== redis检查ip开始
|
||||
ip := c.ClientIP()
|
||||
fmt.Println("当前ip:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
|
||||
tempReq := &account.SendNationMsgRequest{
|
||||
Domain: req.Domain,
|
||||
TelNum: req.TelNum,
|
||||
Project: req.Project,
|
||||
SignNo: req.SignNo,
|
||||
MId: req.MId,
|
||||
Scope: req.Scope,
|
||||
}
|
||||
res, err := service.AccountFieeProvider.SendNationMsg(context.Background(), tempReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
} else {
|
||||
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func RealName(c *gin.Context) {
|
||||
var req account.RealNameRequest
|
||||
|
||||
@ -471,14 +331,12 @@ func RealName(c *gin.Context) {
|
||||
user := login.GetUserInfoFromC(c)
|
||||
req.Id = user.ID
|
||||
if req.DocumentType == 2 {
|
||||
if req.Nationality == "中国大陆" {
|
||||
if !isValidMainlandID(req.IdNumber) {
|
||||
service.Error(c, errors.New("身份证号格式错误"))
|
||||
return
|
||||
}
|
||||
if len(req.IdNumber) != 18 {
|
||||
service.Error(c, errors.New("身份证号格式错误"))
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if strings.TrimSpace(req.IdNumber) == "" {
|
||||
if req.IdNumber == "" {
|
||||
service.Error(c, errors.New("证件号码不能为空"))
|
||||
return
|
||||
}
|
||||
@ -505,8 +363,7 @@ func CheckMsg(c *gin.Context) {
|
||||
req.TelNum = req.Zone + req.TelNum
|
||||
res, err := service.AccountFieeProvider.CheckMsg(context.Background(), &req)
|
||||
if err != nil {
|
||||
fmt.Println("CheckMsg error:", err)
|
||||
service.Error(c, errors.New("验证码错误"))
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
@ -552,31 +409,6 @@ func ValidateCaptcha(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
|
||||
}
|
||||
func CheckRegister(c *gin.Context) {
|
||||
type CheckRegisterRes struct {
|
||||
IsRegister bool `json:"is_register"`
|
||||
}
|
||||
req := account.UserByTelRequest{}
|
||||
req.Domain = "app"
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
data, err := service.AccountFieeProvider.UserByTel(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var res CheckRegisterRes
|
||||
if data.Id == 0 {
|
||||
res.IsRegister = false
|
||||
} else {
|
||||
res.IsRegister = true
|
||||
}
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
func UserLogout(c *gin.Context) {
|
||||
req := account.DecryptJwtRequest{}
|
||||
req.Token = c.GetHeader(e.Authorization)
|
||||
@ -596,16 +428,6 @@ func UserRegister(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req.Domain = "app"
|
||||
if req.InviterCode != "" {
|
||||
codeRes, err := service.AccountFieeProvider.GetInviterInfo(context.Background(), &account.InviterInfoRequest{
|
||||
Code: req.InviterCode,
|
||||
})
|
||||
if err != nil || codeRes.Id == 0 {
|
||||
service.Error(c, errors.New("邀请码错误"))
|
||||
return
|
||||
}
|
||||
req.InviterID = codeRes.Id
|
||||
}
|
||||
res, err := service.AccountFieeProvider.Register(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -621,10 +443,6 @@ func UserRegister(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if tokenInfo.AccountInfo.WriteOff == true {
|
||||
service.Error(c, errors.New("此账号已注销,无法登录"))
|
||||
return
|
||||
}
|
||||
res.Token = tokenInfo.Token
|
||||
service.Success(c, res)
|
||||
return
|
||||
|
||||
@ -1,514 +0,0 @@
|
||||
package ai
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/pkg/common/qwen"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// VideoVLRequest 视频/图片理解请求参数
|
||||
type VideoVLRequest struct {
|
||||
Videos []string `json:"videos"` // 视频URL列表
|
||||
Images []string `json:"images"` // 图片URL列表
|
||||
Text string `json:"text"` // 可选的文本提示
|
||||
Model string `json:"model"` // 可选的模型名称,默认使用 qwen3-vl-plus
|
||||
}
|
||||
|
||||
// AIVideoVL AI理解视频/图片接口
|
||||
func AIVideoVL(ctx *gin.Context) {
|
||||
var req VideoVLRequest
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否至少提供了视频或图片
|
||||
if len(req.Videos) == 0 && len(req.Images) == 0 {
|
||||
service.Error(ctx, errors.New("至少需要提供一个视频或图片"))
|
||||
return
|
||||
}
|
||||
|
||||
if len(req.Videos) > 1 {
|
||||
service.Error(ctx, errors.New("当前只能选一个视频"))
|
||||
return
|
||||
}
|
||||
|
||||
Prompt := "请你详细描述视频和图片中的内容分别是什么,包括画面内容、人物动作、场景等。如果有配乐或背景音乐,请详细描述配乐的节奏、风格和情感特点"
|
||||
|
||||
// 调用VL函数进行AI理解
|
||||
result, err := qwen.VL(req.Videos, req.Images, Prompt, req.Model)
|
||||
if err != nil {
|
||||
// 检查是否是文件下载超时错误(内容过大)
|
||||
errMsg := err.Error()
|
||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||
} else {
|
||||
service.Error(ctx, errors.New("ai分析帖子内容失败"))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 返回AI返回的数据
|
||||
service.Success(ctx, result)
|
||||
}
|
||||
|
||||
// contains 检查字符串是否包含子字符串(不区分大小写)
|
||||
func contains(s, substr string) bool {
|
||||
return strings.Contains(strings.ToLower(s), strings.ToLower(substr))
|
||||
}
|
||||
|
||||
// CompetitorReportRequest 竞品报告请求参数
|
||||
type CompetitorReportRequest struct {
|
||||
Videos []string `json:"videos"` // 视频URL列表
|
||||
Images []string `json:"images"` // 图片URL列表
|
||||
TextPrompt string `json:"textPrompt"` // 竞品报告要求文本
|
||||
ImagePrompt string `json:"imagePrompt"` // 图片URL
|
||||
Model string `json:"model"` // 可选的模型名称,默认使用 qwen3-vl-plus
|
||||
}
|
||||
|
||||
// CompetitorReportData 竞品报告数据(用于返回给前端)
|
||||
type CompetitorReportData struct {
|
||||
HighlightAnalysis HighlightAnalysisData `json:"highlight_analysis"`
|
||||
DataPerformance DataPerformanceData `json:"data_performance_analysis"`
|
||||
OverallSummary string `json:"overall_summary_and_optimization"`
|
||||
}
|
||||
|
||||
type HighlightAnalysisData struct {
|
||||
Summary string `json:"summary"`
|
||||
Points PointsData `json:"points"`
|
||||
}
|
||||
|
||||
type PointsData struct {
|
||||
Theme string `json:"theme"`
|
||||
Narrative string `json:"narrative"`
|
||||
Content string `json:"content"`
|
||||
Copywriting string `json:"copywriting"`
|
||||
Data string `json:"data"`
|
||||
Music string `json:"music,omitempty"`
|
||||
}
|
||||
|
||||
type DataPerformanceData struct {
|
||||
Views string `json:"views"`
|
||||
Completion string `json:"completion_rate,omitempty"`
|
||||
Engagement string `json:"engagement"`
|
||||
}
|
||||
|
||||
// CompetitorReportResponse 竞品报告响应数据
|
||||
type CompetitorReportResponse struct {
|
||||
ImageURL string `json:"image_url,omitempty"` // 生成的图片URL(1024*1024),非必须返回
|
||||
Text string `json:"text,omitempty"` // 竞品报告文本内容,非必须返回
|
||||
JsonData *CompetitorReportData `json:"json_data,omitempty"` // 竞品报告JSON数据
|
||||
}
|
||||
|
||||
// CompetitorReportJSON AI返回的JSON结构
|
||||
type CompetitorReportJSON struct {
|
||||
HighlightAnalysis HighlightAnalysis `json:"highlight_analysis"`
|
||||
DataPerformance DataPerformance `json:"data_performance_analysis"`
|
||||
OverallSummary string `json:"overall_summary_and_optimization"`
|
||||
}
|
||||
|
||||
type HighlightAnalysis struct {
|
||||
Summary string `json:"summary"`
|
||||
Points Points `json:"points"`
|
||||
}
|
||||
|
||||
type Points struct {
|
||||
Theme string `json:"theme"`
|
||||
Narrative string `json:"narrative"`
|
||||
Content string `json:"content"`
|
||||
Copywriting string `json:"copywriting"`
|
||||
Data string `json:"data"`
|
||||
Music string `json:"music,omitempty"`
|
||||
}
|
||||
|
||||
type DataPerformance struct {
|
||||
Views string `json:"views"`
|
||||
Completion string `json:"completion_rate,omitempty"`
|
||||
Engagement string `json:"engagement"`
|
||||
}
|
||||
|
||||
// convertJSONToText 将 JSON 转换为纯文本格式
|
||||
func convertJSONToText(data CompetitorReportJSON, isVideo bool) string {
|
||||
var sb strings.Builder
|
||||
|
||||
// 一、亮点表现分析
|
||||
sb.WriteString("一、亮点表现分析\n")
|
||||
sb.WriteString(data.HighlightAnalysis.Summary)
|
||||
sb.WriteString("\n\n")
|
||||
|
||||
sb.WriteString("1. 标题亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Theme)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("2. 题材亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Narrative)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("3. 内容亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Content)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("4. 文案亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Copywriting)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("5. 数据亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Data)
|
||||
sb.WriteString("\n")
|
||||
|
||||
if isVideo && data.HighlightAnalysis.Points.Music != "" {
|
||||
sb.WriteString("6. 配乐亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Music)
|
||||
sb.WriteString("\n")
|
||||
}
|
||||
|
||||
// 二、数据表现分析
|
||||
sb.WriteString("\n二、数据表现分析\n")
|
||||
sb.WriteString("1. 浏览量表现:")
|
||||
sb.WriteString(data.DataPerformance.Views)
|
||||
sb.WriteString("\n")
|
||||
|
||||
if isVideo && data.DataPerformance.Completion != "" {
|
||||
sb.WriteString("2. 完播率表现:")
|
||||
sb.WriteString(data.DataPerformance.Completion)
|
||||
sb.WriteString("\n")
|
||||
sb.WriteString("3. 点赞/分享/评论表现:")
|
||||
} else {
|
||||
sb.WriteString("2. 点赞/分享/评论表现:")
|
||||
}
|
||||
sb.WriteString(data.DataPerformance.Engagement)
|
||||
sb.WriteString("\n")
|
||||
|
||||
// 三、整体总结及可优化建议
|
||||
sb.WriteString("\n三、整体总结及可优化建议\n")
|
||||
sb.WriteString(data.OverallSummary)
|
||||
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// convertJSONToTextFromData 将 JSON 转换为纯文本格式(使用新的 CompetitorReportData 结构)
|
||||
func convertJSONToTextFromData(data CompetitorReportData, isVideo bool) string {
|
||||
var sb strings.Builder
|
||||
|
||||
// 一、亮点表现分析
|
||||
sb.WriteString("一、亮点表现分析\n")
|
||||
sb.WriteString(data.HighlightAnalysis.Summary)
|
||||
sb.WriteString("\n\n")
|
||||
|
||||
sb.WriteString("1. 标题亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Theme)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("2. 题材亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Narrative)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("3. 内容亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Content)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("4. 文案亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Copywriting)
|
||||
sb.WriteString("\n")
|
||||
|
||||
sb.WriteString("5. 数据亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Data)
|
||||
sb.WriteString("\n")
|
||||
|
||||
if isVideo && data.HighlightAnalysis.Points.Music != "" {
|
||||
sb.WriteString("6. 配乐亮点:")
|
||||
sb.WriteString(data.HighlightAnalysis.Points.Music)
|
||||
sb.WriteString("\n")
|
||||
}
|
||||
|
||||
// 二、数据表现分析
|
||||
sb.WriteString("\n二、数据表现分析\n")
|
||||
sb.WriteString("1. 浏览量表现:")
|
||||
sb.WriteString(data.DataPerformance.Views)
|
||||
sb.WriteString("\n")
|
||||
|
||||
if isVideo && data.DataPerformance.Completion != "" {
|
||||
sb.WriteString("2. 完播率表现:")
|
||||
sb.WriteString(data.DataPerformance.Completion)
|
||||
sb.WriteString("\n")
|
||||
sb.WriteString("3. 点赞/分享/评论表现:")
|
||||
} else {
|
||||
sb.WriteString("2. 点赞/分享/评论表现:")
|
||||
}
|
||||
sb.WriteString(data.DataPerformance.Engagement)
|
||||
sb.WriteString("\n")
|
||||
|
||||
// 三、整体总结及可优化建议
|
||||
sb.WriteString("\n三、整体总结及可优化建议\n")
|
||||
sb.WriteString(data.OverallSummary)
|
||||
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// AICompetitorReport 生成竞品报告接口
|
||||
func AICompetitorReport(ctx *gin.Context) {
|
||||
var req CompetitorReportRequest
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
|
||||
if req.TextPrompt == "" && req.ImagePrompt == "" {
|
||||
service.Error(ctx, errors.New("文本和图片提示词不能同时为空"))
|
||||
return
|
||||
}
|
||||
|
||||
// 检查是否至少提供了视频或图片
|
||||
if len(req.Videos) == 0 && len(req.Images) == 0 {
|
||||
service.Error(ctx, errors.New("至少需要提供一个视频或图片"))
|
||||
return
|
||||
}
|
||||
|
||||
if len(req.Videos) > 1 {
|
||||
service.Error(ctx, errors.New("当前只能选一个视频"))
|
||||
return
|
||||
}
|
||||
|
||||
// 第一步:调用AI理解视频/图片内容
|
||||
vlPrompt := "请你详细描述这些视频或者这些图片中的内容分别是什么,请详细描述,不要遗漏任何细节。如果有配乐或背景音乐,请详细描述配乐的节奏、风格和情感特点"
|
||||
vlResult, err := qwen.VL(req.Videos, req.Images, vlPrompt, req.Model)
|
||||
if err != nil {
|
||||
// 检查是否是文件下载超时错误(内容过大)
|
||||
errMsg := err.Error()
|
||||
if contains(errMsg, "Download multimodal file timed out") || contains(errMsg, "timed out") {
|
||||
service.Error(ctx, errors.New("内容过大,请重新选择"))
|
||||
} else {
|
||||
service.Error(ctx, fmt.Errorf("AI理解视频图片失败: %v", err))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取理解后的内容
|
||||
if len(vlResult.Choices) == 0 {
|
||||
service.Error(ctx, errors.New("AI理解返回结果为空"))
|
||||
return
|
||||
}
|
||||
vlContent := vlResult.Choices[0].Message.Content
|
||||
|
||||
// 定义协程结果结构
|
||||
type textResult struct {
|
||||
text string
|
||||
err error
|
||||
}
|
||||
|
||||
type imageResult struct {
|
||||
imageURL string
|
||||
err error
|
||||
}
|
||||
|
||||
// 根据 TextPrompt 和 ImagePrompt 是否为空决定启动哪些协程
|
||||
needText := req.TextPrompt != ""
|
||||
needImage := req.ImagePrompt != ""
|
||||
|
||||
var textChan chan textResult
|
||||
var imageChan chan imageResult
|
||||
|
||||
// 如果需要生成文本,启动文本生成协程
|
||||
if needText {
|
||||
textChan = make(chan textResult, 1)
|
||||
go func() {
|
||||
// 根据是否有视频来判断作品类型
|
||||
isVideo := len(req.Videos) > 0
|
||||
|
||||
// 构建文本生成提示词:理解内容 + 用户要求(JSON格式)
|
||||
// 重要:必须明确要求使用英文标点符号,确保返回的JSON符合规范
|
||||
// 重要:必须基于内容给出分析性回复,即使没有提供具体数据
|
||||
var textPrompt string
|
||||
if isVideo {
|
||||
textPrompt = fmt.Sprintf(`你必须严格输出以下JSON格式,不要输出任何其他内容。输出必须以 { 开头并以 } 结束。
|
||||
重要提示:
|
||||
1. 所有字符串值必须使用英文标点符号,包括英文逗号, 英文句号. 英文冒号: 英文引号" 等。禁止使用中文标点符号。
|
||||
2. 即使没有提供具体数据,也要基于视频和图片内容给出分析性回复。禁止回复"未提供数据"、"暂无数据"等类似内容,而应该根据内容分析数据表现(如根据时长分析完播率潜力、根据内容质量分析互动潜力等)。
|
||||
3. 配乐亮点(music字段):禁止回复"未提供配乐信息"、"没有配乐信息"等类似内容。即使没有识别到配乐,也要根据视频整体风格和内容特点编写合理的配乐分析(如:根据视频风格推断适合的配乐类型、根据内容节奏分析配乐潜力等)。
|
||||
|
||||
基于以下视频和图片的内容描述:
|
||||
%s
|
||||
|
||||
用户要求(仅作为内容参考,不会改变JSON结构):
|
||||
%s
|
||||
|
||||
JSON结构是固定的,请将内容填充到对应的value中,禁止修改key,禁止添加额外字段,禁止输出任何说明文字:
|
||||
{"highlight_analysis":{"summary":"[78字以内的概述]","points":{"theme":"[标题亮点,最多60字]","narrative":"[题材亮点,最多60字]","content":"[内容亮点,最多60字]","copywriting":"[文案亮点,最多60字]","data":"[数据亮点,最多60字]","music":"[配乐亮点,仅视频,最多60字]"}},"data_performance_analysis":{"views":"[浏览量表现,最多60字]","completion_rate":"[完播率表现,仅视频,最多60字]","engagement":"[点赞/分享/评论表现,最多60字]"},"overall_summary_and_optimization":"[整体总结及可优化建议,最多300字]"}`, vlContent, req.TextPrompt)
|
||||
} else {
|
||||
textPrompt = fmt.Sprintf(`你必须严格输出以下JSON格式,不要输出任何其他内容。输出开头并以 }必须以 { 结束。
|
||||
重要提示:
|
||||
1. 所有字符串值必须使用英文标点符号,包括英文逗号, 英文句号. 英文冒号: 英文引号" 等。禁止使用中文标点符号。
|
||||
2. 即使没有提供具体数据,也要基于视频和图片内容给出分析性回复。禁止回复"未提供数据"、"暂无数据"等类似内容,而应该根据内容分析数据表现(如根据内容质量分析互动潜力等)。
|
||||
|
||||
基于以下视频和图片的内容描述:
|
||||
%s
|
||||
|
||||
用户要求(仅作为内容参考,不会改变JSON结构):
|
||||
%s
|
||||
|
||||
JSON结构是固定的,请将内容填充到对应的value中,禁止修改key,禁止添加额外字段,禁止输出任何说明文字:
|
||||
{"highlight_analysis":{"summary":"[100字以内的概述]","points":{"theme":"[标题亮点,最多60字]","narrative":"[题材亮点,最多60字]","content":"[内容亮点,最多60字]","copywriting":"[文案亮点,最多60字]","data":"[数据亮点,最多60字]"}},"data_performance_analysis":{"views":"[浏览量表现,最多60字]","engagement":"[点赞/分享/评论表现,最多60字]"},"overall_summary_and_optimization":"[整体总结及可优化建议,最多300字]"}`, vlContent, req.TextPrompt)
|
||||
}
|
||||
|
||||
chatReq, err := buildChatRequest(textPrompt, nil)
|
||||
if err != nil {
|
||||
textChan <- textResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
chatResp, err := qwen.Chat(*chatReq)
|
||||
if err != nil {
|
||||
textChan <- textResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if len(chatResp.Choices) == 0 {
|
||||
textChan <- textResult{err: errors.New("文本生成返回结果为空")}
|
||||
return
|
||||
}
|
||||
|
||||
// 打印 AI 返回的原始内容(用于调试)
|
||||
aiText := chatResp.Choices[0].Message.Content
|
||||
fmt.Println("========== AI 返回的原始内容 ==========")
|
||||
fmt.Println(aiText)
|
||||
fmt.Println("=========================================")
|
||||
|
||||
textChan <- textResult{text: aiText}
|
||||
}()
|
||||
}
|
||||
|
||||
// 如果需要生成图片,启动图片生成协程
|
||||
if needImage {
|
||||
imageChan = make(chan imageResult, 1)
|
||||
go func() {
|
||||
// 先请求聊天获取图片提示词
|
||||
imagePromptText := fmt.Sprintf("基于以下视频和图片的内容描述:\n%s\n\n请根据以下要求生成竞品报告图片的提示词:\n%s\n\n重要提示:生成的图片内容中不要包含任何文字,仅仅是根据内容生成一张配图即可", vlContent, req.ImagePrompt)
|
||||
|
||||
chatReq, err := buildChatRequest(imagePromptText, nil)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
chatResp, err := qwen.Chat(*chatReq)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if len(chatResp.Choices) == 0 {
|
||||
imageChan <- imageResult{err: errors.New("图片提示词生成返回结果为空")}
|
||||
return
|
||||
}
|
||||
|
||||
imagePrompt := chatResp.Choices[0].Message.Content
|
||||
|
||||
// 生成图片(1024*1024),基于理解后的内容使用文生图
|
||||
size := "1024*1024"
|
||||
resultTask, err := qwen.GenerateTextImage(imagePrompt, size)
|
||||
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if resultTask.Code != "" {
|
||||
imageChan <- imageResult{err: errors.New("文生图失败: " + resultTask.Message)}
|
||||
return
|
||||
}
|
||||
|
||||
// 等待图片生成完成
|
||||
result, err := qwen.ImgTaskResult(resultTask.Output.TaskID)
|
||||
if err != nil {
|
||||
imageChan <- imageResult{err: err}
|
||||
return
|
||||
}
|
||||
|
||||
if result == nil || len(result.Output.Results) == 0 {
|
||||
imageChan <- imageResult{err: errors.New("图片生成失败")}
|
||||
return
|
||||
}
|
||||
|
||||
// 返回第一张图片的URL
|
||||
imageChan <- imageResult{imageURL: result.Output.Results[0].URL}
|
||||
}()
|
||||
}
|
||||
|
||||
// 等待所有启动的协程完成
|
||||
var textRes textResult
|
||||
var imageRes imageResult
|
||||
|
||||
// 根据实际启动的协程数量等待结果
|
||||
if needText && needImage {
|
||||
// 两个协程都启动了,使用循环等待两个都完成
|
||||
completed := 0
|
||||
for completed < 2 {
|
||||
select {
|
||||
case textRes = <-textChan:
|
||||
completed++
|
||||
case imageRes = <-imageChan:
|
||||
completed++
|
||||
}
|
||||
}
|
||||
} else if needText {
|
||||
// 只启动文本生成协程
|
||||
textRes = <-textChan
|
||||
} else if needImage {
|
||||
// 只启动图片生成协程
|
||||
imageRes = <-imageChan
|
||||
}
|
||||
|
||||
// 处理文本结果(如果生成了文本)
|
||||
if needText {
|
||||
if textRes.err != nil {
|
||||
service.Error(ctx, fmt.Errorf("生成竞品报告文本失败: %v", textRes.err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 处理图片结果(如果生成了图片)
|
||||
if needImage {
|
||||
if imageRes.err != nil {
|
||||
service.Error(ctx, fmt.Errorf("生成竞品报告图片失败: %v", imageRes.err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 返回结果(只返回实际生成的内容)
|
||||
result := CompetitorReportResponse{}
|
||||
if needText {
|
||||
// 将 JSON 解析为结构化数据
|
||||
fmt.Println("========== 开始解析 JSON ==========")
|
||||
fmt.Println("原始内容是否以 { 开头:", strings.HasPrefix(strings.TrimSpace(textRes.text), "{"))
|
||||
fmt.Println("原始内容前100字符:", strings.TrimSpace(textRes.text)[:min(100, len(strings.TrimSpace(textRes.text)))])
|
||||
|
||||
var jsonData CompetitorReportData
|
||||
if err := json.Unmarshal([]byte(textRes.text), &jsonData); err != nil {
|
||||
// 如果解析失败,直接报错
|
||||
fmt.Println("========== JSON 解析失败 ==========")
|
||||
fmt.Println("解析错误:", err)
|
||||
fmt.Println("===================================")
|
||||
service.Error(ctx, errors.New("AI生成格式错误,请重试"))
|
||||
return
|
||||
} else {
|
||||
fmt.Println("========== JSON 解析成功 ==========")
|
||||
fmt.Println("Summary:", jsonData.HighlightAnalysis.Summary)
|
||||
fmt.Println("==================================")
|
||||
|
||||
// 赋值结构体到 JsonData 中
|
||||
result.JsonData = &jsonData
|
||||
|
||||
result.Text = convertJSONToTextFromData(jsonData, len(req.Videos) > 0)
|
||||
}
|
||||
}
|
||||
if needImage {
|
||||
result.ImageURL = imageRes.imageURL
|
||||
}
|
||||
|
||||
service.Success(ctx, result)
|
||||
}
|
||||
@ -1,13 +1,11 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -18,11 +16,9 @@ func UserAccounts(ctx *gin.Context) {
|
||||
userInfo := login.GetUserInfoFromC(ctx)
|
||||
req.ArtistUuid = fmt.Sprint(userInfo.ID)
|
||||
} else {
|
||||
req.ArtistUuid = "1234"
|
||||
req.ArtistUuid = "61"
|
||||
}
|
||||
go func() {
|
||||
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo", ArtistUuid: req.ArtistUuid})
|
||||
}()
|
||||
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
|
||||
@ -1,387 +0,0 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/xuri/excelize/v2"
|
||||
)
|
||||
|
||||
// 创建发票
|
||||
func CreateBundleInvoice(c *gin.Context) {
|
||||
var req bundle.CreateInvoiceReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.CreateInvoice(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 创建纸质发票地址
|
||||
func CreatePaperInvoiceAddress(c *gin.Context) {
|
||||
var req bundle.CreatePaperInvoiceAddressReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.UserId = strconv.FormatInt(int64(userInfo.ID), 10)
|
||||
req.ApplyTime = time.Now().Format("2006-01-02 15:04:05")
|
||||
res, err := service.BundleProvider.CreatePaperInvoiceAddress(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 获取发票列表
|
||||
func GetBundleInvoiceList(c *gin.Context) {
|
||||
var req bundle.GetInvoiceListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetInvoiceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
func GetUserInfo(c *gin.Context) {
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
service.Success(c, userInfo)
|
||||
}
|
||||
|
||||
// 获取纸质发票地址列表
|
||||
func GetInvoiceExpressInfo(c *gin.Context) {
|
||||
var req bundle.GetInvoiceExpressInfoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetInvoiceExpressInfo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// 更新纸质发票地址
|
||||
func UpdateInvoiceExpressInfo(c *gin.Context) {
|
||||
var req bundle.UpdateInvoiceExpressInfoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.UpdateInvoiceExpressInfo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
// H5获取用户的发票列表
|
||||
func GetInvoiceList(c *gin.Context) {
|
||||
var req bundle.GetInvoiceInfoByOrderNoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
req.UserId = strconv.FormatInt(int64(userInfo.ID), 10)
|
||||
res, err := service.BundleProvider.GetInvoiceInfoByOrderNo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func ExportInvoice(c *gin.Context) {
|
||||
var req bundle.GetInvoiceListReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
exportFileName := "FIEE订单发票列表_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
|
||||
|
||||
res, err := service.BundleProvider.GetInvoiceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.ExportInvoiceFailed))
|
||||
return
|
||||
}
|
||||
fmt.Println("开始写入Excel:", filePath)
|
||||
if err := writeToExcelInvoiceInfo(filePath, res.Data); err != nil {
|
||||
fmt.Println("写入Excel失败:", err)
|
||||
service.Error(c, errors.New(common.ExportInvoiceFailed))
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if c.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, c.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(c, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
func writeToExcelInvoiceInfo(filePath string, data []*bundle.InvoiceInfo) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"是否申请纸质发票", "是否寄出", "姓名", "手机号", "国家",
|
||||
"详细地址", "申请时间", "操作艺人", "艺人编号",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range data {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
isApplyPaperInvoice := ""
|
||||
isExpress := ""
|
||||
if it.PaperInvocieStatus == 1 {
|
||||
isApplyPaperInvoice = "未申请"
|
||||
isExpress = "未寄出"
|
||||
} else if it.PaperInvocieStatus == 2 {
|
||||
isApplyPaperInvoice = "已申请"
|
||||
isExpress = "未寄出"
|
||||
} else if it.PaperInvocieStatus == 3 {
|
||||
isApplyPaperInvoice = "已申请"
|
||||
isExpress = "已寄出"
|
||||
}
|
||||
|
||||
_ = write(1, isApplyPaperInvoice)
|
||||
_ = write(2, isExpress)
|
||||
_ = write(3, it.Name)
|
||||
_ = write(4, it.Phone)
|
||||
_ = write(5, it.Country)
|
||||
_ = write(6, it.Address)
|
||||
_ = write(7, formatApplyTime(it.ApplyTime))
|
||||
_ = write(8, it.UserName)
|
||||
_ = write(9, it.UserNum)
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filePath); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取国家列表
|
||||
func GetCountryList(c *gin.Context) {
|
||||
list := getCountryList()
|
||||
service.Success(c, map[string]interface{}{"data": list})
|
||||
}
|
||||
|
||||
func getCountryList() []struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
} {
|
||||
return []struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}{
|
||||
{Code: "CN", Name: "中国"},
|
||||
{Code: "JP", Name: "日本"},
|
||||
{Code: "US", Name: "美国"},
|
||||
{Code: "HK", Name: "中国香港"},
|
||||
{Code: "MO", Name: "中国澳门"},
|
||||
{Code: "TW", Name: "中国台湾"},
|
||||
{Code: "GB", Name: "英国"},
|
||||
{Code: "KR", Name: "韩国"},
|
||||
{Code: "SG", Name: "新加坡"},
|
||||
{Code: "DE", Name: "德国"},
|
||||
{Code: "FR", Name: "法国"},
|
||||
{Code: "AU", Name: "澳大利亚"},
|
||||
{Code: "CA", Name: "加拿大"},
|
||||
{Code: "IT", Name: "意大利"},
|
||||
{Code: "ES", Name: "西班牙"},
|
||||
{Code: "NL", Name: "荷兰"},
|
||||
{Code: "BE", Name: "比利时"},
|
||||
{Code: "CH", Name: "瑞士"},
|
||||
{Code: "AT", Name: "奥地利"},
|
||||
{Code: "SE", Name: "瑞典"},
|
||||
{Code: "NO", Name: "挪威"},
|
||||
{Code: "DK", Name: "丹麦"},
|
||||
{Code: "FI", Name: "芬兰"},
|
||||
{Code: "IE", Name: "爱尔兰"},
|
||||
{Code: "PT", Name: "葡萄牙"},
|
||||
{Code: "GR", Name: "希腊"},
|
||||
{Code: "PL", Name: "波兰"},
|
||||
{Code: "CZ", Name: "捷克"},
|
||||
{Code: "HU", Name: "匈牙利"},
|
||||
{Code: "RO", Name: "罗马尼亚"},
|
||||
{Code: "RU", Name: "俄罗斯"},
|
||||
{Code: "UA", Name: "乌克兰"},
|
||||
{Code: "TR", Name: "土耳其"},
|
||||
{Code: "IL", Name: "以色列"},
|
||||
{Code: "AE", Name: "阿联酋"},
|
||||
{Code: "SA", Name: "沙特阿拉伯"},
|
||||
{Code: "IN", Name: "印度"},
|
||||
{Code: "MY", Name: "马来西亚"},
|
||||
{Code: "TH", Name: "泰国"},
|
||||
{Code: "VN", Name: "越南"},
|
||||
{Code: "PH", Name: "菲律宾"},
|
||||
{Code: "ID", Name: "印度尼西亚"},
|
||||
{Code: "NZ", Name: "新西兰"},
|
||||
{Code: "ZA", Name: "南非"},
|
||||
{Code: "EG", Name: "埃及"},
|
||||
{Code: "NG", Name: "尼日利亚"},
|
||||
{Code: "KE", Name: "肯尼亚"},
|
||||
{Code: "AR", Name: "阿根廷"},
|
||||
{Code: "BR", Name: "巴西"},
|
||||
{Code: "MX", Name: "墨西哥"},
|
||||
{Code: "CL", Name: "智利"},
|
||||
{Code: "CO", Name: "哥伦比亚"},
|
||||
{Code: "PE", Name: "秘鲁"},
|
||||
{Code: "LU", Name: "卢森堡"},
|
||||
{Code: "SK", Name: "斯洛伐克"},
|
||||
{Code: "BG", Name: "保加利亚"},
|
||||
{Code: "HR", Name: "克罗地亚"},
|
||||
{Code: "SI", Name: "斯洛文尼亚"},
|
||||
{Code: "LT", Name: "立陶宛"},
|
||||
{Code: "LV", Name: "拉脱维亚"},
|
||||
{Code: "EE", Name: "爱沙尼亚"},
|
||||
{Code: "RS", Name: "塞尔维亚"},
|
||||
{Code: "PK", Name: "巴基斯坦"},
|
||||
{Code: "BD", Name: "孟加拉国"},
|
||||
{Code: "LK", Name: "斯里兰卡"},
|
||||
{Code: "QA", Name: "卡塔尔"},
|
||||
{Code: "KW", Name: "科威特"},
|
||||
{Code: "BH", Name: "巴林"},
|
||||
{Code: "OM", Name: "阿曼"},
|
||||
{Code: "JO", Name: "约旦"},
|
||||
{Code: "LB", Name: "黎巴嫩"},
|
||||
{Code: "IR", Name: "伊朗"},
|
||||
{Code: "IQ", Name: "伊拉克"},
|
||||
{Code: "KZ", Name: "哈萨克斯坦"},
|
||||
{Code: "UZ", Name: "乌兹别克斯坦"},
|
||||
{Code: "GE", Name: "格鲁吉亚"},
|
||||
{Code: "AZ", Name: "阿塞拜疆"},
|
||||
{Code: "AM", Name: "亚美尼亚"},
|
||||
{Code: "MN", Name: "蒙古"},
|
||||
{Code: "MM", Name: "缅甸"},
|
||||
{Code: "KH", Name: "柬埔寨"},
|
||||
{Code: "LA", Name: "老挝"},
|
||||
{Code: "BN", Name: "文莱"},
|
||||
{Code: "NP", Name: "尼泊尔"},
|
||||
{Code: "AF", Name: "阿富汗"},
|
||||
{Code: "ET", Name: "埃塞俄比亚"},
|
||||
{Code: "GH", Name: "加纳"},
|
||||
{Code: "TZ", Name: "坦桑尼亚"},
|
||||
{Code: "UG", Name: "乌干达"},
|
||||
{Code: "MA", Name: "摩洛哥"},
|
||||
{Code: "TN", Name: "突尼斯"},
|
||||
{Code: "AL", Name: "阿尔巴尼亚"},
|
||||
{Code: "MK", Name: "北马其顿"},
|
||||
{Code: "BA", Name: "波黑"},
|
||||
{Code: "ME", Name: "黑山"},
|
||||
{Code: "CY", Name: "塞浦路斯"},
|
||||
{Code: "MT", Name: "马耳他"},
|
||||
{Code: "IS", Name: "冰岛"},
|
||||
{Code: "EC", Name: "厄瓜多尔"},
|
||||
{Code: "VE", Name: "委内瑞拉"},
|
||||
{Code: "CR", Name: "哥斯达黎加"},
|
||||
{Code: "PA", Name: "巴拿马"},
|
||||
{Code: "GT", Name: "危地马拉"},
|
||||
{Code: "CU", Name: "古巴"},
|
||||
{Code: "DO", Name: "多米尼加"},
|
||||
{Code: "JM", Name: "牙买加"},
|
||||
{Code: "PR", Name: "波多黎各"},
|
||||
{Code: "UY", Name: "乌拉圭"},
|
||||
{Code: "BO", Name: "玻利维亚"},
|
||||
{Code: "PY", Name: "巴拉圭"},
|
||||
{Code: "SV", Name: "萨尔瓦多"},
|
||||
{Code: "HN", Name: "洪都拉斯"},
|
||||
{Code: "NI", Name: "尼加拉瓜"},
|
||||
{Code: "TT", Name: "特立尼达和多巴哥"},
|
||||
{Code: "BS", Name: "巴哈马"},
|
||||
{Code: "BB", Name: "巴巴多斯"},
|
||||
{Code: "GY", Name: "圭亚那"},
|
||||
{Code: "SR", Name: "苏里南"},
|
||||
{Code: "BW", Name: "博茨瓦纳"},
|
||||
{Code: "ZW", Name: "津巴布韦"},
|
||||
{Code: "MZ", Name: "莫桑比克"},
|
||||
{Code: "AO", Name: "安哥拉"},
|
||||
{Code: "CM", Name: "喀麦隆"},
|
||||
{Code: "CI", Name: "科特迪瓦"},
|
||||
{Code: "SN", Name: "塞内加尔"},
|
||||
{Code: "LY", Name: "利比亚"},
|
||||
{Code: "SD", Name: "苏丹"},
|
||||
{Code: "DZ", Name: "阿尔及利亚"},
|
||||
{Code: "BY", Name: "白俄罗斯"},
|
||||
{Code: "MD", Name: "摩尔多瓦"},
|
||||
}
|
||||
}
|
||||
|
||||
// 时间格式化函数
|
||||
func formatApplyTime(s string) string {
|
||||
if s == "" {
|
||||
return s
|
||||
}
|
||||
beijing, err := time.LoadLocation("Asia/Shanghai")
|
||||
if err != nil {
|
||||
return s
|
||||
}
|
||||
layouts := []string{
|
||||
time.RFC3339, // 2026-02-03T23:01:29+08:00
|
||||
"2006-01-02 15:04:05",
|
||||
"2006-01-02T15:04:05Z07:00",
|
||||
}
|
||||
for _, layout := range layouts {
|
||||
if t, err := time.Parse(layout, s); err == nil {
|
||||
return t.In(beijing).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
@ -197,37 +197,6 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
service.Error(c, errors.New(common.GetWorkDetailFailed))
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
service.Error(c, errors.New("套餐已过期"))
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
//判断作品对应订单是否相同
|
||||
if wordInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
//订单号不相同
|
||||
//新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
service.Error(c, errors.New("套餐为新套餐,确认失败"))
|
||||
return
|
||||
}
|
||||
//相同着正常走流程
|
||||
}
|
||||
|
||||
if wordInfoRes.WorkStatus != 4 {
|
||||
service.Error(c, errors.New("作品不是待确认状态"))
|
||||
return
|
||||
@ -240,13 +209,6 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
case 1:
|
||||
{
|
||||
if balanceInfoRes.ImageExtendConsumptionNumber >= balanceInfoRes.ImageExtendNumber { // 图文余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
service.Error(c, errors.New("图文余量不足"))
|
||||
return
|
||||
}
|
||||
@ -255,13 +217,6 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
||||
case 2:
|
||||
{
|
||||
if balanceInfoRes.VideoExtendConsumptionNumber >= balanceInfoRes.VideoExtendNumber { // 视频余量不足
|
||||
_, err = service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
WorkUuid: req.WorkUuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
ConfirmFailType: cast.ConfirmFailENUM_ConfirmFailENUM_EXPIRED,
|
||||
})
|
||||
service.Error(c, errors.New("视频余量不足"))
|
||||
return
|
||||
}
|
||||
@ -308,7 +263,7 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
fmt.Println("res:", res)
|
||||
fmt.Println("err:", err)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("驳回失败"))
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
@ -330,56 +285,10 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
service.Error(c, errors.New(common.GetWorkDetailFailed))
|
||||
return
|
||||
}
|
||||
if analysisInfoRes == nil {
|
||||
service.Error(c, errors.New("数据分析不存在"))
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
// 套餐过期的话直接失败
|
||||
_, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: req.Uuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("套餐已过期"))
|
||||
return
|
||||
}
|
||||
|
||||
if analysisInfoRes.WorkAnalysisStatus != 4 {
|
||||
service.Error(c, errors.New("数据分析不是待确认状态"))
|
||||
return
|
||||
}
|
||||
artistID, _ := strconv.ParseUint(analysisInfoRes.ArtistID, 10, 64)
|
||||
if artistID != uint64(userInfo.ID) {
|
||||
service.Error(c, errors.New("非本人数据分析,无法操作"))
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
// 判断数据分析对应订单是否相同
|
||||
if analysisInfoRes.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
// 订单号不同
|
||||
// 说明是新购买的,直接扣除失败
|
||||
_, err := service.CastProvider.UpdateWorkAnalysisStatus(c, &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: req.Uuid,
|
||||
ConfirmRemark: req.ConfirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
service.Error(c, errors.New("套餐为新套餐,确认失败"))
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var addBalanceReq bundle.AddBundleBalanceReq
|
||||
addBalanceReq.UserId = int32(userInfo.ID)
|
||||
@ -405,7 +314,7 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量
|
||||
fmt.Println("res:", res)
|
||||
fmt.Println("err:", err)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("确认失败"))
|
||||
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
|
||||
return
|
||||
}
|
||||
// 如果是艺人手动确认,确认操作后,自动标记为待阅读状态
|
||||
@ -519,13 +428,11 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
||||
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
|
||||
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
|
||||
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
|
||||
"当月消耗套餐金额($)", "当月消耗增值金额($)",
|
||||
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
|
||||
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
|
||||
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
|
||||
"当前可用套餐数据分析数", "当前可用增值数据分析数", "当前已用套餐数据分析数", "当前已用增值数据分析数", "当前作废套餐数据分析数", "当前作废增值数据分析数", "当月新增可用套餐数据分析数", "当月新增可用增值数据分析数", "当月使用套餐数据分析数", "当月使用增值数据分析数", "当月作废套餐数据分析数", "当月作废增值数据分析数",
|
||||
"当前可用套餐竞品数", "当前可用增值竞品数", "当前已用套餐竞品数", "当前已用增值竞品数", "当前作废套餐竞品数", "当前作废增值竞品数", "当月新增可用套餐竞品数", "当月新增可用增值竞品数", "当月使用套餐竞品数", "当月使用增值竞品数", "当月作废套餐竞品数", "当月作废增值竞品数",
|
||||
"当月手动扩展账号新增数", "当月手动扩展视频新增数", "当月手动扩展图文新增数", "当月手动扩展数据分析新增数", "当月新增手动扩展时长(天)", "当月手动扩展账号使用数", "当月手动扩展视频使用数", "当月手动扩展图文使用数", "当月手动扩展数据分析使用数", "当月手动扩展竞品数", "当月手动扩展竞品使用数",
|
||||
"当月手动扩展账号新增数", "当月手动扩展视频新增数", "当月手动扩展图文新增数", "当月手动扩展数据分析新增数", "当月新增手动扩展时长(天)", "当月手动扩展账号使用数", "当月手动扩展视频使用数", "当月手动扩展图文使用数", "当月手动扩展数据分析使用数",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
@ -563,97 +470,69 @@ func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) erro
|
||||
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
|
||||
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
|
||||
|
||||
// 当月视频消耗金额($)
|
||||
monthlyBundleVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyBundleVideoConsumptionPrice, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
monthlyIncreaseVideoConsumptionPrice, err := strconv.ParseFloat(it.MonthlyIncreaseVideoConsumptionPrice, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_ = write(15, fmt.Sprintf("%.2f", monthlyBundleVideoConsumptionPrice))
|
||||
_ = write(16, fmt.Sprintf("%.2f", monthlyIncreaseVideoConsumptionPrice))
|
||||
|
||||
// 账号类
|
||||
_ = write(17, int(it.BundleAccountNumber))
|
||||
_ = write(18, int(it.IncreaseAccountNumber))
|
||||
_ = write(19, int(it.BundleAccountConsumptionNumber))
|
||||
_ = write(20, int(it.IncreaseAccountConsumptionNumber))
|
||||
_ = write(15, int(it.BundleAccountNumber))
|
||||
_ = write(16, int(it.IncreaseAccountNumber))
|
||||
_ = write(17, int(it.BundleAccountConsumptionNumber))
|
||||
_ = write(18, int(it.IncreaseAccountConsumptionNumber))
|
||||
|
||||
// 视频类
|
||||
_ = write(21, int(it.MonthlyBundleVideoNumber))
|
||||
_ = write(22, int(it.MonthlyIncreaseVideoNumber))
|
||||
_ = write(23, int(it.BundleVideoConsumptionNumber))
|
||||
_ = write(24, int(it.IncreaseVideoConsumptionNumber))
|
||||
_ = write(25, int(it.InvalidBundleVideoNumber))
|
||||
_ = write(26, int(it.InvalidIncreaseVideoNumber))
|
||||
_ = write(27, int(it.MonthlyNewBundleVideoNumber))
|
||||
_ = write(28, int(it.MonthlyNewIncreaseVideoNumber))
|
||||
_ = write(29, int(it.MonthlyBundleVideoConsumptionNumber))
|
||||
_ = write(30, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
||||
_ = write(31, int(it.MonthlyInvalidBundleVideoNumber))
|
||||
_ = write(32, int(it.MonthlyInvalidIncreaseVideoNumber))
|
||||
_ = write(19, int(it.MonthlyBundleVideoNumber))
|
||||
_ = write(20, int(it.MonthlyIncreaseVideoNumber))
|
||||
_ = write(21, int(it.BundleVideoConsumptionNumber))
|
||||
_ = write(22, int(it.IncreaseVideoConsumptionNumber))
|
||||
_ = write(23, int(it.InvalidBundleVideoNumber))
|
||||
_ = write(24, int(it.InvalidIncreaseVideoNumber))
|
||||
_ = write(25, int(it.MonthlyNewBundleVideoNumber))
|
||||
_ = write(26, int(it.MonthlyNewIncreaseVideoNumber))
|
||||
_ = write(27, int(it.MonthlyBundleVideoConsumptionNumber))
|
||||
_ = write(28, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
||||
_ = write(29, int(it.MonthlyInvalidBundleVideoNumber))
|
||||
_ = write(30, int(it.MonthlyInvalidIncreaseVideoNumber))
|
||||
|
||||
// 图文类
|
||||
_ = write(33, int(it.MonthlyBundleImageNumber))
|
||||
_ = write(34, int(it.MonthlyIncreaseImageNumber))
|
||||
_ = write(35, int(it.BundleImageConsumptionNumber))
|
||||
_ = write(36, int(it.IncreaseImageConsumptionNumber))
|
||||
_ = write(37, int(it.InvalidBundleImageNumber))
|
||||
_ = write(38, int(it.InvalidIncreaseImageNumber))
|
||||
_ = write(39, int(it.MonthlyNewBundleImageNumber))
|
||||
_ = write(40, int(it.MonthlyNewIncreaseImageNumber))
|
||||
_ = write(41, int(it.MonthlyBundleImageConsumptionNumber))
|
||||
_ = write(42, int(it.MonthlyIncreaseImageConsumptionNumber))
|
||||
_ = write(43, int(it.MonthlyInvalidBundleImageNumber))
|
||||
_ = write(44, int(it.MonthlyInvalidIncreaseImageNumber))
|
||||
_ = write(31, int(it.MonthlyBundleImageNumber))
|
||||
_ = write(32, int(it.MonthlyIncreaseImageNumber))
|
||||
_ = write(33, int(it.BundleImageConsumptionNumber))
|
||||
_ = write(34, int(it.IncreaseImageConsumptionNumber))
|
||||
_ = write(35, int(it.InvalidBundleImageNumber))
|
||||
_ = write(36, int(it.InvalidIncreaseImageNumber))
|
||||
_ = write(37, int(it.MonthlyNewBundleImageNumber))
|
||||
_ = write(38, int(it.MonthlyNewIncreaseImageNumber))
|
||||
_ = write(39, int(it.MonthlyBundleImageConsumptionNumber))
|
||||
_ = write(40, int(it.MonthlyIncreaseImageConsumptionNumber))
|
||||
_ = write(41, int(it.MonthlyInvalidBundleImageNumber))
|
||||
_ = write(42, int(it.MonthlyInvalidIncreaseImageNumber))
|
||||
|
||||
// 数据分析类
|
||||
_ = write(45, int(it.MonthlyBundleDataAnalysisNumber))
|
||||
_ = write(46, int(it.MonthlyIncreaseDataAnalysisNumber))
|
||||
_ = write(47, int(it.BundleDataAnalysisConsumptionNumber))
|
||||
_ = write(48, int(it.IncreaseDataAnalysisConsumptionNumber))
|
||||
_ = write(49, int(it.InvalidBundleDataAnalysisNumber))
|
||||
_ = write(50, int(it.InvalidIncreaseDataAnalysisNumber))
|
||||
_ = write(51, int(it.MonthlyNewBundleDataAnalysisNumber))
|
||||
_ = write(52, int(it.MonthlyNewIncreaseDataAnalysisNumber))
|
||||
_ = write(53, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
|
||||
_ = write(54, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
|
||||
_ = write(55, int(it.MonthlyInvalidBundleDataAnalysisNumber))
|
||||
_ = write(56, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
|
||||
|
||||
// 竞品数
|
||||
_ = write(57, int(it.MonthlyBundleCompetitiveNumber))
|
||||
_ = write(58, int(it.MonthlyIncreaseCompetitiveNumber))
|
||||
_ = write(59, int(it.BundleCompetitiveConsumptionNumber))
|
||||
_ = write(60, int(it.IncreaseCompetitiveConsumptionNumber))
|
||||
_ = write(61, int(it.InvalidBundleCompetitiveNumber))
|
||||
_ = write(62, int(it.InvalidIncreaseCompetitiveNumber))
|
||||
_ = write(63, int(it.MonthlyNewBundleCompetitiveNumber))
|
||||
_ = write(64, int(it.MonthlyNewIncreaseCompetitiveNumber))
|
||||
_ = write(65, int(it.MonthlyBundleCompetitiveConsumptionNumber))
|
||||
_ = write(66, int(it.MonthlyIncreaseCompetitiveConsumptionNumber))
|
||||
_ = write(67, int(it.MonthlyInvalidBundleCompetitiveNumber))
|
||||
_ = write(68, int(it.MonthlyInvalidIncreaseCompetitiveNumber))
|
||||
_ = write(43, int(it.MonthlyBundleDataAnalysisNumber))
|
||||
_ = write(44, int(it.MonthlyIncreaseDataAnalysisNumber))
|
||||
_ = write(45, int(it.BundleDataAnalysisConsumptionNumber))
|
||||
_ = write(46, int(it.IncreaseDataAnalysisConsumptionNumber))
|
||||
_ = write(47, int(it.InvalidBundleDataAnalysisNumber))
|
||||
_ = write(48, int(it.InvalidIncreaseDataAnalysisNumber))
|
||||
_ = write(49, int(it.MonthlyNewBundleDataAnalysisNumber))
|
||||
_ = write(50, int(it.MonthlyNewIncreaseDataAnalysisNumber))
|
||||
_ = write(51, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
|
||||
_ = write(52, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
|
||||
_ = write(53, int(it.MonthlyInvalidBundleDataAnalysisNumber))
|
||||
_ = write(54, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
|
||||
|
||||
// 手动扩展类
|
||||
_ = write(69, int(it.MonthlyNewManualAccountNumber))
|
||||
_ = write(70, int(it.MonthlyNewManualVideoNumber))
|
||||
_ = write(71, int(it.MonthlyNewManualImageNumber))
|
||||
_ = write(72, int(it.MonthlyNewManualDataAnalysisNumber))
|
||||
_ = write(73, int(it.MonthlyNewDurationNumber))
|
||||
_ = write(74, int(it.MonthlyManualAccountConsumptionNumber))
|
||||
_ = write(75, int(it.MonthlyManualVideoConsumptionNumber))
|
||||
_ = write(76, int(it.MonthlyManualImageConsumptionNumber))
|
||||
_ = write(77, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
||||
_ = write(78, int(it.MonthlyNewManualCompetitiveNumber))
|
||||
_ = write(79, int(it.MonthlyManualCompetitiveConsumptionNumber))
|
||||
_ = write(55, int(it.MonthlyNewManualAccountNumber))
|
||||
_ = write(56, int(it.MonthlyNewManualVideoNumber))
|
||||
_ = write(57, int(it.MonthlyNewManualImageNumber))
|
||||
_ = write(58, int(it.MonthlyNewManualDataAnalysisNumber))
|
||||
_ = write(59, int(it.MonthlyNewDurationNumber))
|
||||
_ = write(60, int(it.MonthlyManualAccountConsumptionNumber))
|
||||
_ = write(61, int(it.MonthlyManualVideoConsumptionNumber))
|
||||
_ = write(62, int(it.MonthlyManualImageConsumptionNumber))
|
||||
_ = write(63, int(it.MonthlyManualDataAnalysisConsumptionNumber))
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "BZ", 15)
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
@ -668,7 +547,7 @@ func GetAccountBundleBalance(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
req.Month = []string{time.Now().Format("2006-01")}
|
||||
req.Month = time.Now().Format("2006-01")
|
||||
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New(common.GetBundleBalanceListFailed))
|
||||
@ -693,152 +572,8 @@ func GetAccountBundleBalance(c *gin.Context) {
|
||||
ImageConsumptionNumber: item.BundleImageConsumptionNumber + item.IncreaseImageConsumptionNumber + item.ManualImageNumber,
|
||||
DataAnalysisNumber: item.BundleDataAnalysisNumber + item.IncreaseDataAnalysisNumber + item.ManualDataAnalysisNumber,
|
||||
DataAnalysisConsumptionNumber: item.BundleDataAnalysisConsumptionNumber + item.IncreaseDataAnalysisConsumptionNumber + item.ManualDataAnalysisNumber,
|
||||
CompetitiveNumber: item.BundleCompetitiveNumber + item.IncreaseCompetitiveNumber + item.ManualCompetitiveNumber,
|
||||
CompetitiveConsumptionNumber: item.BundleCompetitiveConsumptionNumber + item.IncreaseCompetitiveConsumptionNumber + item.ManualCompetitiveConsumptionNumber,
|
||||
Bought: item.Bought,
|
||||
}
|
||||
})
|
||||
service.Success(c, result)
|
||||
}
|
||||
|
||||
func writeToExcelCast(filename string, items []*bundle.WorkCastInfo) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"用户名称", "用户编号", "套餐名称", "下单时间",
|
||||
"作品标题", "消费类型", "作品类型", "验收类型",
|
||||
"作品上传时间", "艺人待确认时间", "艺人验收确认时间",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range items {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
costType := ""
|
||||
if it.CostType == 1 {
|
||||
costType = "套餐"
|
||||
} else if it.CostType == 2 {
|
||||
costType = "增值"
|
||||
}
|
||||
workCategory := ""
|
||||
if it.WorkCategory == 1 {
|
||||
workCategory = "图文"
|
||||
} else if it.WorkCategory == 2 {
|
||||
workCategory = "视频"
|
||||
}
|
||||
confirmType := ""
|
||||
if it.ConfirmType == 2 {
|
||||
confirmType = "系统确认"
|
||||
} else if it.ConfirmType == 1 {
|
||||
confirmType = "艺人确认"
|
||||
} else {
|
||||
confirmType = "未确认"
|
||||
}
|
||||
_ = write(1, it.CustomerName)
|
||||
_ = write(2, it.CustomerNum)
|
||||
_ = write(3, it.BundleName)
|
||||
_ = write(4, it.SignedTime)
|
||||
_ = write(5, it.Title)
|
||||
_ = write(6, costType)
|
||||
_ = write(7, workCategory)
|
||||
_ = write(8, confirmType)
|
||||
_ = write(9, it.SubmitTime)
|
||||
_ = write(10, it.WaitingTime)
|
||||
_ = write(11, it.ConfirmTime)
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeToExcelPriceInfo(filename string, items []*bundle.BundleBalanceExportItem) error {
|
||||
f := excelize.NewFile()
|
||||
sheet := "Sheet1"
|
||||
|
||||
// 手动表头(顺序与写入字段顺序必须一致)
|
||||
headers := []string{
|
||||
"所属月份", "用户编号", "姓名", "手机号", "手续费",
|
||||
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
|
||||
"当月使用套餐视频数", "当月使用增值视频数",
|
||||
"当月消耗套餐金额($)", "当月消耗增值金额($)",
|
||||
}
|
||||
|
||||
// 写表头
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
if err := f.SetCellValue(sheet, cell, h); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 从第2行开始写数据
|
||||
for r, it := range items {
|
||||
row := r + 2
|
||||
// 逐列写入(注意顺序必须和 headers 一致)
|
||||
write := func(colIdx int, v interface{}) error {
|
||||
col, _ := excelize.ColumnNumberToName(colIdx)
|
||||
cell := fmt.Sprintf("%s%d", col, row)
|
||||
return f.SetCellValue(sheet, cell, v)
|
||||
}
|
||||
_ = write(1, it.Month)
|
||||
_ = write(2, it.CustomerNum)
|
||||
_ = write(3, it.UserName)
|
||||
_ = write(4, it.UserPhoneNumber)
|
||||
_ = write(5, it.Fee)
|
||||
|
||||
// 套餐视频数量及单价
|
||||
_ = write(6, int(it.BundleVideoNumber))
|
||||
_ = write(7, int(it.IncreaseVideoNumber))
|
||||
_ = write(8, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
|
||||
_ = write(9, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
|
||||
|
||||
// 视频类
|
||||
_ = write(10, int(it.MonthlyBundleVideoConsumptionNumber))
|
||||
_ = write(11, int(it.MonthlyIncreaseVideoConsumptionNumber))
|
||||
|
||||
// 当月视频消耗金额($)
|
||||
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(12, fmt.Sprintf("%.2f", monthlyBundleVideoConsumptionPrice))
|
||||
_ = write(13, fmt.Sprintf("%.2f", monthlyIncreaseVideoConsumptionPrice))
|
||||
|
||||
}
|
||||
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 15)
|
||||
|
||||
// 保存文件
|
||||
if err := f.SaveAs(filename); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/duke-git/lancet/v2/datetime"
|
||||
"github.com/shopspring/decimal"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -92,30 +93,9 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
|
||||
sumFee := decimal.Zero
|
||||
|
||||
for _, i := range data {
|
||||
|
||||
s := fmt.Sprintf("%.2f", i.PaymentAmount)
|
||||
d, err := decimal.NewFromString(s)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
|
||||
return
|
||||
}
|
||||
sumPayment = sumPayment.Add(d)
|
||||
|
||||
s = fmt.Sprintf("%.2f", i.FinalAmount)
|
||||
d, err = decimal.NewFromString(s)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
|
||||
return
|
||||
}
|
||||
sumFinal = sumFinal.Add(d)
|
||||
|
||||
s = fmt.Sprintf("%.2f", i.FeeAmount)
|
||||
d, err = decimal.NewFromString(s)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
|
||||
return
|
||||
}
|
||||
sumFee = sumFee.Add(d)
|
||||
sumPayment = sumPayment.Add(decimal.NewFromFloat(float64(i.PaymentAmount)))
|
||||
sumFinal = sumFinal.Add(decimal.NewFromFloat(float64(i.FinalAmount)))
|
||||
sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
|
||||
}
|
||||
|
||||
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "合计支付金额(美元)")
|
||||
@ -191,7 +171,7 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
|
||||
sheet := "Sheet1"
|
||||
f := excelize.NewFile()
|
||||
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "DM账号状态", "Instagram账号名", "Instagram账号状态", "TikTok账号名", "TikTok账号状态", "Bluesky账号名", "Bluesky账号状态", "Youtube账号名", "Youtube账号状态"}
|
||||
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "DM账号状态", "Instagram账号名", "Instagram账号状态", "TikTok账号名", "TikTok账号状态"}
|
||||
for i, h := range headers {
|
||||
col, _ := excelize.ColumnNumberToName(i + 1)
|
||||
cell := col + "1"
|
||||
@ -226,10 +206,6 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
|
||||
_ = write(7, authStatus[it.InsAuthStatus])
|
||||
_ = write(8, it.TiktokNickname)
|
||||
_ = write(9, authStatus[it.TiktokAuthStatus])
|
||||
_ = write(10, it.BlueskyNickname)
|
||||
_ = write(11, authStatus[it.BlueskyAuthStatus])
|
||||
_ = write(12, it.YoutubeNickname)
|
||||
_ = write(13, authStatus[it.YoutubeAuthStatus])
|
||||
}
|
||||
// 可选:设置列宽,使表格更美观
|
||||
_ = f.SetColWidth(sheet, "A", "AZ", 18)
|
||||
@ -247,62 +223,37 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
|
||||
|
||||
func MetricsVideoSubmitExport(ctx *gin.Context) {
|
||||
var req bundle.MetricsVideoSubmitExportReq
|
||||
var (
|
||||
resp *cast.WorkListResp
|
||||
)
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
|
||||
|
||||
const batchSize = 5000
|
||||
var allData []*cast.WorkListResp_Info
|
||||
page := int32(1)
|
||||
if len(req.Month) > 0 {
|
||||
for {
|
||||
resp, err := service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
SubmitTimeMonths: req.Month, // 有 Month 时带上
|
||||
Page: page,
|
||||
PageSize: batchSize,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
if resp == nil || len(resp.Data) == 0 {
|
||||
break
|
||||
}
|
||||
allData = append(allData, resp.Data...)
|
||||
if len(resp.Data) < batchSize {
|
||||
break
|
||||
}
|
||||
page++
|
||||
}
|
||||
t, err := time.Parse("2006-01", req.Month)
|
||||
if err == nil {
|
||||
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime),
|
||||
SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime),
|
||||
Page: 1,
|
||||
PageSize: 99999,
|
||||
})
|
||||
fmt.Printf("resp.Count: %v\n", resp.Count)
|
||||
} else {
|
||||
for {
|
||||
resp, err := service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
Page: page,
|
||||
PageSize: batchSize,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
if resp == nil || len(resp.Data) == 0 {
|
||||
break
|
||||
}
|
||||
allData = append(allData, resp.Data...)
|
||||
if len(resp.Data) < batchSize {
|
||||
break
|
||||
}
|
||||
page++
|
||||
}
|
||||
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
|
||||
Page: 1,
|
||||
PageSize: 99999,
|
||||
})
|
||||
fmt.Printf("resp.Count: %v\n", resp.Count)
|
||||
}
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
}
|
||||
var loigcCastWork = new(logicCast.Work)
|
||||
excelFile, err := loigcCastWork.ExportExcelWorkList(allData)
|
||||
excelFile, err := loigcCastWork.ExportExcelWorkList(resp.Data)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
|
||||
return
|
||||
@ -421,8 +372,8 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
MonthlyNewIncreaseVideoNumber int32
|
||||
BundleVideoConsumptionNumber int32
|
||||
IncreaseVideoConsumptionNumber int32
|
||||
BundleVideoUsedPrice decimal.Decimal
|
||||
IncreaseVideoUsedPrice decimal.Decimal
|
||||
BundleVideoUsedPrice float32
|
||||
IncreaseVideoUsedPrice float32
|
||||
}
|
||||
items := lo.Map(resp.Data, func(item *bundle.BundleBalanceExportItem, _ int) itemStruct {
|
||||
payTime, _ := time.Parse(time.DateTime, item.PayTime)
|
||||
@ -445,8 +396,8 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
MonthlyNewIncreaseVideoNumber: item.MonthlyIncreaseVideoNumber,
|
||||
BundleVideoConsumptionNumber: item.BundleVideoConsumptionNumber,
|
||||
IncreaseVideoConsumptionNumber: item.IncreaseVideoConsumptionNumber,
|
||||
BundleVideoUsedPrice: decimal.NewFromInt32(item.BundleVideoConsumptionNumber).Mul(decimal.NewFromFloat(float64(item.BundleVideoUnitPrice))),
|
||||
IncreaseVideoUsedPrice: decimal.NewFromInt32(item.IncreaseVideoConsumptionNumber).Mul(decimal.NewFromFloat(float64(item.IncreaseVideoUnitPrice))),
|
||||
BundleVideoUsedPrice: float32(item.BundleVideoConsumptionNumber) * item.BundleVideoUnitPrice,
|
||||
IncreaseVideoUsedPrice: float32(item.IncreaseVideoConsumptionNumber) * item.IncreaseVideoUnitPrice,
|
||||
}
|
||||
})
|
||||
|
||||
@ -458,9 +409,9 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
||||
sumIncrease := decimal.Zero
|
||||
sumTotal := decimal.Zero
|
||||
|
||||
for _, i := range data {
|
||||
sumBundle = sumBundle.Add(i.BundleVideoUsedPrice.Round(2))
|
||||
sumIncrease = sumIncrease.Add(i.IncreaseVideoUsedPrice.Round(2))
|
||||
for _, i := range items {
|
||||
sumBundle = sumBundle.Add(decimal.NewFromFloat(float64(i.BundleVideoUsedPrice)))
|
||||
sumIncrease = sumIncrease.Add(decimal.NewFromFloat(float64(i.IncreaseVideoUsedPrice)))
|
||||
}
|
||||
|
||||
sumTotal = sumBundle.Add(sumIncrease)
|
||||
@ -671,12 +622,6 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
|
||||
|
||||
var cellValue any
|
||||
switch field.Kind() {
|
||||
case reflect.Struct:
|
||||
if field.Type() == reflect.TypeOf(decimal.Decimal{}) {
|
||||
cellValue = "$" + field.Interface().(decimal.Decimal).StringFixed(2)
|
||||
} else {
|
||||
cellValue = field.Interface()
|
||||
}
|
||||
case reflect.Float32, reflect.Float64:
|
||||
cellValue = fmt.Sprintf("$%.2f", field.Float()) // 保留两位小数
|
||||
default:
|
||||
@ -705,61 +650,3 @@ func tsToStr(ts int64, layout string) string {
|
||||
t := time.Unix(ts, 0).In(time.Local)
|
||||
return t.Format(layout)
|
||||
}
|
||||
|
||||
func ExportWorkCastInfo(ctx *gin.Context) {
|
||||
var req bundle.ExportWorkCastInfoReq
|
||||
req.StartTime = "2025-01-01 00:00:00"
|
||||
req.EndTime = "2025-12-31 23:59:59"
|
||||
resp, err := service.BundleProvider.ExportWorkCastInfo(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
exportFileName := "作品上传数据_2025-12-31_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", 9999, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(9999), true)
|
||||
if err := writeToExcelCast(filePath, resp.Data); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(ctx, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
func ExportBundlePriceInfo(ctx *gin.Context) {
|
||||
var req bundle.BundleBalanceExportReq
|
||||
exportFileName := "业务收入大表2025.1.1-2025.12.31_" + time.Now().Format("20060102150405") + ".xlsx"
|
||||
filePath := fmt.Sprintf("./runtime/%d/%s", 9999, exportFileName)
|
||||
utils.CheckDirPath("./runtime/"+fmt.Sprint(9999), true)
|
||||
req.Month = []string{"2025-03", "2025-04", "2025-05", "2025-06", "2025-07", "2025-08", "2025-09", "2025-10", "2025-11", "2025-12"}
|
||||
res, err := service.BundleProvider.BundleBalanceExport(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
|
||||
return
|
||||
}
|
||||
if err := writeToExcelPriceInfo(filePath, res.Data); err != nil {
|
||||
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
|
||||
return
|
||||
}
|
||||
var scheme string
|
||||
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
|
||||
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
|
||||
service.Success(ctx, gin.H{
|
||||
"url": exportUrl,
|
||||
})
|
||||
}
|
||||
|
||||
@ -7,12 +7,10 @@ import (
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/service/bundle/logic"
|
||||
"fonchain-fiee/pkg/service/bundle/model"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"strconv"
|
||||
@ -215,14 +213,6 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Redis 防重复提交:同一用户5秒内只能提交一次订单
|
||||
lockKey := fmt.Sprintf("create_bundle_order_%d", userInfo.ID)
|
||||
reply := cache.RedisClient.SetNX(lockKey, 1, 5*time.Second)
|
||||
if !reply.Val() {
|
||||
service.Error(c, errors.New("请勿重复提交订单,请稍后再试"))
|
||||
return
|
||||
}
|
||||
|
||||
// 校验套餐是否已购买
|
||||
if err := logic.CheckUserOrder(userInfo.ID); err != nil {
|
||||
service.Error(c, err)
|
||||
@ -249,25 +239,17 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
startDate := time.Now().Format("2006-01-02")
|
||||
|
||||
// 签合同(金额 + 有效期)
|
||||
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, startDate)
|
||||
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if userInfo.InviterID != 0 && logic.CheckUserFirstOrder(userInfo.ID) {
|
||||
req.InviterId = userInfo.InviterID
|
||||
}
|
||||
|
||||
// 组装订单信息
|
||||
if err := logic.BuildOrderRequest(&req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 校验发布平台
|
||||
if len(req.PlatformIds) == 0 {
|
||||
req.PlatformIds = []uint32{1, 4, 5}
|
||||
}
|
||||
req = logic.BuildOrderRequest(req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract)
|
||||
|
||||
// 创建订单
|
||||
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
|
||||
if err != nil {
|
||||
@ -324,11 +306,6 @@ func VerificationSignature(c *gin.Context) {
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
payTime, err := time.Parse("2006-01-02 15:04:05", order.PayTime)
|
||||
if err != nil {
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
if expirationTime.Before(time.Now()) {
|
||||
service.Success(c, res)
|
||||
return
|
||||
@ -337,8 +314,7 @@ func VerificationSignature(c *gin.Context) {
|
||||
res.Signature = true
|
||||
contract := ContractUrl
|
||||
expirationDate := expirationTime.Format("2006-01-02")
|
||||
payDate := payTime.Format("2006-01-02")
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, payDate)
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -372,17 +348,11 @@ func RestartSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
payTime, err := time.Parse("2006-01-02 15:04:05", order.PayTime)
|
||||
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")
|
||||
payDate := payTime.Format("2006-01-02")
|
||||
|
||||
if order.ReSignature == 2 {
|
||||
service.Error(c, errors.New("订单无需重新签署"))
|
||||
@ -395,7 +365,7 @@ func RestartSignature(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
contract := ContractUrl
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence, payDate)
|
||||
signContract, err := logic.SignContractV2(userInfo.SubNum, contract, 0, expirationDate, userInfo.Name, userInfo.IdNumber, userInfo.PlaceOfResidence)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -544,6 +514,7 @@ func OrderRecordsListV2(c *gin.Context) {
|
||||
for id := range userIdSet {
|
||||
userIds = append(userIds, id)
|
||||
}
|
||||
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
Ids: userIds,
|
||||
Domain: "app",
|
||||
@ -565,10 +536,6 @@ func OrderRecordsListV2(c *gin.Context) {
|
||||
item.CustomerName = u.Name
|
||||
item.TelNum = u.TelNum
|
||||
item.SubNum = u.SubNum
|
||||
if item.InviterId != 0 {
|
||||
item.InviterCode = u.InviterCode
|
||||
item.InviterName = u.InviterName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -651,10 +618,6 @@ func OrderRecordsListDownload(c *gin.Context) {
|
||||
item.CustomerName = u.Name
|
||||
item.TelNum = u.TelNum
|
||||
item.SubNum = u.SubNum
|
||||
if item.InviterId != 0 {
|
||||
item.InviterCode = u.InviterCode
|
||||
item.InviterName = u.InviterName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -672,137 +635,14 @@ func OrderRecordsListDownload(c *gin.Context) {
|
||||
_ = excelFile.Write(c.Writer)
|
||||
|
||||
}
|
||||
func OrderRecordsListPasswordFreeDownload(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequestV2
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res := &bundle.OrderRecordsResponseV2{}
|
||||
|
||||
// Step 1: 如果有姓名/电话筛选,先查用户列表
|
||||
if req.CustomerName != "" {
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
BlurNameTel: req.CustomerName,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(userListResp.UserList) == 0 {
|
||||
// 没查到用户,直接返回空结果
|
||||
res.Page = req.Page
|
||||
res.PageSize = req.PageSize
|
||||
res.Total = 0
|
||||
service.Success(c, res)
|
||||
return
|
||||
}
|
||||
|
||||
// 提取用户ID列表
|
||||
for _, u := range userListResp.UserList {
|
||||
req.UserIds = append(req.UserIds, int64(u.Id))
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2: 查询订单列表
|
||||
orderList, err := service.BundleProvider.OrderRecordsListV2(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// Step 3: 如果订单不为空,查一次用户信息填充(只查一次)
|
||||
if len(orderList.BundleInfo) > 0 {
|
||||
// 先过滤掉 InviterId == 0 的记录
|
||||
var filtered []*bundle.OrderBundleRecordInfo
|
||||
for _, item := range orderList.BundleInfo {
|
||||
if item.InviterId != 0 {
|
||||
filtered = append(filtered, item)
|
||||
}
|
||||
}
|
||||
|
||||
// 如果过滤后为空,直接导出空结果
|
||||
if len(filtered) == 0 {
|
||||
excelFile, err := exportExcel(filtered)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
c.Header("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
c.Header("Content-Disposition", "attachment; filename=order_list.xlsx")
|
||||
c.Header("File-Name", "order_list.xlsx")
|
||||
c.Header("Access-Control-Expose-Headers", "File-Name")
|
||||
_ = excelFile.Write(c.Writer)
|
||||
return
|
||||
}
|
||||
|
||||
// 收集订单里的所有用户ID(仅限过滤后的)
|
||||
userIdSet := make(map[int64]struct{})
|
||||
for _, i := range filtered {
|
||||
userIdSet[i.CustomerId] = struct{}{}
|
||||
}
|
||||
var userIds []int64
|
||||
for id := range userIdSet {
|
||||
userIds = append(userIds, id)
|
||||
}
|
||||
|
||||
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
|
||||
Ids: userIds,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 建立用户ID -> 用户信息映射
|
||||
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
|
||||
for _, u := range userListResp.UserList {
|
||||
userMap[int64(u.Id)] = u
|
||||
}
|
||||
|
||||
// 填充订单中的用户信息(仅限过滤后的)
|
||||
for _, item := range filtered {
|
||||
if u, ok := userMap[item.CustomerId]; ok {
|
||||
item.CustomerName = u.Name
|
||||
item.TelNum = u.TelNum
|
||||
item.SubNum = u.SubNum
|
||||
if item.InviterId != 0 {
|
||||
item.InviterCode = u.InviterCode
|
||||
item.InviterName = u.InviterName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 用过滤后的数据覆盖原数据用于导出
|
||||
orderList.BundleInfo = filtered
|
||||
}
|
||||
excelFile, err := exportExcel(orderList.BundleInfo)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 返回 Excel 文件流给前端
|
||||
c.Header("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||
c.Header("Content-Disposition", "attachment; filename=order_list.xlsx")
|
||||
c.Header("File-Name", "order_list.xlsx")
|
||||
c.Header("Access-Control-Expose-Headers", "File-Name")
|
||||
_ = excelFile.Write(c.Writer)
|
||||
|
||||
}
|
||||
|
||||
func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, error) {
|
||||
f := excelize.NewFile()
|
||||
sheetName := "Sheet1"
|
||||
f.SetSheetName("Sheet1", sheetName)
|
||||
|
||||
headers := []string{
|
||||
"套餐订单号", "套餐类型", "购买类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
||||
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态", "邀请码", "邀请码所属人",
|
||||
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
|
||||
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
|
||||
}
|
||||
for i, h := range headers {
|
||||
cell := fmt.Sprintf("%s%d", string(rune('A'+i)), 1)
|
||||
@ -829,27 +669,24 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
|
||||
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("A%d", rowIndex), bundleInfo.OrderNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("B%d", rowIndex), bundleInfo.BundleName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPurchaseType(bundleInfo.PurchaseType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.TelNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.SubNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.CustomerName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.PayTime)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("J%d", rowIndex), bundleInfo.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("R%d", rowIndex), bundleInfo.InviterCode)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("S%d", rowIndex), bundleInfo.InviterName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.SubNum)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.CustomerName)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.PayTime)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount)
|
||||
|
||||
if addCount > 0 {
|
||||
for i, add := range bundleInfo.AddBundleInfo {
|
||||
r := rowIndex + i
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.OrderAddNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), add.SettlementAmount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.HandlingFee)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), add.OrderAddCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("Q%d", r), GetPayStatusText(add.AddPayStatus))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.OrderAddNo)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.Amount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.SettlementAmount)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.HandlingFee)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.OrderAddCreateAt)
|
||||
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), GetPayStatusText(add.AddPayStatus))
|
||||
}
|
||||
} else {
|
||||
for i := 8; i <= 15; i++ {
|
||||
@ -873,16 +710,6 @@ func GetPayStatusText(status int32) string {
|
||||
return strconv.Itoa(int(status))
|
||||
}
|
||||
}
|
||||
func GetPurchaseType(status uint64) string {
|
||||
switch status {
|
||||
case 1:
|
||||
return "新购"
|
||||
case 2:
|
||||
return "续费"
|
||||
default:
|
||||
return strconv.Itoa(int(status))
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助函数:获取货币类型文本
|
||||
func GetCurrencyTypeText(currencyType int32) string {
|
||||
@ -1212,63 +1039,3 @@ func ExportOrderInfoOss(c *gin.Context) {
|
||||
|
||||
service.Success(c, &bundleModel.ExportResponse{ExportUrl: exportUrl})
|
||||
}
|
||||
|
||||
func CreatInvoice(c *gin.Context) {
|
||||
var orderInof model.InvoiceInfo
|
||||
if err := c.ShouldBindBodyWith(&orderInof, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
//生成发票
|
||||
orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
Uuid: orderInof.OrderUUID,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
applyTime := orderInof.ApplyTime
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
payTimeString := payTime.Format("20060102")
|
||||
fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
fmt.Println("发票时间数据获取完成")
|
||||
err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
if err != nil {
|
||||
fmt.Println("生成发票失败:", err)
|
||||
service.Error(c, errors.New("生成发票失败:"+err.Error()))
|
||||
return
|
||||
}
|
||||
service.Success(c, "生成发票成功")
|
||||
}
|
||||
|
||||
func CreateDownloadInvoice(c *gin.Context) {
|
||||
var orderInof model.InvoiceDownloadInfo
|
||||
if err := c.ShouldBindBodyWith(&orderInof, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
fmt.Println("下载对应发票订单编号 :", orderInof.OrderNo)
|
||||
//生成发票
|
||||
orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
OrderNo: orderInof.OrderNo,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
applyTime := orderRecord.PayTime
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
payTimeString := payTime.Format("20060102")
|
||||
fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
fmt.Println("发票时间数据获取完成")
|
||||
invoiceUrl, err := createDownloadInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
if err != nil {
|
||||
fmt.Println("生成发票失败:", err)
|
||||
service.Error(c, errors.New("生成发票失败:"+err.Error()))
|
||||
return
|
||||
}
|
||||
service.Success(c, &bundleModel.ExportResponse{ExportUrl: invoiceUrl})
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ const (
|
||||
OnlyAddValueListByOrderNoFailed = "根据订单号查询增值套餐失败"
|
||||
)
|
||||
|
||||
// 官网报告
|
||||
//官网报告
|
||||
const (
|
||||
ErrorCreateReportFailed = "创建官网报告失败"
|
||||
ErrorDeleteReportFailed = "删除官网报告失败"
|
||||
@ -30,7 +30,7 @@ const (
|
||||
ErrorDisplayReportFailed = "显示官网报告失败"
|
||||
)
|
||||
|
||||
// 官网成员管理
|
||||
//官网成员管理
|
||||
const (
|
||||
ErrorCreateMemberFailed = "创建官网成员失败"
|
||||
ErrorDeleteMemberFailed = "删除官网成员失败"
|
||||
@ -45,7 +45,7 @@ const (
|
||||
ErrorDisplayBoardOfDirectorsFailed = "显示董事会成员失败"
|
||||
)
|
||||
|
||||
// 官网邮箱通知
|
||||
//官网邮箱通知
|
||||
const (
|
||||
ErrorEmailAlertSubmitFailed = "提交邮箱通知失败"
|
||||
ErrorGetEmailInformationListFailed = "获取邮箱通知列表失败"
|
||||
@ -66,7 +66,6 @@ const (
|
||||
InvalidValueAddBundleNum = "套餐数量无效"
|
||||
ThePackageHasExpired = "当前套餐已过期"
|
||||
ErrorPermanentPackage = "永久套餐无需购买"
|
||||
ErrPurchaseType = "购买类型错误"
|
||||
)
|
||||
const (
|
||||
OrderTypePackage = 1 // 套餐
|
||||
@ -76,10 +75,6 @@ const (
|
||||
TimeUnitMonth = 2
|
||||
TimeUnitYear = 3
|
||||
)
|
||||
const (
|
||||
NewPurchaseOrder = 1 //新购
|
||||
RenewalOrder = 2 //续费
|
||||
)
|
||||
const (
|
||||
ErrorExportOrderInfo = "导出订单信息失败"
|
||||
)
|
||||
@ -110,8 +105,6 @@ const (
|
||||
GetWorkDetailFailed = "获取作品详情失败"
|
||||
)
|
||||
|
||||
//用户套餐状态
|
||||
|
||||
// 余量
|
||||
const (
|
||||
BundleExtendFailed = "套餐扩展失败"
|
||||
@ -129,10 +122,9 @@ const (
|
||||
InsufficientBalance = "余量不足"
|
||||
)
|
||||
|
||||
// 用户套餐状态
|
||||
const (
|
||||
BundleExpired = 1 //已过期
|
||||
BundleNotExpired = 0 //未过期
|
||||
BundleExpired = 1
|
||||
BundleNotExpired = 0
|
||||
)
|
||||
|
||||
// 数据指标
|
||||
@ -146,11 +138,6 @@ const (
|
||||
BalanceMetricsExportFailed = "服务使用明细数据导出失败"
|
||||
)
|
||||
|
||||
// 发票管理
|
||||
const (
|
||||
ExportInvoiceFailed = "发票导出失败"
|
||||
)
|
||||
|
||||
// 素材库
|
||||
const (
|
||||
FileListFailed = "素材库列表查询失败"
|
||||
|
||||
@ -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)
|
||||
}
|
||||
@ -25,9 +25,6 @@ func ValidateRequest(c *gin.Context, req *bundle.OrderCreateRecord) error {
|
||||
return errors.New(common.MissLanguageTypes)
|
||||
}
|
||||
}
|
||||
if req.PurchaseType != common.NewPurchaseOrder && req.PurchaseType != common.RenewalOrder {
|
||||
return errors.New(common.ErrPurchaseType)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -66,24 +63,6 @@ func CheckUserOrder(userID uint64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 校验用户是否首次购买
|
||||
func CheckUserFirstOrder(userID uint64) bool {
|
||||
req := bundle.OrderRecordsDetailRequest{
|
||||
CustomerID: strconv.FormatUint(userID, 10),
|
||||
Status: 2,
|
||||
}
|
||||
records, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
|
||||
// 用户没有任何订单记录
|
||||
if records.OrderRecord == nil {
|
||||
return true
|
||||
}
|
||||
// 检查订单是否属于该用户
|
||||
if records.OrderRecord.CustomerID != strconv.FormatUint(userID, 10) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 获取最后一次合同编号
|
||||
func GetLastContractNo() (string, error) {
|
||||
records, err := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{
|
||||
@ -203,9 +182,9 @@ func buildAddRecord(addService *bundle.ValueAddServiceLang, uid string, price fl
|
||||
}
|
||||
|
||||
// 组装订单请求
|
||||
func BuildOrderRequest(req *bundle.OrderCreateRecord, userInfo login.Info,
|
||||
func BuildOrderRequest(req bundle.OrderCreateRecord, userInfo login.Info,
|
||||
bundleDetail *bundle.BundleProfileLang, addRecords []*bundle.OrderCreateAddRecord,
|
||||
addTotalPrice float32, lastContractNo, signContract string) error {
|
||||
addTotalPrice float32, lastContractNo, signContract string) bundle.OrderCreateRecord {
|
||||
|
||||
req.CustomerNum = userInfo.SubNum
|
||||
req.CustomerName = userInfo.Name
|
||||
@ -220,18 +199,7 @@ func BuildOrderRequest(req *bundle.OrderCreateRecord, userInfo login.Info,
|
||||
req.Status = bundleModel.OrderSigned
|
||||
req.AddRecords = addRecords
|
||||
req.PayType = 1
|
||||
|
||||
//确认购买类型
|
||||
if req.PurchaseType == common.RenewalOrder {
|
||||
currentOrder, err := service.BundleProvider.GetInEffectOrderRecord(context.Background(), &bundle.GetInEffectOrderRecordRequest{
|
||||
UserID: userInfo.ID,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.RenewalOrderUUID = currentOrder.Uuid
|
||||
}
|
||||
return nil
|
||||
return req
|
||||
}
|
||||
func calculateExpirationDate(startDate time.Time, num int32, unit string) string {
|
||||
//now := time.Now()
|
||||
|
||||
@ -10,12 +10,11 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/signintech/gopdf"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func SignContractV2(customerNum, contract string, price float32, expirationDate string, nickName string, idCard string, address string, startDate string) (outputUrl string, err error) {
|
||||
func SignContractV2(customerNum, contract string, price float32, expirationDate string, nickName string, idCard string, address string) (outputUrl string, err error) {
|
||||
filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf"
|
||||
downloadFileErr := DownloadFile(filePath, contract)
|
||||
if downloadFileErr != nil {
|
||||
@ -24,7 +23,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, errors.New(common.ErrorDownloadFile)
|
||||
}
|
||||
|
||||
signFile := model.MediaPath + customerNum + "signed" + uuid.New().String() + ".pdf"
|
||||
signFile := model.MediaPath + customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
|
||||
|
||||
/*signErr := InsertSignature(filePath, signFile, signImgPath, contractNo, idNo, telNum, address, price)
|
||||
if signErr != nil {
|
||||
@ -32,7 +31,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
}*/
|
||||
|
||||
signErr := InsertSignatureV2(filePath, signFile, price, expirationDate, nickName, idCard, address, startDate)
|
||||
signErr := InsertSignatureV2(filePath, signFile, price, expirationDate, nickName, idCard, address)
|
||||
if signErr != nil {
|
||||
zap.L().Error("insert signature error: ", zap.Error(signErr))
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
@ -47,7 +46,7 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
||||
return outputUrl, nil
|
||||
}
|
||||
|
||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string, nickName string, idCard string, address string, startDate string) error {
|
||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string, nickName string, idCard string, address string) error {
|
||||
fmt.Println("================================templatePath:", templatePath)
|
||||
fmt.Println("================================outputPath:", outputPath)
|
||||
fmt.Println("================================price:", price)
|
||||
@ -85,30 +84,24 @@ func InsertSignatureV2(templatePath, outputPath string, price float32, expiratio
|
||||
// 英文格式的时间
|
||||
parsedTime, err := time.Parse("2006-01-02", expirationDate)
|
||||
if err != nil {
|
||||
return errors.New("时间解析错误")
|
||||
}
|
||||
// 英文格式的时间
|
||||
startTime, err := time.Parse("2006-01-02", startDate)
|
||||
if err != nil {
|
||||
fmt.Println("时间解析错误: %v", err)
|
||||
fmt.Println(expirationDate)
|
||||
return errors.New("时间解析错误")
|
||||
}
|
||||
year := parsedTime.Format("2006") // "2006"
|
||||
month := parsedTime.Format("01") // "01"
|
||||
day := parsedTime.Format("02") // "02"
|
||||
startYear := startTime.Format("2006")
|
||||
startMonth := startTime.Format("01")
|
||||
startDay := startTime.Format("02")
|
||||
// 填 第一页 日期-姓名-身份证号
|
||||
pdf.SetPage(onePage)
|
||||
pdf.SetX(232)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, startYear)
|
||||
pdf.Cell(nil, year)
|
||||
pdf.SetX(279)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, startMonth)
|
||||
pdf.Cell(nil, month)
|
||||
pdf.SetX(313)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, startDay)
|
||||
pdf.Cell(nil, day)
|
||||
pdf.SetX(370)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, nickName)
|
||||
|
||||
@ -13,12 +13,3 @@ const (
|
||||
type ExportResponse struct {
|
||||
ExportUrl string `json:"exportUrl"`
|
||||
}
|
||||
|
||||
type InvoiceInfo struct {
|
||||
ApplyTime string `json:"applyTime"`
|
||||
OrderUUID string `json:"orderUuid"`
|
||||
}
|
||||
|
||||
type InvoiceDownloadInfo struct {
|
||||
OrderNo string `json:"orderNo"`
|
||||
}
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
package model
|
||||
|
||||
type QuestionnairePDFData struct {
|
||||
// 基本信息
|
||||
CustomerNum string `json:"customerNum"`
|
||||
CustomerName string `json:"customerName"`
|
||||
BundleName string `json:"bundleName"`
|
||||
BundleStartDate string `json:"bundleStartDate"`
|
||||
BundleEndDate string `json:"bundleEndDate"`
|
||||
VideoNum string `json:"videoNum"`
|
||||
AccountNum string `json:"accountNum"`
|
||||
ImagesNum string `json:"imagesNum"`
|
||||
DataAnalysisNum string `json:"dataAnalysisNum"`
|
||||
CompetitiveNum string `json:"competitiveNum"`
|
||||
ValueAddVideoNum string `json:"valueAddVideoNum"`
|
||||
|
||||
// 评分(1-5)
|
||||
Score1 int `json:"score1"`
|
||||
Score2 int `json:"score2"`
|
||||
Score3 int `json:"score3"`
|
||||
Score4 int `json:"score4"`
|
||||
Score5 int `json:"score5"`
|
||||
Score6 int `json:"score6"`
|
||||
Score7 int `json:"score7"`
|
||||
|
||||
// 意见
|
||||
Opinion1 string `json:"opinion1"`
|
||||
Opinion2 string `json:"opinion2"`
|
||||
Opinion3 string `json:"opinion3"`
|
||||
|
||||
// 提交信息
|
||||
Submitter string `json:"submitter"`
|
||||
SubmissionDate string `json:"submissionDate"`
|
||||
Address string `json:"address"`
|
||||
}
|
||||
@ -7,8 +7,6 @@ import (
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
castProto "fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
@ -17,7 +15,6 @@ import (
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"fonchain-fiee/pkg/service/invoice"
|
||||
"io"
|
||||
"math"
|
||||
"net/http"
|
||||
@ -332,9 +329,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
go func() {
|
||||
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo", ArtistUuid: fmt.Sprint(orderLimit.UserId)})
|
||||
}()
|
||||
|
||||
if req.ProductAllPrice == 0 {
|
||||
////创建对账单 todo 待修改
|
||||
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||
@ -356,11 +351,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//获取上一笔订单信息:如果没有查询到代表首次购买 需要判断异常情况
|
||||
lastOrderInfo, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
CustomerID: strconv.FormatUint(orderLimit.UserId, 10),
|
||||
Status: 2,
|
||||
})
|
||||
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: req.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
@ -372,25 +363,6 @@ func CreateAntomPay(c *gin.Context) {
|
||||
service.Error(c, updateStatusErr)
|
||||
return
|
||||
}
|
||||
// //生成发票
|
||||
// fmt.Println("开始生成发票")
|
||||
// orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
// Uuid: req.OutTradeNo, //因为需求更新,实际传入的是订单的uuid
|
||||
// })
|
||||
// if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
// }
|
||||
|
||||
// amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
|
||||
// // 将当前时间转换为北京时间
|
||||
// applyTime := common.GetBeijingTime()
|
||||
// payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
// payTimeString := payTime.Format("20060102")
|
||||
// fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
// fmt.Println("发票时间数据获取完成")
|
||||
// err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
|
||||
switch orderLimit.Type {
|
||||
case common.OrderTypePackage:
|
||||
@ -462,7 +434,6 @@ func CreateAntomPay(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
handleMediaAccountBinding(orderLimit.UserId, orderLimit.PurchaseType, int(orderLimit.AccountNumber), lastOrderInfo)
|
||||
|
||||
service.Success(c)
|
||||
return
|
||||
@ -477,15 +448,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
antomReq.Domain = "fiee"
|
||||
antomReq.Amount = req.ProductAllPrice
|
||||
antomReq.Currency = req.ProductPriceCurrency
|
||||
//antomReq.OutTradeNo = req.OutTradeNo
|
||||
//uuidV4, err := uuid.NewV4()
|
||||
//if err != nil {
|
||||
// fmt.Println("生成错误", err)
|
||||
// service.Error(c, errors.New("订单编号生成失败"))
|
||||
// return
|
||||
//}
|
||||
//antomReq.OutTradeNo = uuidV4.String()
|
||||
antomReq.OutTradeNo = orderLimit.OrderUUID
|
||||
antomReq.OutTradeNo = req.OutTradeNo
|
||||
antomReq.ReturnUrl = req.SuccessUrl
|
||||
|
||||
//调用微服务获取支付地址
|
||||
@ -528,7 +491,7 @@ func CreateAntomPay(c *gin.Context) {
|
||||
CurrencyType: int32(currencyType),
|
||||
PayStatus: 1,
|
||||
UserID: userInfo.ID,
|
||||
SerialNumber: req.OutTradeNo,
|
||||
SerialNumber: result.CheckoutSessionId,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
||||
@ -618,7 +581,6 @@ func AntomWebhook(c *gin.Context) {
|
||||
fmt.Println("支付时间:", paymentTime)
|
||||
fmt.Println("支付结果状态:", resultStatus)
|
||||
fmt.Println("支付结果消息:", resultMessage)
|
||||
|
||||
/*
|
||||
* S: 当 notifyType 为PAYMENT_RESULT时,表示支付成功;当 notifyType 为PAYMENT_PENDING时,表示支付处理中。
|
||||
* F: 表示支付失败。
|
||||
@ -640,23 +602,9 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
fmt.Println("resp.Status:", resp.Status)
|
||||
if resp.Status == "paid" {
|
||||
//添加余额
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderUuid(context.Background(), &bundle.OrderInfoByOrderUuidRequest{
|
||||
OrderUuid: resp.OutTradeNo,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//获取上一笔订单信息:如果没有查询到代表首次购买 需要判断异常情况
|
||||
lastOrderInfo, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
CustomerID: strconv.FormatUint(orderLimit.UserId, 10),
|
||||
Status: 2,
|
||||
})
|
||||
|
||||
//支付成功
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderUuid(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: resp.OutTradeNo,
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
@ -666,9 +614,9 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
// 更新对账单
|
||||
_, err = service.BundleProvider.UpdateReconciliationStatusBySerialNumber(context.Background(), &bundle.UpdateStatusAndPayTimeBySerialNumber{
|
||||
PayTime: common.GetBeijingTime(),
|
||||
PayTime: paymentTime,
|
||||
PaymentStatus: 2,
|
||||
SerialNumber: resp.OutTradeNo,
|
||||
SerialNumber: requestId,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("=============== antom回调,更新对账单报错:", err)
|
||||
@ -678,34 +626,13 @@ func AntomWebhook(c *gin.Context) {
|
||||
}
|
||||
|
||||
//添加余额
|
||||
// orderLimit, err = service.BundleProvider.OrderListByOrderUuid(context.Background(), &bundle.OrderInfoByOrderUuidRequest{
|
||||
// OrderUuid: resp.OutTradeNo,
|
||||
// })
|
||||
// if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
// }
|
||||
|
||||
//生成发票
|
||||
orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
Uuid: resp.OutTradeNo, //因为需求更新,实际传入的是订单的uuid
|
||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
applyTime := common.GetBeijingTime()
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
payTimeString := payTime.Format("20060102")
|
||||
fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
fmt.Println("发票时间数据获取完成")
|
||||
err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("生成发票失败"))
|
||||
return
|
||||
}
|
||||
|
||||
//购买套餐
|
||||
switch orderLimit.Type {
|
||||
case common.OrderTypePackage:
|
||||
@ -742,9 +669,6 @@ func AntomWebhook(c *gin.Context) {
|
||||
service.Error(c, errors.New("无效的订单类型"))
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
_, _ = service.CastProvider.Tools(context.Background(), &cast.ToolsReq{Action: "artistOrderInfo", ArtistUuid: fmt.Sprint(orderLimit.UserId)})
|
||||
}()
|
||||
var timeUnit uint32
|
||||
switch orderLimit.Unit {
|
||||
case "天":
|
||||
@ -768,15 +692,11 @@ func AntomWebhook(c *gin.Context) {
|
||||
Type: 2, //自行购买
|
||||
OperatorName: orderLimit.UserName,
|
||||
OperatorId: orderLimit.UserId,
|
||||
CompetitiveAdditional: uint32(orderLimit.CompetitiveAdditional), //添加竞品数
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
// 处理媒体账号绑定逻辑
|
||||
handleMediaAccountBinding(orderLimit.UserId, orderLimit.PurchaseType, int(orderLimit.AccountNumber), lastOrderInfo)
|
||||
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
@ -839,291 +759,3 @@ func HomePageRoll(c *gin.Context) {
|
||||
service.Success(c, roll)
|
||||
return
|
||||
}
|
||||
|
||||
func createInvoice(userId, userNum, userName, address, phone, bundleName, orderNo, spec, priceType, totalAmount, transactionDate, invoiceDate, applyTime string) error {
|
||||
// InvoiceInfo 发票信息
|
||||
InvoiceResp, err := service.BundleProvider.GetLastInvoiceNo(context.Background(), &bundle.GetLastInvoiceNoReq{})
|
||||
if err != nil {
|
||||
fmt.Println("获取最后一张发票号码失败:", err)
|
||||
return err
|
||||
}
|
||||
|
||||
lastestInvoiceNo := ""
|
||||
|
||||
if InvoiceResp.LastNo != "" {
|
||||
lastestInvoiceNo = InvoiceResp.LastNo
|
||||
}
|
||||
|
||||
currentInvoiceNo := ""
|
||||
// 获取 lastestInvoiceNo CNY-ART-202501010001的 长度
|
||||
if priceType == "1" {
|
||||
priceType = "CNY"
|
||||
//人民币
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("CNY-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("CNY-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
} else if priceType == "2" {
|
||||
priceType = "USD"
|
||||
//美元
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
} else {
|
||||
//默认美元
|
||||
priceType = "USD"
|
||||
if lastestInvoiceNo == "" {
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s0001", transactionDate)
|
||||
} else {
|
||||
lastestSeq := lastestInvoiceNo[16:]
|
||||
var seqNum int
|
||||
_, err = fmt.Sscanf(lastestSeq, "%d", &seqNum)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
seqNum++
|
||||
currentInvoiceNo = fmt.Sprintf("USD-MDA-%s%04d", transactionDate, seqNum)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("当前发票号码:", currentInvoiceNo)
|
||||
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
transactionDate = payTime.Format("2006-01-02")
|
||||
|
||||
invoiceUrl, err := invoice.MakeInvoice(currentInvoiceNo, userName, address, phone, bundleName, spec, priceType, totalAmount, transactionDate, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("发票生成成功,URL:", invoiceUrl)
|
||||
_, err = service.BundleProvider.CreateInvoice(context.Background(), &bundle.CreateInvoiceReq{
|
||||
UserId: userId,
|
||||
UserNum: userNum,
|
||||
UserName: userName,
|
||||
OrderNo: orderNo,
|
||||
ApplyTime: applyTime,
|
||||
InvoiceType: 1,
|
||||
InvoiceNo: currentInvoiceNo,
|
||||
InvoiceUrl: invoiceUrl,
|
||||
PaperInvocieStatus: 1,
|
||||
Remark: "系统自动生成发票",
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MediaAccount 媒体账号信息
|
||||
type MediaAccount struct {
|
||||
UUID string
|
||||
PlatformID uint32
|
||||
}
|
||||
|
||||
// handleMediaAccountBinding 处理媒体账号绑定逻辑(统一解绑方法)
|
||||
// userId: 用户ID
|
||||
// purchaseType: 购买类型(新购/续费)
|
||||
// currentAccountNum: 本次购买的账号数
|
||||
// lastOrderInfo: 上次订单信息
|
||||
func handleMediaAccountBinding(userId uint64, purchaseType int32, currentAccountNum int, lastOrderInfo *bundle.OrderRecordsDetailResponse) {
|
||||
// 1. 获取用户的媒体账号列表
|
||||
MediaList, err := service.CastProvider.MediaUserList(context.Background(), &castProto.MediaUserListReq{
|
||||
Page: 1,
|
||||
PageSize: 999,
|
||||
ArtistUuid: strconv.FormatUint(userId, 10),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
logger.Warnf("Failed to get media list for user %d: %v", userId, err)
|
||||
return
|
||||
}
|
||||
|
||||
if MediaList == nil || len(MediaList.Data) == 0 {
|
||||
logger.Infof("No media accounts found for user %d", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 2. 收集过期的媒体账号信息(包含平台ID)
|
||||
var expiredAccounts []MediaAccount
|
||||
for _, media := range MediaList.Data {
|
||||
if media.Expired == 1 {
|
||||
expiredAccounts = append(expiredAccounts, MediaAccount{
|
||||
UUID: media.MediaAccountUuid,
|
||||
PlatformID: media.PlatformID,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if len(expiredAccounts) == 0 {
|
||||
logger.Infof("No expired media accounts found for user %d", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 3. 判断是否首次购买
|
||||
isFirstPurchase := lastOrderInfo == nil || lastOrderInfo.OrderRecord == nil || len(lastOrderInfo.OrderRecord.AddInfos) == 0
|
||||
|
||||
// 4. 根据购买类型处理解绑逻辑
|
||||
var accountsToUnbind []string
|
||||
|
||||
if purchaseType == common.NewPurchaseOrder {
|
||||
// 新购订单
|
||||
if isFirstPurchase {
|
||||
logger.Infof("First time purchase for user %d, no need to unbind accounts", userId)
|
||||
return
|
||||
}
|
||||
// 非首次购买的新购:解绑所有过期账号
|
||||
for _, account := range expiredAccounts {
|
||||
accountsToUnbind = append(accountsToUnbind, account.UUID)
|
||||
}
|
||||
logger.Infof("New purchase for user %d, will unbind all %d expired accounts", userId, len(accountsToUnbind))
|
||||
|
||||
} else if purchaseType == common.RenewalOrder {
|
||||
// 续费订单
|
||||
if isFirstPurchase {
|
||||
logger.Infof("No previous order found for renewal user %d, no need to unbind accounts", userId)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取上次购买的账号数
|
||||
var lastAccountNum int
|
||||
for _, addInfo := range lastOrderInfo.OrderRecord.AddInfos {
|
||||
if addInfo.ServiceType == 4 { // ServiceType 4 表示账号服务
|
||||
lastAccountNum += int(addInfo.Num)
|
||||
}
|
||||
}
|
||||
|
||||
logger.Infof("Renewal order for user %d: current=%d, last=%d, expired=%d",
|
||||
userId, currentAccountNum, lastAccountNum, len(expiredAccounts))
|
||||
|
||||
// 如果当前购买数量 >= 上次购买数量,不需要解绑
|
||||
if currentAccountNum >= lastAccountNum {
|
||||
logger.Infof("No need to unbind accounts for renewal user %d: current(%d) >= last(%d)",
|
||||
userId, currentAccountNum, lastAccountNum)
|
||||
return
|
||||
}
|
||||
|
||||
// 当前购买数量 < 上次购买数量,按优先级解绑差额部分
|
||||
needUnbindCount := lastAccountNum - currentAccountNum
|
||||
|
||||
// 定义平台优先级(数字越小优先级越高,优先保留)
|
||||
// TikTok(1) > DM(4) > Bluesky(5) > Instagram(3) > YouTube(2)
|
||||
platformPriority := map[uint32]int{
|
||||
1: 1, // TikTok - 最高优先级,最后解绑
|
||||
4: 2, // DM
|
||||
5: 3, // Bluesky
|
||||
3: 4, // Instagram
|
||||
2: 5, // YouTube - 最低优先级,最先解绑
|
||||
}
|
||||
|
||||
// 按优先级排序(优先级低的排在前面,先解绑)
|
||||
sortedAccounts := make([]MediaAccount, len(expiredAccounts))
|
||||
copy(sortedAccounts, expiredAccounts)
|
||||
|
||||
for i := 0; i < len(sortedAccounts)-1; i++ {
|
||||
for j := 0; j < len(sortedAccounts)-i-1; j++ {
|
||||
priority1 := platformPriority[sortedAccounts[j].PlatformID]
|
||||
priority2 := platformPriority[sortedAccounts[j+1].PlatformID]
|
||||
if priority1 == 0 {
|
||||
priority1 = 999
|
||||
}
|
||||
if priority2 == 0 {
|
||||
priority2 = 999
|
||||
}
|
||||
// 降序排列:优先级数字大的排在前面(先解绑)
|
||||
if priority1 < priority2 {
|
||||
sortedAccounts[j], sortedAccounts[j+1] = sortedAccounts[j+1], sortedAccounts[j]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 取前needUnbindCount个账号进行解绑
|
||||
if needUnbindCount > len(sortedAccounts) {
|
||||
needUnbindCount = len(sortedAccounts)
|
||||
}
|
||||
|
||||
for i := 0; i < needUnbindCount; i++ {
|
||||
accountsToUnbind = append(accountsToUnbind, sortedAccounts[i].UUID)
|
||||
}
|
||||
logger.Infof("Renewal downgrade for user %d, will unbind %d accounts by priority", userId, len(accountsToUnbind))
|
||||
}
|
||||
|
||||
// 5. 执行解绑操作
|
||||
if len(accountsToUnbind) > 0 {
|
||||
successCount := 0
|
||||
failCount := 0
|
||||
for _, accountUUID := range accountsToUnbind {
|
||||
if _, err := service.CastProvider.UpdateMediaAccInfo(context.Background(), &castProto.UpdateMediaAccInfoReq{
|
||||
MediaAccountUuid: accountUUID,
|
||||
Expired: 2,
|
||||
ExpiredSource: castProto.ExpiredMediaSourceENUM_UpdateMediaSource_CHARGE,
|
||||
}); err != nil {
|
||||
logger.Errorf("Failed to unbind account %s for user %d: %v", accountUUID, userId, err)
|
||||
failCount++
|
||||
} else {
|
||||
successCount++
|
||||
}
|
||||
}
|
||||
logger.Infof("Unbind completed for user %d: success=%d, fail=%d", userId, successCount, failCount)
|
||||
}
|
||||
}
|
||||
func createDownloadInvoice(userId, userNum, userName, address, phone, bundleName, orderNo, spec, priceType, totalAmount, transactionDate, invoiceDate, applyTime string) (string, error) {
|
||||
// InvoiceInfo 发票信息
|
||||
|
||||
currentInvoiceNo := ""
|
||||
// 获取 lastestInvoiceNo CNY-ART-202501010001的 长度
|
||||
InvoiceInfo, err := service.BundleProvider.GetInvoiceInfoByOrderNo(context.Background(), &bundle.GetInvoiceInfoByOrderNoReq{
|
||||
UserId: userId,
|
||||
OrderNo: orderNo,
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if InvoiceInfo.Data[0].InvoiceNo != "" {
|
||||
currentInvoiceNo = InvoiceInfo.Data[0].InvoiceNo
|
||||
} else {
|
||||
fmt.Println("获取发票号码失败:没有找到发票号码")
|
||||
return "", errors.New("获取发票号码失败:没有找到发票号码")
|
||||
}
|
||||
|
||||
if priceType == "1" {
|
||||
priceType = "CNY"
|
||||
} else if priceType == "2" {
|
||||
priceType = "USD"
|
||||
} else {
|
||||
priceType = "USD"
|
||||
}
|
||||
|
||||
fmt.Println("当前发票号码:", currentInvoiceNo)
|
||||
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
transactionDate = payTime.Format("2006-01-02")
|
||||
invoiceDate = time.Now().Format("2006-01-02")
|
||||
|
||||
invoiceUrl, err := invoice.MakeInvoice(currentInvoiceNo, userName, address, phone, bundleName, spec, priceType, totalAmount, transactionDate, invoiceDate)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
fmt.Println("发票生成成功,URL:", invoiceUrl)
|
||||
|
||||
return invoiceUrl, nil
|
||||
}
|
||||
|
||||
@ -1,136 +0,0 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/model"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
m "fonchain-fiee/pkg/model"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func IsSendSurvey(c *gin.Context) {
|
||||
var req bundle.SendQuestionnaireSurveyRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.SendQuestionnaireSurvey(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func QuestionnaireSurveyList(c *gin.Context) {
|
||||
var req bundle.GetQuestionnaireSurveyListRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetQuestionnaireSurveyList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func QuestionnaireSurveyBundleInfo(c *gin.Context) {
|
||||
var req bundle.GetQuestionnaireSurveyInfoRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.BundleProvider.GetQuestionnaireSurveyInfo(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func QuestionnaireSurveyCreate(c *gin.Context) {
|
||||
var req bundle.CreateQuestionnaireSurveyAnswerRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
ip := c.ClientIP()
|
||||
address, err := utils.GetAddressByIP(ip)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("获取地址失败"))
|
||||
return
|
||||
}
|
||||
//if req.Longitude == "" || req.Latitude == "" {
|
||||
// service.Error(c, errors.New("获取定位失败"))
|
||||
// return
|
||||
//}
|
||||
//address, err := utils.ReverseGeo(req.Longitude, req.Latitude, "ZhCN")
|
||||
//if err != nil {
|
||||
// service.Error(c, errors.New("获取地址失败"))
|
||||
// return
|
||||
//}
|
||||
surveyInfo, err := service.BundleProvider.GetQuestionnaireSurveyInfo(c, &bundle.GetQuestionnaireSurveyInfoRequest{UserTel: req.UserTel})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
templateDir := "./data/满意度调成报告模板.pdf"
|
||||
outputPath := m.MediaPath + "questionnaire_" + uuid.NewString() + ".pdf"
|
||||
err = utils.QuestionnaireSurveyPDF(templateDir, outputPath, &model.QuestionnairePDFData{
|
||||
//CustomerNum: surveyInfo.BundleInfo.,
|
||||
CustomerName: surveyInfo.UserName,
|
||||
BundleName: surveyInfo.BundleInfo.BundleName,
|
||||
BundleStartDate: surveyInfo.BundleInfo.StartAt,
|
||||
BundleEndDate: surveyInfo.BundleInfo.ExpiredAt,
|
||||
VideoNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.BundleVideoNumber), 10),
|
||||
AccountNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.BundleAccountNumber), 10),
|
||||
ImagesNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.BundleImageNumber), 10),
|
||||
DataAnalysisNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.BundleDataNumber), 10),
|
||||
CompetitiveNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.BundleCompetitiveNumber), 10),
|
||||
ValueAddVideoNum: strconv.FormatInt(int64(surveyInfo.BundleInfo.IncreaseVideoNumber), 10),
|
||||
Score1: int(req.SurveyAnswer.BundleAccountScore),
|
||||
Score2: int(req.SurveyAnswer.BundleAccountScore),
|
||||
Score3: int(req.SurveyAnswer.BundleImageScore),
|
||||
Score4: int(req.SurveyAnswer.BundleDataScore),
|
||||
Score5: int(req.SurveyAnswer.IncreaseVideoScore),
|
||||
Score6: int(req.SurveyAnswer.ServiceResponseSpeed),
|
||||
Score7: int(req.SurveyAnswer.ServiceStaffProfessionalism),
|
||||
Opinion1: req.SurveyFeedback.MeritsReview,
|
||||
Opinion2: req.SurveyFeedback.SuggestionsorImprovements,
|
||||
Opinion3: req.SurveyFeedback.AdditionalComments,
|
||||
Submitter: surveyInfo.UserName,
|
||||
SubmissionDate: time.Now().Format(time.DateOnly),
|
||||
Address: address,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
outputUrl, ossErr := upload.PutBos(outputPath, upload.PdfType, true)
|
||||
|
||||
if ossErr != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
//service.Success(c, outputUrl)
|
||||
//return
|
||||
req.SurveyUrl = outputUrl
|
||||
res, err := service.BundleProvider.CreateQuestionnaireSurveyAnswer(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
}
|
||||
@ -366,7 +366,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
ValueUid: accountUuid,
|
||||
CurrencyType: 2, //美元
|
||||
Amount: 0, //增值服务金额
|
||||
Num: 5,
|
||||
Num: 3,
|
||||
Unit: "个",
|
||||
Source: 1,
|
||||
PaymentStatus: 1,
|
||||
@ -390,8 +390,8 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
||||
contract := ContractUrl
|
||||
expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02")
|
||||
startDate := t.Format("2006-01-02")
|
||||
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay, unfinishInfo.UserName, unfinishInfo.CardNum, unfinishInfo.PlaceOfResidence, startDate)
|
||||
|
||||
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay, unfinishInfo.UserName, unfinishInfo.CardNum, unfinishInfo.PlaceOfResidence)
|
||||
if signContractErr != nil {
|
||||
service.Error(c, signContractErr)
|
||||
return
|
||||
@ -418,8 +418,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
orderReq.OrderNo = unfinishInfo.OrderNo
|
||||
//expirationTime := t.AddDate(10, 0, 0).Format("2006-01-02 15:04:05")
|
||||
//orderReq.ExpirationTime = expirationTime
|
||||
orderReq.PlatformIds = []uint32{1, 4, 5}
|
||||
orderReq.PurchaseType = common.NewPurchaseOrder
|
||||
_, err = service.BundleProvider.CreateOrderRecord(context.Background(), &orderReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -492,26 +490,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
//生成发票
|
||||
orderRecord, err := service.BundleProvider.GetOrderInfoByOrderNo(context.Background(), &bundle.GetOrderInfoByOrderNoReq{
|
||||
OrderNo: unfinishInfo.OrderNo, //因为需求更新,实际传入的是订单的uuid
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
amountType := strconv.FormatInt(orderRecord.AmountType, 10)
|
||||
applyTime := unfinishInfo.PayTime
|
||||
payTime, _ := time.Parse("2006-01-02 15:04:05", applyTime)
|
||||
payTimeString := payTime.Format("20060102")
|
||||
fmt.Println("发票payTimeString :", payTimeString, "发票applyTime :", applyTime, "发票payTime :", payTime)
|
||||
fmt.Println("发票时间数据获取完成")
|
||||
err = createInvoice(orderRecord.UserId, orderRecord.UserNum, orderRecord.UserName, orderRecord.Address, orderRecord.Phone, orderRecord.BundleName, orderRecord.OrderNo, "1", amountType, orderRecord.TotalAmount, payTimeString, payTimeString, applyTime)
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("生成发票失败"))
|
||||
return
|
||||
}
|
||||
|
||||
//如果是购买套餐 1:创建新的余量信息CreateBundleBalance 2 添加扩展记录BundleExtend
|
||||
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||
UserId: int32(userResp.UserId),
|
||||
|
||||
@ -1,37 +1,26 @@
|
||||
package cast
|
||||
package cast
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/aryshare"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/common/qwen"
|
||||
"fonchain-fiee/pkg/e"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
modelQwen "fonchain-fiee/pkg/model/qwen"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"math/rand"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/xuri/excelize/v2"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -43,7 +32,17 @@ func CreateWorkAnalysis(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := CreateWorkAnalysisCore(ctx, req)
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
artistID, _ := strconv.ParseUint(req.ArtistID, 10, 64)
|
||||
if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeDataValue); err != nil {
|
||||
if err != nil && err.Error() == e.ErrorBalanceInsufficient {
|
||||
service.Error(ctx, errors.New("该艺人数据可用次数为0"))
|
||||
return
|
||||
}
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.CreateWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
@ -52,350 +51,6 @@ func CreateWorkAnalysis(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
func CreateWorkAnalysisCore(ctx *gin.Context, req *cast.CreateWorkAnalysisReq) (*cast.CreateWorkAnalysisResp, error) {
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
if req.SubNum == "" {
|
||||
return nil, errors.New("艺人编号不能为空")
|
||||
}
|
||||
// 根据 subNum 查询艺人 artistUuid
|
||||
subInfoResp, err := service.AccountFieeProvider.SubNumGetInfo(context.Background(), &accountFiee.SubNumGetInfoRequest{
|
||||
SubNum: req.SubNum,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("AccountFieeProvider.SubNumGetInfo", zap.Error(err), zap.String("subNum", req.SubNum))
|
||||
return nil, errors.New("自媒体用户查询失败")
|
||||
}
|
||||
if subInfoResp == nil || subInfoResp.Id == 0 {
|
||||
return nil, errors.New("自媒体用户不存在")
|
||||
}
|
||||
|
||||
req.ArtistID = fmt.Sprint(subInfoResp.Id)
|
||||
req.ArtistName = subInfoResp.Name
|
||||
req.ArtistPhone = subInfoResp.TelNum
|
||||
|
||||
artistID := uint64(subInfoResp.Id)
|
||||
if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeDataValue); err != nil {
|
||||
if err.Error() == e.ErrorBalanceInsufficient {
|
||||
return nil, errors.New("该艺人数据可用次数为0")
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: int32(artistID)})
|
||||
if err != nil {
|
||||
zap.L().Error("GetBundleBalanceByUserId", zap.Error(err), zap.Uint64("artistID", artistID))
|
||||
return nil, errors.New("获取套餐订单失败")
|
||||
}
|
||||
if resp1.OrderUUID == "" {
|
||||
return nil, errors.New("订单不存在")
|
||||
}
|
||||
req.BundleOrderUuid = resp1.OrderUUID
|
||||
resp, err := service.CastProvider.CreateWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// ImportWorkAnalysisBatch 通过 Excel 批量导入数据分析
|
||||
// Excel 列顺序:SubNum | ArtistName | SubmitTime | PeriodTypeFans | PeriodTypeViews | PeriodTypeLikes | PeriodTypeComments | PeriodTypeShares | IsRefreshData(1=false,2=true)
|
||||
func ImportWorkAnalysisBatch(ctx *gin.Context) {
|
||||
excelFile, err := ctx.FormFile("file")
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
loginInfo := login.GetUserInfoFromC(ctx)
|
||||
lockKey := fmt.Sprintf("import_work_analysis_batch:%d", loginInfo.ID)
|
||||
replay := cache.RedisClient.SetNX(lockKey, time.Now().Format("20060102150405"), 5*time.Minute)
|
||||
if !replay.Val() {
|
||||
service.Error(ctx, errors.New("有导入任务正在进行,请稍后再试"))
|
||||
return
|
||||
}
|
||||
defer cache.RedisClient.Del(lockKey)
|
||||
|
||||
tempDir := "./runtime/report_pdf"
|
||||
_, err = utils.CheckDirPath(tempDir, true)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
fileName := fmt.Sprintf("%d_work_analysis.xlsx", time.Now().UnixMicro())
|
||||
excelPath := filepath.Join(tempDir, fileName)
|
||||
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
|
||||
// 写入表头
|
||||
_ = excelData.SetCellValue("Sheet1", "J1", "DateInt")
|
||||
_ = excelData.SetCellValue("Sheet1", "K1", "ConfirmType")
|
||||
_ = excelData.SetCellValue("Sheet1", "L1", "结果")
|
||||
|
||||
successCount := 0
|
||||
|
||||
for line, row := range rows {
|
||||
if line == 0 {
|
||||
continue // 跳过表头
|
||||
}
|
||||
if len(row) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Excel 行号(1-based),line=1 → 行号 2
|
||||
cellL := fmt.Sprintf("L%d", line+1)
|
||||
|
||||
// 第一列:SubNum
|
||||
subNum := ""
|
||||
if len(row) > 0 {
|
||||
subNum = utils.CleanString(row[0])
|
||||
}
|
||||
if subNum == "" {
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, "SubNum 不能为空")
|
||||
continue
|
||||
}
|
||||
|
||||
// 第二列:ArtistName
|
||||
artistName := ""
|
||||
if len(row) > 1 {
|
||||
artistName = utils.CleanString(row[1])
|
||||
}
|
||||
|
||||
// 第三列:SubmitTime
|
||||
submitTime := ""
|
||||
if len(row) > 2 {
|
||||
submitTime = row[2]
|
||||
}
|
||||
|
||||
// 第四列:PeriodTypeFans
|
||||
var periodTypeFans uint32
|
||||
if len(row) > 3 && utils.CleanString(row[3]) != "" {
|
||||
v, _ := strconv.ParseUint(utils.CleanString(row[3]), 10, 32)
|
||||
periodTypeFans = uint32(v)
|
||||
}
|
||||
|
||||
// 第五列:PeriodTypeViews
|
||||
var periodTypeViews uint32
|
||||
if len(row) > 4 && utils.CleanString(row[4]) != "" {
|
||||
v, _ := strconv.ParseUint(utils.CleanString(row[4]), 10, 32)
|
||||
periodTypeViews = uint32(v)
|
||||
}
|
||||
|
||||
// 第六列:PeriodTypeLikes
|
||||
var periodTypeLikes uint32
|
||||
if len(row) > 5 && utils.CleanString(row[5]) != "" {
|
||||
v, _ := strconv.ParseUint(utils.CleanString(row[5]), 10, 32)
|
||||
periodTypeLikes = uint32(v)
|
||||
}
|
||||
|
||||
// 第七列:PeriodTypeComments
|
||||
var periodTypeComments uint32
|
||||
if len(row) > 6 && utils.CleanString(row[6]) != "" {
|
||||
v, _ := strconv.ParseUint(utils.CleanString(row[6]), 10, 32)
|
||||
periodTypeComments = uint32(v)
|
||||
}
|
||||
|
||||
// 第八列:PeriodTypeShares
|
||||
var periodTypeShares uint32
|
||||
if len(row) > 7 && utils.CleanString(row[7]) != "" {
|
||||
v, _ := strconv.ParseUint(utils.CleanString(row[7]), 10, 32)
|
||||
periodTypeShares = uint32(v)
|
||||
}
|
||||
|
||||
// 第九列:IsRefreshData(1 → false, 2 → true)
|
||||
isRefreshData := false
|
||||
if len(row) > 8 && utils.CleanString(row[8]) == "2" {
|
||||
isRefreshData = true
|
||||
}
|
||||
|
||||
// 第十列:DateInt(YYYYMMDD 格式,直接从 Excel 读取)
|
||||
var dateInt int32
|
||||
if len(row) > 9 && utils.CleanString(row[9]) != "" {
|
||||
v, _ := strconv.ParseInt(utils.CleanString(row[9]), 10, 32)
|
||||
dateInt = int32(v)
|
||||
}
|
||||
|
||||
// 第十一列:ConfirmType(1 艺人确认,2 系统自动确认)
|
||||
var confirmType int32
|
||||
if len(row) > 10 && utils.CleanString(row[10]) != "" {
|
||||
v, _ := strconv.ParseInt(utils.CleanString(row[10]), 10, 32)
|
||||
confirmType = int32(v)
|
||||
}
|
||||
|
||||
// 根据 subNum 查询艺人信息
|
||||
subInfoResp, err := service.AccountFieeProvider.SubNumGetInfo(context.Background(), &accountFiee.SubNumGetInfoRequest{
|
||||
SubNum: subNum,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("ImportWorkAnalysisBatch SubNumGetInfo", zap.Error(err), zap.String("subNum", subNum))
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, fmt.Sprintf("自媒体用户查询失败:%s", err.Error()))
|
||||
continue
|
||||
}
|
||||
if subInfoResp == nil || subInfoResp.Id == 0 {
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, "自媒体用户不存在")
|
||||
continue
|
||||
}
|
||||
|
||||
artistID := uint64(subInfoResp.Id)
|
||||
|
||||
// 查询艺人套餐订单
|
||||
balanceResp, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(artistID),
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("ImportWorkAnalysisBatch GetBundleBalanceByUserId", zap.Error(err), zap.Uint64("artistID", artistID))
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, fmt.Sprintf("获取套餐订单失败:%s", err.Error()))
|
||||
continue
|
||||
}
|
||||
if balanceResp.OrderUUID == "" {
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, "订单不存在")
|
||||
continue
|
||||
}
|
||||
|
||||
// 若 artistName 为空则使用账号服务中的姓名
|
||||
if artistName == "" {
|
||||
artistName = subInfoResp.Name
|
||||
}
|
||||
|
||||
// 将 submitTime(YYYY-MM-DD 00:00:00)加随机 9~15 小时、0~59 分钟、0~59 秒,使提交时间更真实
|
||||
if submitTime != "" {
|
||||
if parsedTime, parseErr := time.Parse("2006-01-02 15:04:05", submitTime); parseErr == nil {
|
||||
randomDuration := time.Duration(rand.Intn(7)+9)*time.Hour +
|
||||
time.Duration(rand.Intn(60))*time.Minute +
|
||||
time.Duration(rand.Intn(60))*time.Second
|
||||
submitTime = parsedTime.Add(randomDuration).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
|
||||
// 提升到外部作用域,供 importReq 使用
|
||||
var aiAnalysis string
|
||||
var mediaAccountCount int32
|
||||
var workVideoCount, workImageCount int32
|
||||
|
||||
// 调用 ArtistMetricsSeries 获取艺人指标数据并写入 Analysis
|
||||
metricsReq := &cast.ArtistMetricsSeriesReq{
|
||||
ArtistUUID: fmt.Sprint(subInfoResp.Id),
|
||||
Date: dateInt,
|
||||
PeriodTypeFans: periodTypeFans,
|
||||
PeriodTypeViews: periodTypeViews,
|
||||
PeriodTypeLikes: periodTypeLikes,
|
||||
PeriodTypeComments: periodTypeComments,
|
||||
PeriodTypeShares: periodTypeShares,
|
||||
}
|
||||
|
||||
// 并行调用 ArtistMetricsSeries 和 GetArtistWorkStats
|
||||
var metricsResp *cast.ArtistMetricsSeriesResp
|
||||
var workStatsResp *cast.GetArtistWorkStatsResp
|
||||
var metricsErr, workStatsErr error
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(2)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
metricsResp, metricsErr = service.CastProvider.ArtistMetricsSeries(context.Background(), metricsReq)
|
||||
}()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
workStatsResp, workStatsErr = service.CastProvider.GetArtistWorkStats(newCtx, &cast.GetArtistWorkStatsReq{
|
||||
ArtistUuid: fmt.Sprint(subInfoResp.Id),
|
||||
StatusUpdateTime: submitTime,
|
||||
})
|
||||
}()
|
||||
wg.Wait()
|
||||
|
||||
if workStatsErr == nil && workStatsResp != nil {
|
||||
mediaAccountCount = int32(workStatsResp.AccountCount)
|
||||
workVideoCount = int32(workStatsResp.VideoCount)
|
||||
workImageCount = int32(workStatsResp.ImageCount)
|
||||
} else if workStatsErr != nil {
|
||||
zap.L().Warn("ImportWorkAnalysisBatch GetArtistWorkStats failed", zap.Error(workStatsErr), zap.String("subNum", subNum))
|
||||
}
|
||||
|
||||
if metricsErr != nil {
|
||||
zap.L().Warn("ImportWorkAnalysisBatch ArtistMetricsSeries failed", zap.Error(metricsErr), zap.String("subNum", subNum))
|
||||
} else if metricsResp != nil {
|
||||
// 构建与 ArtistMetricsSeries HTTP 接口相同的 respMap
|
||||
raw, _ := json.Marshal(metricsResp)
|
||||
respMap := make(map[string]interface{})
|
||||
_ = json.Unmarshal(raw, &respMap)
|
||||
respMap["accountConsumptionNumber"] = mediaAccountCount
|
||||
respMap["videoCount"] = workVideoCount
|
||||
respMap["imageCount"] = workImageCount
|
||||
|
||||
// 调用 AI 生成分析文本
|
||||
aiAnalysis, _ = generateArtistMetricsAnalysis(metricsResp)
|
||||
if aiAnalysis == "" {
|
||||
zap.L().Warn("ImportWorkAnalysisBatch generateArtistMetricsAnalysis returned empty", zap.String("subNum", subNum))
|
||||
}
|
||||
respMap["analysis"] = aiAnalysis
|
||||
}
|
||||
|
||||
importReq := &cast.ImportWorkAnalysisReq{
|
||||
SubNum: subNum,
|
||||
ArtistID: fmt.Sprint(subInfoResp.Id),
|
||||
ArtistName: artistName,
|
||||
ArtistPhone: subInfoResp.TelNum,
|
||||
BundleOrderUuid: balanceResp.OrderUUID,
|
||||
SubmitTime: submitTime,
|
||||
PeriodTypeFans: periodTypeFans,
|
||||
PeriodTypeViews: periodTypeViews,
|
||||
PeriodTypeLikes: periodTypeLikes,
|
||||
PeriodTypeComments: periodTypeComments,
|
||||
PeriodTypeShares: periodTypeShares,
|
||||
IsRefreshData: isRefreshData,
|
||||
Analysis: aiAnalysis,
|
||||
MediaAccountCount: mediaAccountCount,
|
||||
WorkVideoCount: workVideoCount,
|
||||
WorkImageCount: workImageCount,
|
||||
Views: 1,
|
||||
Likes: 1,
|
||||
Comments: 1,
|
||||
Shares: 1,
|
||||
FansCount: 1,
|
||||
MostActiveDay: 1,
|
||||
BestPostTime: 1,
|
||||
Date: dateInt,
|
||||
ConfirmType: confirmType,
|
||||
}
|
||||
|
||||
importResp, err := service.CastProvider.ImportWorkAnalysis(newCtx, importReq)
|
||||
if err != nil {
|
||||
zap.L().Error("ImportWorkAnalysisBatch ImportWorkAnalysis", zap.Error(err), zap.String("subNum", subNum))
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, fmt.Sprintf("导入失败:%s", err.Error()))
|
||||
continue
|
||||
}
|
||||
|
||||
// 导入成功,将返回的 UUID 写入 L 列
|
||||
_ = excelData.SetCellValue("Sheet1", cellL, importResp.Uuid)
|
||||
successCount++
|
||||
}
|
||||
|
||||
// 将修改后的 Excel 写入 buffer 并返回给客户端下载
|
||||
buf, err := excelData.WriteToBuffer()
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
utils.ResponseXls(ctx, bytes.NewReader(buf.Bytes()), fmt.Sprintf("数据分析导入结果_%d成功", successCount))
|
||||
}
|
||||
|
||||
// UpdateWorkAnalysis 更新作品分析
|
||||
func UpdateWorkAnalysis(ctx *gin.Context) {
|
||||
var req *cast.UpdateWorkAnalysisReq
|
||||
@ -405,17 +60,6 @@ func UpdateWorkAnalysis(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
artistID, _ := strconv.ParseUint(req.ArtistUUID, 10, 64)
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: int32(artistID)})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if resp1.OrderUUID == "" {
|
||||
service.Error(ctx, errors.New("订单不存在"))
|
||||
return
|
||||
}
|
||||
req.BundleOrderUuid = resp1.OrderUUID
|
||||
_, err = service.CastProvider.UpdateWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
@ -494,59 +138,7 @@ func ListWorkAnalysis(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
// ListWorkAnalysis 获取作品分析列表
|
||||
func ListWorkAnalysisForApp(ctx *gin.Context) {
|
||||
var req *cast.ListWorkAnalysisReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
loginInfo := login.GetUserInfoFromC(ctx)
|
||||
// 查询用户套餐有没有过期
|
||||
balanceInfoRes, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(loginInfo.ID),
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("ListWorkAnalysisForApp GetBundleBalanceByUserId", zap.Any("err", err))
|
||||
service.Error(ctx, errors.New(common.GetUserBalanceFailed))
|
||||
return
|
||||
}
|
||||
// 套餐未过期的话,传入 subNum ,只获取该套餐的有效期内数据
|
||||
if balanceInfoRes.BundleStatus == common.BundleNotExpired {
|
||||
zap.L().Info("ListWorkAnalysisForApp BundleNotExpired", zap.Any("loginInfo", loginInfo))
|
||||
// 调用GetBundleBalanceByOrderUUID接口
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByOrderUUID(context.Background(), &bundle.GetBundleBalanceByOrderUUIDReq{OrderUUID: balanceInfoRes.OrderUUID})
|
||||
if err != nil {
|
||||
err = errors.New("获取最初非续费订单失败")
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
fmt.Println("resp1", resp1)
|
||||
req.SubmitStartTime = time.Unix(resp1.StartTime, 0).Format("2006-01-02 15:04:05")
|
||||
req.SubmitEndTime = time.UnixMilli(balanceInfoRes.ExpiredTime).Format("2006-01-02 15:04:05")
|
||||
if resp1.Status == 1 {
|
||||
// 说明查询失败,采用当前套餐的开始时间
|
||||
req.SubmitStartTime = time.UnixMilli(balanceInfoRes.StartTime).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
req.SubmitStartTime = time.UnixMilli(balanceInfoRes.StartTime).Format("2006-01-02 15:04:05")
|
||||
req.SubmitEndTime = time.UnixMilli(balanceInfoRes.ExpiredTime).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
resp, err := service.CastProvider.ListWorkAnalysis(newCtx, req)
|
||||
if err != nil {
|
||||
zap.L().Error("ListWorkAnalysisForApp ListWorkAnalysis", zap.Any("err", err))
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
RefreshWorkAnalysisApproval(ctx, resp.Data)
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
@ -589,7 +181,7 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
for _, v := range approvalIDs {
|
||||
newData[v] = data[v]
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx, "业务部门")
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
if len(newData) > 0 {
|
||||
for approvalId, v := range newData {
|
||||
if v.ID == 0 {
|
||||
@ -598,13 +190,11 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
Uuid: approvalIDAnalysisUuidMap[approvalId],
|
||||
ApprovalID: fmt.Sprint(approvalId),
|
||||
ApprovalReply: "",
|
||||
ApprovalTime: v.UpdatedAt,
|
||||
})
|
||||
continue
|
||||
}
|
||||
var workAction cast.WorkActionENUM
|
||||
uTimes, _ := stime.DatetimeToTimes(v.UpdatedAt, "2006-01-02 15:04:05")
|
||||
if v.Status == 2 && int64(uTimes) <= time.Now().Unix() {
|
||||
if v.Status == 2 {
|
||||
workAction = cast.WorkActionENUM_APPROVAL_PASS
|
||||
} else if v.Status == 3 {
|
||||
workAction = cast.WorkActionENUM_APPROVAL_REJECT
|
||||
@ -616,7 +206,6 @@ func RefreshWorkAnalysisApprovalStatus(ctx *gin.Context, approvalIDAnalysisUuidM
|
||||
Uuid: approvalIDAnalysisUuidMap[approvalId],
|
||||
ApprovalID: fmt.Sprint(approvalId),
|
||||
ApprovalReply: v.Reply,
|
||||
ApprovalTime: v.UpdatedAt,
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -638,13 +227,6 @@ func DeleteWorkAnalysis(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if service.BundleProvider != nil {
|
||||
if _, e := service.BundleProvider.RevertTaskCompletionByUUIDItem(context.Background(), &bundle.RevertTaskCompletionByUUIDItemRequest{Uuid: req.Uuid}); e != nil {
|
||||
zap.L().Error("回撤数量失败", zap.Error(e))
|
||||
}
|
||||
} else {
|
||||
zap.L().Warn("BundleProvider is nil, skipping RevertTaskCompletionByUUIDItem")
|
||||
}
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
@ -838,204 +420,16 @@ func ArtistMetricsSeries(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if req.ArtistUUID == "" {
|
||||
service.Error(ctx, errors.New("参数错误"))
|
||||
return
|
||||
}
|
||||
|
||||
subNum := ""
|
||||
if strings.HasPrefix(strings.ToUpper(req.ArtistUUID), "FE") {
|
||||
subNum = req.ArtistUUID
|
||||
} else {
|
||||
artistID, err := strconv.ParseUint(req.ArtistUUID, 10, 64)
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New("艺人编号格式不正确"))
|
||||
return
|
||||
}
|
||||
infoResp, err := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
ID: artistID,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, errors.New("自媒体用户查询失败"))
|
||||
return
|
||||
}
|
||||
if infoResp == nil || infoResp.SubNum == "" {
|
||||
service.Error(ctx, errors.New("自媒体用户不存在"))
|
||||
return
|
||||
}
|
||||
subNum = infoResp.SubNum
|
||||
}
|
||||
|
||||
var subInfoResp *accountFiee.UserInfoResponse
|
||||
var subInfoErr error
|
||||
var workStatsResp *cast.GetArtistWorkStatsResp
|
||||
var metricsResp *cast.ArtistMetricsSeriesResp
|
||||
var workStatsErr, metricsErr error
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(2)
|
||||
|
||||
// 并行调用 SubNumGetInfo、ArtistMetricsSeries
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
subInfoResp, subInfoErr = service.AccountFieeProvider.SubNumGetInfo(context.Background(), &accountFiee.SubNumGetInfoRequest{
|
||||
SubNum: subNum,
|
||||
Domain: "app",
|
||||
})
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
metricsResp, metricsErr = service.CastProvider.ArtistMetricsSeries(context.Background(), req)
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
|
||||
if subInfoErr != nil {
|
||||
service.Error(ctx, errors.New("自媒体用户查询失败"))
|
||||
return
|
||||
}
|
||||
if subInfoResp == nil || subInfoResp.Id == 0 {
|
||||
service.Error(ctx, errors.New("自媒体用户不存在"))
|
||||
return
|
||||
}
|
||||
req.ArtistUUID = fmt.Sprint(subInfoResp.Id)
|
||||
|
||||
// 将 ArtistMetricsSeriesReq 中 int 类型日期(YYYYMMDD)格式化为时间字符串,作为快照截止时间
|
||||
statusUpdateTime := ""
|
||||
if req.Date > 0 {
|
||||
parsedDate, parseErr := time.Parse("20060102", strconv.Itoa(int(req.Date)))
|
||||
if parseErr == nil {
|
||||
statusUpdateTime = parsedDate.Add(17 * time.Hour).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
workStatsResp, workStatsErr = service.CastProvider.GetArtistWorkStats(newCtx, &cast.GetArtistWorkStatsReq{
|
||||
ArtistUuid: req.ArtistUUID,
|
||||
StatusUpdateTime: statusUpdateTime,
|
||||
})
|
||||
|
||||
var accountConsumptionNumber int32
|
||||
var videoCount int64
|
||||
var imageCount int64
|
||||
if workStatsErr == nil && workStatsResp != nil {
|
||||
accountConsumptionNumber = int32(workStatsResp.AccountCount)
|
||||
videoCount = workStatsResp.VideoCount
|
||||
imageCount = workStatsResp.ImageCount
|
||||
} else if workStatsErr != nil {
|
||||
zap.L().Warn("GetArtistWorkStats failed", zap.Error(workStatsErr), zap.String("artistUUID", req.ArtistUUID), zap.String("statusUpdateTime", statusUpdateTime))
|
||||
}
|
||||
|
||||
if metricsErr != nil {
|
||||
service.Error(ctx, errors.New("查询失败"))
|
||||
resp, err := service.CastProvider.ArtistMetricsSeries(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp := metricsResp
|
||||
|
||||
raw, _ := json.Marshal(resp)
|
||||
respMap := make(map[string]interface{})
|
||||
_ = json.Unmarshal(raw, &respMap)
|
||||
respMap["accountConsumptionNumber"] = accountConsumptionNumber
|
||||
respMap["videoCount"] = videoCount
|
||||
respMap["imageCount"] = imageCount
|
||||
|
||||
// 调用 AI 分析数据
|
||||
analysis, err := generateArtistMetricsAnalysis(resp)
|
||||
if err != nil {
|
||||
zap.L().Error("生成艺人指标分析失败", zap.Error(err))
|
||||
// AI 分析失败不影响主业务,返回空字符串
|
||||
respMap["analysis"] = ""
|
||||
} else {
|
||||
respMap["analysis"] = analysis
|
||||
}
|
||||
|
||||
service.Success(ctx, respMap)
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
// generateArtistMetricsAnalysis 调用 AI 分析艺人指标数据
|
||||
func generateArtistMetricsAnalysis(resp *cast.ArtistMetricsSeriesResp) (string, error) {
|
||||
if resp == nil {
|
||||
return "", errors.New("数据为空")
|
||||
}
|
||||
|
||||
// 构建分析用的数据摘要
|
||||
var dataSummary strings.Builder
|
||||
dataSummary.WriteString("艺人各平台数据表现如下:\n")
|
||||
|
||||
// 粉丝数
|
||||
if resp.FansSeries != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("粉丝数总数: %d (周期类型: %d, 开始日期: %d, 结束日期: %d)\n",
|
||||
resp.FansSeries.FansCount, resp.FansSeries.PeriodType, resp.FansSeries.StartDate, resp.FansSeries.EndDate))
|
||||
}
|
||||
|
||||
// 播放量
|
||||
if resp.ViewsSeries != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("播放量总数: %d (周期类型: %d, 开始日期: %d, 结束日期: %d)\n",
|
||||
resp.ViewsSeries.ViewsCount, resp.ViewsSeries.PeriodType, resp.ViewsSeries.StartDate, resp.ViewsSeries.EndDate))
|
||||
}
|
||||
|
||||
// 点赞数
|
||||
if resp.LikesSeries != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("点赞数总数: %d (周期类型: %d, 开始日期: %d, 结束日期: %d)\n",
|
||||
resp.LikesSeries.LikesCount, resp.LikesSeries.PeriodType, resp.LikesSeries.StartDate, resp.LikesSeries.EndDate))
|
||||
}
|
||||
|
||||
// 评论数
|
||||
if resp.CommentsSeries != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("评论数总数: %d (周期类型: %d, 开始日期: %d, 结束日期: %d)\n",
|
||||
resp.CommentsSeries.CommentsCount, resp.CommentsSeries.PeriodType, resp.CommentsSeries.StartDate, resp.CommentsSeries.EndDate))
|
||||
}
|
||||
|
||||
// 分享数
|
||||
if resp.SharesSeries != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("分享数总数: %d (周期类型: %d, 开始日期: %d, 结束日期: %d)\n",
|
||||
resp.SharesSeries.SharesCount, resp.SharesSeries.PeriodType, resp.SharesSeries.StartDate, resp.SharesSeries.EndDate))
|
||||
}
|
||||
|
||||
// 最佳发布时间
|
||||
if resp.BestPostTime != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("最佳发布时间: %s\n", resp.BestPostTime.DetailJSON))
|
||||
}
|
||||
|
||||
// 最活跃日期
|
||||
if resp.MostActiveDay != nil {
|
||||
dataSummary.WriteString(fmt.Sprintf("最活跃日期: %s\n", resp.MostActiveDay.DetailJSON))
|
||||
}
|
||||
|
||||
// 构建 prompt
|
||||
prompt := fmt.Sprintf(`根据以下艺人各平台运营数据分析各平台数据表现,结合相关数据简要表述优点,文字内容在150-200字之间(标点符号不计入字数,回复时不需要返回具体字数)。注意:回复时请使用平台名称,如TIKTOK、INS等而非数字。重要:不要逐一列举所有平台名称,只需提及有亮点的平台即可:\n%s`, dataSummary.String())
|
||||
|
||||
// 调用 AI
|
||||
req := modelQwen.ChatRequest{
|
||||
Model: "qwen-plus",
|
||||
Messages: []modelQwen.Message{
|
||||
{
|
||||
Role: "user",
|
||||
Content: []modelQwen.Content{
|
||||
{
|
||||
Type: "text",
|
||||
Text: prompt,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
respAI, err := qwen.Chat(req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if respAI == nil || len(respAI.Choices) == 0 {
|
||||
return "", errors.New("AI 返回结果为空")
|
||||
}
|
||||
|
||||
return respAI.Choices[0].Message.Content, nil
|
||||
}
|
||||
|
||||
// ArtistMetricsDailyWindow 艺人指标日窗口
|
||||
func ArtistMetricsDailyWindow(ctx *gin.Context) {
|
||||
var req *cast.ArtistMetricsDailyWindowReq
|
||||
@ -1065,39 +459,6 @@ func TobeConfirmedList(ctx *gin.Context) {
|
||||
userInfo := login.GetUserInfoFromC(ctx)
|
||||
req.ArtistUuid = strconv.Itoa(int(userInfo.ID))
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
loginInfo := login.GetUserInfoFromC(ctx)
|
||||
// 查询用户套餐有没有过期
|
||||
balanceInfoRes, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{
|
||||
UserId: int32(loginInfo.ID),
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("TobeConfirmedList GetBundleBalanceByUserId", zap.Any("err", err))
|
||||
service.Error(ctx, errors.New(common.GetUserBalanceFailed))
|
||||
return
|
||||
}
|
||||
// 套餐未过期的话,获取套餐的开始时间和结束时间
|
||||
if balanceInfoRes.BundleStatus == common.BundleNotExpired {
|
||||
zap.L().Info("TobeConfirmedList BundleNotExpired", zap.Any("loginInfo", loginInfo))
|
||||
// 调用GetBundleBalanceByOrderUUID接口
|
||||
resp1, err := service.BundleProvider.GetBundleBalanceByOrderUUID(context.Background(), &bundle.GetBundleBalanceByOrderUUIDReq{OrderUUID: balanceInfoRes.OrderUUID})
|
||||
if err != nil {
|
||||
err = errors.New("获取最初非续费订单失败")
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
fmt.Println("resp1", resp1)
|
||||
req.StartAt = time.Unix(resp1.StartTime, 0).Format("2006-01-02 15:04:05")
|
||||
req.ExpiredAt = time.UnixMilli(balanceInfoRes.ExpiredTime).Format("2006-01-02 15:04:05")
|
||||
if resp1.Status == 1 {
|
||||
// 说明查询失败,采用当前套餐的开始时间的前两天时间
|
||||
req.StartAt = time.UnixMilli(balanceInfoRes.StartTime - 2*24*60*60*1000).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
// 如果过期的话,获取套餐的开始时间和结束时间
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
req.StartAt = time.UnixMilli(balanceInfoRes.StartTime).Format("2006-01-02 15:04:05")
|
||||
req.ExpiredAt = time.UnixMilli(balanceInfoRes.ExpiredTime).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
resp, err := service.CastProvider.TobeConfirmedList(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
@ -1125,24 +486,6 @@ func UpdateWorkAnalysisApprovalID(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateWorkAnalysisPdfUrl 更新作品分析PDF链接
|
||||
func UpdateWorkAnalysisPdfUrl(ctx *gin.Context) {
|
||||
var req *cast.UpdateWorkAnalysisReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
newCtx := NewCtxWithUserInfo(ctx)
|
||||
_, err = service.CastProvider.UpdateWorkAnalysisPdfUrl(newCtx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
|
||||
type CheckBundleBalanceReq struct {
|
||||
ArtistID string `protobuf:"bytes,4,opt,name=artistID,proto3" json:"artistID"` // 艺人ID
|
||||
BalanceType modelCast.BalanceTypeEnum `json:"balanceType"` // 套餐类型
|
||||
@ -1195,12 +538,6 @@ func CheckBundleBalance(ctx *gin.Context) {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
case modelCast.BalanceTypeCompetitiveValue:
|
||||
if resp.CompetitiveExtendNumber-resp.CompetitiveExtendConsumptionNumber <= 0 {
|
||||
err = errors.New(e.ErrorBalanceInsufficient)
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
service.Success(ctx, resp)
|
||||
@ -1253,11 +590,6 @@ func autoConfirmAnalysis(ctx context.Context, analysisUuid string) (err error) {
|
||||
isFailed = true
|
||||
}
|
||||
|
||||
if infoResp == nil {
|
||||
zap.L().Error("autoConfirmAnalysis GetWorkAnalysis返回nil")
|
||||
return
|
||||
}
|
||||
|
||||
if infoResp.WorkAnalysisStatus != 4 { // 4是待确认状态,需要根据实际情况调整
|
||||
return
|
||||
}
|
||||
@ -1271,41 +603,6 @@ func autoConfirmAnalysis(ctx context.Context, analysisUuid string) (err error) {
|
||||
isFailed = true
|
||||
}
|
||||
|
||||
if balanceInfoRes.BundleStatus == common.BundleExpired {
|
||||
confirmRemark = "套餐已过期"
|
||||
// 直接提交
|
||||
_, err = service.CastProvider.UpdateWorkAnalysisStatus(context.Background(), &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: analysisUuid,
|
||||
ConfirmRemark: confirmRemark,
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("autoConfirmAnalysis UpdateWorkAnalysisStatus", zap.Any("err", err))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if balanceInfoRes.PurchaseType == 1 {
|
||||
// 判断数据分析对应订单是否相同
|
||||
if infoResp.BundleOrderUuid != balanceInfoRes.OrderUUID {
|
||||
// 订单号不同
|
||||
// 说明是新购买的,直接扣除失败
|
||||
_, err = service.CastProvider.UpdateWorkAnalysisStatus(context.Background(), &cast.UpdateWorkAnalysisStatusReq{
|
||||
WorkAction: cast.WorkActionENUM_CONFIRM,
|
||||
Uuid: analysisUuid,
|
||||
ConfirmRemark: "套餐为新套餐,确认失败",
|
||||
ConfirmStatus: 3,
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
zap.L().Error("autoConfirmAnalysis UpdateWorkAnalysisStatus", zap.Any("err", err))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var addBalanceReq bundle.AddBundleBalanceReq
|
||||
addBalanceReq.UserId = int32(userID)
|
||||
// 检查数据分析余量
|
||||
@ -1695,10 +992,6 @@ func processMediaMetricsTask(ctx context.Context, task mediaMetricsTask) *cast.M
|
||||
}
|
||||
socialResp, err := service.AyrshareProvider.GetSocialAnalytics(ctx, socialReq)
|
||||
if err != nil {
|
||||
// 传送账号错误,用来判断是不是被封了
|
||||
go func(task mediaMetricsTask) {
|
||||
UpdateAccStatus(task.artistInfo.ArtistUuid, task.platformID, err.Error())
|
||||
}(task)
|
||||
// 构建失败记录
|
||||
return buildFailedMediaMetricsItem(task.artistInfo, task.dateCN, 3, "获取社交分析数据失败", task.platformID, mediaInfoResp.Info)
|
||||
}
|
||||
@ -3388,19 +2681,3 @@ func retryFailedWorkMetrics(ctx context.Context, dateCN int) {
|
||||
fmt.Printf("[%s] [INFO] 没有需要重试的作品指标\n", time.Now().Format("2006-01-02 15:04:05"))
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateAccStatus(artistUuid string, platformID uint32, resp string) {
|
||||
accResp, _err := service.CastProvider.UpdateMediaAccStatus(context.Background(), &cast.UpdateMediaAccStatusReq{
|
||||
ArtistUuid: artistUuid,
|
||||
PlatformID: platformID,
|
||||
InfoResp: resp,
|
||||
})
|
||||
if _err != nil {
|
||||
zap.L().Error("更新媒体账号状态失败", zap.Error(_err),
|
||||
zap.String("artistUuid", artistUuid), zap.Uint32("platformID", platformID), zap.Error(_err))
|
||||
return
|
||||
}
|
||||
if accResp != nil && accResp.ExceptionStatus == 2 {
|
||||
_ = UnbindAyr([]string{accResp.MediaAccUserID})
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user