合并代码
This commit is contained in:
commit
2fc8ee5cb2
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,7 +1,3 @@
|
|||||||
.gitignore
|
|
||||||
.idea
|
|
||||||
.scannerwork
|
|
||||||
.vscode
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
@ -11,11 +7,6 @@
|
|||||||
|
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
*.suo
|
*.suo
|
||||||
*.ntvs*
|
*.ntvs*
|
||||||
*.njsproj
|
*.njsproj
|
||||||
@ -37,7 +28,6 @@ yarn-error.log*
|
|||||||
*.out
|
*.out
|
||||||
|
|
||||||
/cmd/runtime
|
/cmd/runtime
|
||||||
|
|
||||||
/cmd/logs/*.log
|
/cmd/logs/*.log
|
||||||
/cmd/runtime/log/*.log
|
/cmd/runtime/log/*.log
|
||||||
/build/*
|
/build/*
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -62,6 +62,7 @@ service AccountFiee {
|
|||||||
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
||||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||||
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
||||||
|
rpc SendNationTemplateMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||||
|
|
||||||
// submit info
|
// submit info
|
||||||
rpc SaveSubmitInfo(SubmitInfoRequest) returns (CommonResponse);
|
rpc SaveSubmitInfo(SubmitInfoRequest) returns (CommonResponse);
|
||||||
@ -207,6 +208,7 @@ message UserInfoResponse{
|
|||||||
string subscriberNumber = 16;
|
string subscriberNumber = 16;
|
||||||
string nickName = 17;
|
string nickName = 17;
|
||||||
string telNum = 18;
|
string telNum = 18;
|
||||||
|
string telAreaCode = 19;
|
||||||
}
|
}
|
||||||
message RealNameResponse{
|
message RealNameResponse{
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.8
|
// - protoc-gen-go-triple v1.0.8
|
||||||
// - protoc v4.22.0--rc2
|
// - protoc v4.24.0--rc1
|
||||||
// source: accountFiee.proto
|
// source: api/accountFiee/accountFiee.proto
|
||||||
|
|
||||||
package accountFiee
|
package accountFiee
|
||||||
|
|
||||||
@ -68,6 +68,7 @@ type AccountFieeClient interface {
|
|||||||
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
|
VerifySliderCaptcha(ctx context.Context, in *VerifySliderCaptchaRequest, opts ...grpc_go.CallOption) (*VerifySliderCaptchaResponse, common.ErrorWithAttachment)
|
||||||
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
SendNationMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||||
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
VerifySliderStatus(ctx context.Context, in *VerifySliderStatusRequest, opts ...grpc_go.CallOption) (*VerifySliderStatusResponse, common.ErrorWithAttachment)
|
||||||
|
SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment)
|
||||||
// submit info
|
// submit info
|
||||||
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
//-----------------------------客服聊天系统--------------------------------
|
//-----------------------------客服聊天系统--------------------------------
|
||||||
@ -143,6 +144,7 @@ type AccountFieeClientImpl struct {
|
|||||||
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
VerifySliderCaptcha func(ctx context.Context, in *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||||
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
VerifySliderStatus func(ctx context.Context, in *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||||
|
SendNationTemplateMsg func(ctx context.Context, in *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
SaveSubmitInfo func(ctx context.Context, in *SubmitInfoRequest) (*CommonResponse, error)
|
||||||
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
CreateChatUser func(ctx context.Context, in *ChatUserData) (*CreateChatUserResp, error)
|
||||||
UpdateChatUser func(ctx context.Context, in *ChatUserData) (*CommonMsg, error)
|
UpdateChatUser func(ctx context.Context, in *ChatUserData) (*CommonMsg, error)
|
||||||
@ -418,6 +420,12 @@ func (c *accountFieeClient) VerifySliderStatus(ctx context.Context, in *VerifySl
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderStatus", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/VerifySliderStatus", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *accountFieeClient) SendNationTemplateMsg(ctx context.Context, in *SendNationMsgRequest, opts ...grpc_go.CallOption) (*SendMsgStatusResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(SendMsgStatusResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SendNationTemplateMsg", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *accountFieeClient) SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
func (c *accountFieeClient) SaveSubmitInfo(ctx context.Context, in *SubmitInfoRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CommonResponse)
|
out := new(CommonResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -624,6 +632,7 @@ type AccountFieeServer interface {
|
|||||||
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
VerifySliderCaptcha(context.Context, *VerifySliderCaptchaRequest) (*VerifySliderCaptchaResponse, error)
|
||||||
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
SendNationMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error)
|
||||||
|
SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error)
|
||||||
// submit info
|
// submit info
|
||||||
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error)
|
||||||
//-----------------------------客服聊天系统--------------------------------
|
//-----------------------------客服聊天系统--------------------------------
|
||||||
@ -778,6 +787,9 @@ func (UnimplementedAccountFieeServer) SendNationMsg(context.Context, *SendNation
|
|||||||
func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error) {
|
func (UnimplementedAccountFieeServer) VerifySliderStatus(context.Context, *VerifySliderStatusRequest) (*VerifySliderStatusResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderStatus not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method VerifySliderStatus not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedAccountFieeServer) SendNationTemplateMsg(context.Context, *SendNationMsgRequest) (*SendMsgStatusResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method SendNationTemplateMsg not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedAccountFieeServer) SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error) {
|
func (UnimplementedAccountFieeServer) SaveSubmitInfo(context.Context, *SubmitInfoRequest) (*CommonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SaveSubmitInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method SaveSubmitInfo not implemented")
|
||||||
}
|
}
|
||||||
@ -2018,6 +2030,35 @@ func _AccountFiee_VerifySliderStatus_Handler(srv interface{}, ctx context.Contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _AccountFiee_SendNationTemplateMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SendNationMsgRequest)
|
||||||
|
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("SendNationTemplateMsg", 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_SaveSubmitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _AccountFiee_SaveSubmitInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(SubmitInfoRequest)
|
in := new(SubmitInfoRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -2964,6 +3005,10 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "VerifySliderStatus",
|
MethodName: "VerifySliderStatus",
|
||||||
Handler: _AccountFiee_VerifySliderStatus_Handler,
|
Handler: _AccountFiee_VerifySliderStatus_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SendNationTemplateMsg",
|
||||||
|
Handler: _AccountFiee_SendNationTemplateMsg_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "SaveSubmitInfo",
|
MethodName: "SaveSubmitInfo",
|
||||||
Handler: _AccountFiee_SaveSubmitInfo_Handler,
|
Handler: _AccountFiee_SaveSubmitInfo_Handler,
|
||||||
@ -3074,5 +3119,5 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "accountFiee.proto",
|
Metadata: "api/accountFiee/accountFiee.proto",
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
math "math"
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
|
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,6 +17,31 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
|
func (this *DeleteValueAddServiceRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetReconciliationListReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetReconciliationListResp) 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 *ReconciliationInfo) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderInfoByOrderNoRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OrderInfoByOrderNoResp) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *OrderCreateRecord) Validate() error {
|
func (this *OrderCreateRecord) Validate() error {
|
||||||
for _, item := range this.AddRecords {
|
for _, item := range this.AddRecords {
|
||||||
if item != nil {
|
if item != nil {
|
||||||
@ -134,6 +159,16 @@ func (this *OrderRecord) Validate() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, item := range this.AddInfos {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddInfos", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddInfo) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *OrderAddRecord) Validate() error {
|
func (this *OrderAddRecord) Validate() error {
|
||||||
@ -271,6 +306,19 @@ func (this *CalculatePriceRequest) Validate() error {
|
|||||||
func (this *CalculatePriceResponse) Validate() error {
|
func (this *CalculatePriceResponse) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *BatchGetValueAddServiceLangRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *BatchGetValueAddServiceLangResponse) Validate() error {
|
||||||
|
for _, item := range this.ValueAddServiceLangList {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceLangList", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *BundleExtendRequest) Validate() error {
|
func (this *BundleExtendRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -374,6 +422,25 @@ func (this *GetBundleBalanceByUserIdReq) Validate() error {
|
|||||||
func (this *GetBundleBalanceByUserIdResp) Validate() error {
|
func (this *GetBundleBalanceByUserIdResp) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *OnlyAddValueListByOrderNoRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *OnlyAddValueListByOrderNoResp) Validate() error {
|
||||||
|
for _, item := range this.AddBundleInfos {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfos", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *AddBundleInfo) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *ConfirmWorkReq) Validate() error {
|
func (this *ConfirmWorkReq) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.8
|
// - protoc-gen-go-triple v1.0.8
|
||||||
// - protoc v3.20.3
|
// - protoc v4.24.0--rc1
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -35,6 +35,8 @@ type BundleClient interface {
|
|||||||
SaveBundle(ctx context.Context, in *BundleProfile, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
SaveBundle(ctx context.Context, in *BundleProfile, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment)
|
||||||
BundleListV2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
BundleListV2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||||
BundleDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponseV2, common.ErrorWithAttachment)
|
BundleDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponseV2, common.ErrorWithAttachment)
|
||||||
|
BundleListH5V2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||||
|
BundleLangDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleProfileLang, common.ErrorWithAttachment)
|
||||||
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||||
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
|
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
|
||||||
CreateOrderRecord(ctx context.Context, in *OrderCreateRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
CreateOrderRecord(ctx context.Context, in *OrderCreateRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
@ -46,6 +48,8 @@ type BundleClient interface {
|
|||||||
CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment)
|
PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment)
|
||||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
||||||
|
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
||||||
|
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
||||||
//增值套餐
|
//增值套餐
|
||||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
||||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||||
@ -56,6 +60,8 @@ type BundleClient interface {
|
|||||||
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, common.ErrorWithAttachment)
|
||||||
ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment)
|
ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment)
|
||||||
CalculatePrice(ctx context.Context, in *CalculatePriceRequest, opts ...grpc_go.CallOption) (*CalculatePriceResponse, common.ErrorWithAttachment)
|
CalculatePrice(ctx context.Context, in *CalculatePriceRequest, opts ...grpc_go.CallOption) (*CalculatePriceResponse, common.ErrorWithAttachment)
|
||||||
|
BatchGetValueAddServiceLang(ctx context.Context, in *BatchGetValueAddServiceLangRequest, opts ...grpc_go.CallOption) (*BatchGetValueAddServiceLangResponse, common.ErrorWithAttachment)
|
||||||
|
DeleteValueAddService(ctx context.Context, in *DeleteValueAddServiceRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
// 余量管理
|
// 余量管理
|
||||||
BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment)
|
BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment)
|
||||||
BundleExtendRecordsList(ctx context.Context, in *BundleExtendRecordsListRequest, opts ...grpc_go.CallOption) (*BundleExtendRecordsListResponse, common.ErrorWithAttachment)
|
BundleExtendRecordsList(ctx context.Context, in *BundleExtendRecordsListRequest, opts ...grpc_go.CallOption) (*BundleExtendRecordsListResponse, common.ErrorWithAttachment)
|
||||||
@ -69,6 +75,11 @@ type BundleClient interface {
|
|||||||
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
||||||
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
||||||
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
||||||
|
//对账单
|
||||||
|
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
|
||||||
|
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
|
UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
|
UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type bundleClient struct {
|
type bundleClient struct {
|
||||||
@ -83,6 +94,8 @@ type BundleClientImpl struct {
|
|||||||
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
|
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
|
||||||
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||||
|
BundleListH5V2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||||
|
BundleLangDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleProfileLang, error)
|
||||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||||
CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error)
|
CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error)
|
||||||
@ -94,6 +107,8 @@ type BundleClientImpl struct {
|
|||||||
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error)
|
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error)
|
||||||
PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||||
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||||
|
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
|
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||||
@ -102,6 +117,8 @@ type BundleClientImpl struct {
|
|||||||
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||||
ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||||
CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
||||||
|
BatchGetValueAddServiceLang func(ctx context.Context, in *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error)
|
||||||
|
DeleteValueAddService func(ctx context.Context, in *DeleteValueAddServiceRequest) (*CommonResponse, error)
|
||||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||||
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
||||||
@ -113,6 +130,10 @@ type BundleClientImpl struct {
|
|||||||
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||||
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||||
ConfirmWork func(ctx context.Context, in *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
ConfirmWork func(ctx context.Context, in *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||||
|
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
|
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||||
|
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||||
|
UpdateReconciliationStatusBySerialNumber func(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||||
@ -169,6 +190,18 @@ func (c *bundleClient) BundleDetailV2(ctx context.Context, in *BundleDetailReque
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetailV2", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetailV2", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) BundleListH5V2(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(BundleListResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleListH5V2", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) BundleLangDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleProfileLang, common.ErrorWithAttachment) {
|
||||||
|
out := new(BundleProfileLang)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleLangDetailV2", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *bundleClient) BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment) {
|
||||||
out := new(BundleListResponse)
|
out := new(BundleListResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -235,6 +268,18 @@ func (c *bundleClient) OrderRecordsListV2(ctx context.Context, in *OrderRecordsR
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsListV2", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsListV2", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(OrderInfoByOrderNoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderListByOrderNo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(OnlyAddValueListByOrderNoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CreateValueAddBundleResponse)
|
out := new(CreateValueAddBundleResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -283,6 +328,18 @@ func (c *bundleClient) CalculatePrice(ctx context.Context, in *CalculatePriceReq
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CalculatePrice", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CalculatePrice", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) BatchGetValueAddServiceLang(ctx context.Context, in *BatchGetValueAddServiceLangRequest, opts ...grpc_go.CallOption) (*BatchGetValueAddServiceLangResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(BatchGetValueAddServiceLangResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchGetValueAddServiceLang", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) DeleteValueAddService(ctx context.Context, in *DeleteValueAddServiceRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteValueAddService", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *bundleClient) BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment) {
|
||||||
out := new(BundleExtendResponse)
|
out := new(BundleExtendResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -349,6 +406,30 @@ func (c *bundleClient) ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ConfirmWork", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ConfirmWork", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetReconciliationListResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetReconciliationList", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateReconciliation", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliation", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliationStatusBySerialNumber", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
// BundleServer is the server API for Bundle service.
|
// BundleServer is the server API for Bundle service.
|
||||||
// All implementations must embed UnimplementedBundleServer
|
// All implementations must embed UnimplementedBundleServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -360,6 +441,8 @@ type BundleServer interface {
|
|||||||
SaveBundle(context.Context, *BundleProfile) (*SaveResponse, error)
|
SaveBundle(context.Context, *BundleProfile) (*SaveResponse, error)
|
||||||
BundleListV2(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
BundleListV2(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||||
|
BundleListH5V2(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||||
|
BundleLangDetailV2(context.Context, *BundleDetailRequest) (*BundleProfileLang, error)
|
||||||
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||||
CreateOrderRecord(context.Context, *OrderCreateRecord) (*CommonResponse, error)
|
CreateOrderRecord(context.Context, *OrderCreateRecord) (*CommonResponse, error)
|
||||||
@ -371,6 +454,8 @@ type BundleServer interface {
|
|||||||
CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error)
|
CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error)
|
||||||
PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||||
|
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
|
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
//增值套餐
|
//增值套餐
|
||||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
@ -381,6 +466,8 @@ type BundleServer interface {
|
|||||||
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
|
||||||
ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
|
||||||
CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
||||||
|
BatchGetValueAddServiceLang(context.Context, *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error)
|
||||||
|
DeleteValueAddService(context.Context, *DeleteValueAddServiceRequest) (*CommonResponse, error)
|
||||||
// 余量管理
|
// 余量管理
|
||||||
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||||
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||||
@ -394,6 +481,11 @@ type BundleServer interface {
|
|||||||
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||||
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||||
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||||
|
//对账单
|
||||||
|
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
|
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
|
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
|
UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
||||||
mustEmbedUnimplementedBundleServer()
|
mustEmbedUnimplementedBundleServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,6 +515,12 @@ func (UnimplementedBundleServer) BundleListV2(context.Context, *BundleListReques
|
|||||||
func (UnimplementedBundleServer) BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error) {
|
func (UnimplementedBundleServer) BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method BundleDetailV2 not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method BundleDetailV2 not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) BundleListH5V2(context.Context, *BundleListRequest) (*BundleListResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method BundleListH5V2 not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) BundleLangDetailV2(context.Context, *BundleDetailRequest) (*BundleProfileLang, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method BundleLangDetailV2 not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error) {
|
func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method BundleList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method BundleList not implemented")
|
||||||
}
|
}
|
||||||
@ -456,6 +554,12 @@ func (UnimplementedBundleServer) PackagePriceAndTime(context.Context, *OrderReco
|
|||||||
func (UnimplementedBundleServer) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) {
|
func (UnimplementedBundleServer) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsListV2 not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsListV2 not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OrderListByOrderNo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||||
}
|
}
|
||||||
@ -480,6 +584,12 @@ func (UnimplementedBundleServer) ValueAddServiceLangByUuidAndLanguage(context.Co
|
|||||||
func (UnimplementedBundleServer) CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error) {
|
func (UnimplementedBundleServer) CalculatePrice(context.Context, *CalculatePriceRequest) (*CalculatePriceResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CalculatePrice not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CalculatePrice not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) BatchGetValueAddServiceLang(context.Context, *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method BatchGetValueAddServiceLang not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) DeleteValueAddService(context.Context, *DeleteValueAddServiceRequest) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteValueAddService not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) {
|
func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method BundleExtend not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method BundleExtend not implemented")
|
||||||
}
|
}
|
||||||
@ -513,6 +623,18 @@ func (UnimplementedBundleServer) ToBeComfirmedWorks(context.Context, *ToBeComfir
|
|||||||
func (UnimplementedBundleServer) ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error) {
|
func (UnimplementedBundleServer) ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ConfirmWork not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ConfirmWork not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetReconciliationList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateReconciliation not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliation not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliationStatusBySerialNumber not implemented")
|
||||||
|
}
|
||||||
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -744,6 +866,64 @@ func _Bundle_BundleDetailV2_Handler(srv interface{}, ctx context.Context, dec fu
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_BundleListH5V2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BundleListRequest)
|
||||||
|
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("BundleListH5V2", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_BundleLangDetailV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BundleDetailRequest)
|
||||||
|
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("BundleLangDetailV2", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Bundle_BundleList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_BundleList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(BundleListRequest)
|
in := new(BundleListRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1063,6 +1243,64 @@ func _Bundle_OrderRecordsListV2_Handler(srv interface{}, ctx context.Context, de
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_OrderListByOrderNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OrderInfoByOrderNoRequest)
|
||||||
|
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("OrderListByOrderNo", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_OnlyAddValueListByOrderNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OnlyAddValueListByOrderNoRequest)
|
||||||
|
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("OnlyAddValueListByOrderNo", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateValueAddBundleRequest)
|
in := new(CreateValueAddBundleRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1295,6 +1533,64 @@ func _Bundle_CalculatePrice_Handler(srv interface{}, ctx context.Context, dec fu
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_BatchGetValueAddServiceLang_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BatchGetValueAddServiceLangRequest)
|
||||||
|
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("BatchGetValueAddServiceLang", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_DeleteValueAddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DeleteValueAddServiceRequest)
|
||||||
|
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("DeleteValueAddService", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Bundle_BundleExtend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_BundleExtend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(BundleExtendRequest)
|
in := new(BundleExtendRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1614,6 +1910,122 @@ func _Bundle_ConfirmWork_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_GetReconciliationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetReconciliationListReq)
|
||||||
|
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("GetReconciliationList", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_CreateReconciliation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ReconciliationInfo)
|
||||||
|
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("CreateReconciliation", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_UpdateReconciliation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ReconciliationInfo)
|
||||||
|
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("UpdateReconciliation", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Bundle_UpdateReconciliationStatusBySerialNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateStatusAndPayTimeBySerialNumber)
|
||||||
|
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("UpdateReconciliationStatusBySerialNumber", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -1649,6 +2061,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "BundleDetailV2",
|
MethodName: "BundleDetailV2",
|
||||||
Handler: _Bundle_BundleDetailV2_Handler,
|
Handler: _Bundle_BundleDetailV2_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BundleListH5V2",
|
||||||
|
Handler: _Bundle_BundleListH5V2_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BundleLangDetailV2",
|
||||||
|
Handler: _Bundle_BundleLangDetailV2_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "BundleList",
|
MethodName: "BundleList",
|
||||||
Handler: _Bundle_BundleList_Handler,
|
Handler: _Bundle_BundleList_Handler,
|
||||||
@ -1693,6 +2113,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "OrderRecordsListV2",
|
MethodName: "OrderRecordsListV2",
|
||||||
Handler: _Bundle_OrderRecordsListV2_Handler,
|
Handler: _Bundle_OrderRecordsListV2_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "OrderListByOrderNo",
|
||||||
|
Handler: _Bundle_OrderListByOrderNo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "OnlyAddValueListByOrderNo",
|
||||||
|
Handler: _Bundle_OnlyAddValueListByOrderNo_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "CreateValueAddBundle",
|
MethodName: "CreateValueAddBundle",
|
||||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||||
@ -1725,6 +2153,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "CalculatePrice",
|
MethodName: "CalculatePrice",
|
||||||
Handler: _Bundle_CalculatePrice_Handler,
|
Handler: _Bundle_CalculatePrice_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BatchGetValueAddServiceLang",
|
||||||
|
Handler: _Bundle_BatchGetValueAddServiceLang_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DeleteValueAddService",
|
||||||
|
Handler: _Bundle_DeleteValueAddService_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "BundleExtend",
|
MethodName: "BundleExtend",
|
||||||
Handler: _Bundle_BundleExtend_Handler,
|
Handler: _Bundle_BundleExtend_Handler,
|
||||||
@ -1769,6 +2205,22 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "ConfirmWork",
|
MethodName: "ConfirmWork",
|
||||||
Handler: _Bundle_ConfirmWork_Handler,
|
Handler: _Bundle_ConfirmWork_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetReconciliationList",
|
||||||
|
Handler: _Bundle_GetReconciliationList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateReconciliation",
|
||||||
|
Handler: _Bundle_CreateReconciliation_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateReconciliation",
|
||||||
|
Handler: _Bundle_UpdateReconciliation_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateReconciliationStatusBySerialNumber",
|
||||||
|
Handler: _Bundle_UpdateReconciliationStatusBySerialNumber_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/bundle.proto",
|
Metadata: "pb/bundle.proto",
|
||||||
|
1692
api/cast/cast.pb.go
1692
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
@ -31,7 +31,7 @@ const _ = grpc_go.SupportPackageIsVersion7
|
|||||||
type CastClient interface {
|
type CastClient interface {
|
||||||
MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment)
|
MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment)
|
||||||
UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment)
|
UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment)
|
||||||
UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*UnbindManagerResp, common.ErrorWithAttachment)
|
||||||
BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment)
|
UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment)
|
||||||
UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment)
|
UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment)
|
||||||
@ -40,6 +40,11 @@ type CastClient interface {
|
|||||||
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
|
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
|
||||||
MediaWorks(ctx context.Context, in *MediaWorksReq, opts ...grpc_go.CallOption) (*MediaWorksResp, common.ErrorWithAttachment)
|
MediaWorks(ctx context.Context, in *MediaWorksReq, opts ...grpc_go.CallOption) (*MediaWorksResp, common.ErrorWithAttachment)
|
||||||
|
RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment)
|
||||||
|
DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||||
|
WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment)
|
||||||
|
OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment)
|
||||||
|
OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type castClient struct {
|
type castClient struct {
|
||||||
@ -49,7 +54,7 @@ type castClient struct {
|
|||||||
type CastClientImpl struct {
|
type CastClientImpl struct {
|
||||||
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
||||||
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||||
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*emptypb.Empty, error)
|
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*UnbindManagerResp, error)
|
||||||
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
||||||
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||||
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||||
@ -58,6 +63,11 @@ type CastClientImpl struct {
|
|||||||
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
||||||
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||||
MediaWorks func(ctx context.Context, in *MediaWorksReq) (*MediaWorksResp, error)
|
MediaWorks func(ctx context.Context, in *MediaWorksReq) (*MediaWorksResp, error)
|
||||||
|
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
||||||
|
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
||||||
|
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
||||||
|
OAuthYoutubeUrl func(ctx context.Context, in *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
||||||
|
OAuthYoutubeToken func(ctx context.Context, in *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||||
@ -84,8 +94,8 @@ func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAcco
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateMediaAccount", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateMediaAccount", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *castClient) UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
func (c *castClient) UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*UnbindManagerResp, common.ErrorWithAttachment) {
|
||||||
out := new(emptypb.Empty)
|
out := new(UnbindManagerResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindManager", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindManager", in, out)
|
||||||
}
|
}
|
||||||
@ -138,13 +148,43 @@ func (c *castClient) MediaWorks(ctx context.Context, in *MediaWorksReq, opts ...
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaWorks", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaWorks", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *castClient) RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(RePublishResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RePublish", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||||
|
out := new(emptypb.Empty)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DelWork", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(WorkInfoResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkInfo", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(OAuthYoutubeUrlResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeUrl", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *castClient) OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(OAuthYoutubeTokenResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeToken", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
// CastServer is the server API for Cast service.
|
// CastServer is the server API for Cast service.
|
||||||
// All implementations must embed UnimplementedCastServer
|
// All implementations must embed UnimplementedCastServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type CastServer interface {
|
type CastServer interface {
|
||||||
MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error)
|
MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error)
|
||||||
UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||||
UnbindManager(context.Context, *UnbindManagerReq) (*emptypb.Empty, error)
|
UnbindManager(context.Context, *UnbindManagerReq) (*UnbindManagerResp, error)
|
||||||
BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error)
|
BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error)
|
||||||
UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||||
UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||||
@ -153,6 +193,11 @@ type CastServer interface {
|
|||||||
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
|
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
|
||||||
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
|
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||||
MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error)
|
MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error)
|
||||||
|
RePublish(context.Context, *RePublishReq) (*RePublishResp, error)
|
||||||
|
DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error)
|
||||||
|
WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error)
|
||||||
|
OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
||||||
|
OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
||||||
mustEmbedUnimplementedCastServer()
|
mustEmbedUnimplementedCastServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +212,7 @@ func (UnimplementedCastServer) MediaUserList(context.Context, *MediaUserListReq)
|
|||||||
func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) {
|
func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedCastServer) UnbindManager(context.Context, *UnbindManagerReq) (*emptypb.Empty, error) {
|
func (UnimplementedCastServer) UnbindManager(context.Context, *UnbindManagerReq) (*UnbindManagerResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UnbindManager not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UnbindManager not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedCastServer) BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error) {
|
func (UnimplementedCastServer) BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error) {
|
||||||
@ -194,6 +239,21 @@ func (UnimplementedCastServer) MediaAccounts(context.Context, *MediaAccountsReq)
|
|||||||
func (UnimplementedCastServer) MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error) {
|
func (UnimplementedCastServer) MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method MediaWorks not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method MediaWorks not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedCastServer) RePublish(context.Context, *RePublishReq) (*RePublishResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RePublish not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DelWork not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method WorkInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeUrl not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedCastServer) OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeToken not implemented")
|
||||||
|
}
|
||||||
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -541,6 +601,151 @@ func _Cast_MediaWorks_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Cast_RePublish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RePublishReq)
|
||||||
|
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("RePublish", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Cast_DelWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DelWorkReq)
|
||||||
|
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("DelWork", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Cast_WorkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(WorkInfoReq)
|
||||||
|
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("WorkInfo", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Cast_OAuthYoutubeUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OAuthYoutubeUrlReq)
|
||||||
|
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("OAuthYoutubeUrl", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Cast_OAuthYoutubeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OAuthYoutubeTokenReq)
|
||||||
|
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("OAuthYoutubeToken", args, invAttachment)
|
||||||
|
if interceptor == nil {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
info := &grpc_go.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||||
|
return result, result.Error()
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -592,6 +797,26 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "MediaWorks",
|
MethodName: "MediaWorks",
|
||||||
Handler: _Cast_MediaWorks_Handler,
|
Handler: _Cast_MediaWorks_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RePublish",
|
||||||
|
Handler: _Cast_RePublish_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DelWork",
|
||||||
|
Handler: _Cast_DelWork_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "WorkInfo",
|
||||||
|
Handler: _Cast_WorkInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "OAuthYoutubeUrl",
|
||||||
|
Handler: _Cast_OAuthYoutubeUrl_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "OAuthYoutubeToken",
|
||||||
|
Handler: _Cast_OAuthYoutubeToken_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/fiee/cast.proto",
|
Metadata: "pb/fiee/cast.proto",
|
||||||
|
@ -21,6 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/cmd/config"
|
"fonchain-fiee/cmd/config"
|
||||||
"fonchain-fiee/pkg/cache"
|
"fonchain-fiee/pkg/cache"
|
||||||
|
"fonchain-fiee/pkg/logger"
|
||||||
"fonchain-fiee/pkg/router"
|
"fonchain-fiee/pkg/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ func bootstrap() (err error) {
|
|||||||
fmt.Println(configEnv)
|
fmt.Println(configEnv)
|
||||||
fmt.Println(config.AppConfig)
|
fmt.Println(config.AppConfig)
|
||||||
|
|
||||||
|
logger.LogInit(config.AppConfig)
|
||||||
////redis
|
////redis
|
||||||
redisConfig := cache.RedisConfig{
|
redisConfig := cache.RedisConfig{
|
||||||
RedisDB: configEnv.Redis.RedisDB,
|
RedisDB: configEnv.Redis.RedisDB,
|
||||||
|
@ -115,6 +115,7 @@ type System struct {
|
|||||||
Host string
|
Host string
|
||||||
RedirectUri string
|
RedirectUri string
|
||||||
Domain string
|
Domain string
|
||||||
|
ErpHost string
|
||||||
}
|
}
|
||||||
type Oss struct {
|
type Oss struct {
|
||||||
AccessKeyId string
|
AccessKeyId string
|
||||||
@ -124,6 +125,14 @@ type Oss struct {
|
|||||||
BaseDir string
|
BaseDir string
|
||||||
CdnHost string
|
CdnHost string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ZapLog struct {
|
||||||
|
Level string
|
||||||
|
Filename string
|
||||||
|
MaxSize int
|
||||||
|
MaxAge int
|
||||||
|
MaxBackups int
|
||||||
|
}
|
||||||
type Mobile struct {
|
type Mobile struct {
|
||||||
SK string
|
SK string
|
||||||
AK string
|
AK string
|
||||||
@ -143,6 +152,7 @@ type Config struct {
|
|||||||
Mobile Mobile `toml:"mobile"`
|
Mobile Mobile `toml:"mobile"`
|
||||||
Ai Ai `toml:"ai"`
|
Ai Ai `toml:"ai"`
|
||||||
Oss Oss `toml:"oss"`
|
Oss Oss `toml:"oss"`
|
||||||
|
ZapLog ZapLog `toml:"zapLog"`
|
||||||
}
|
}
|
||||||
|
|
||||||
/********start-配置信息*********/
|
/********start-配置信息*********/
|
||||||
|
@ -4,7 +4,7 @@ AppMode = "dev"
|
|||||||
HttpPort = ":8085"
|
HttpPort = ":8085"
|
||||||
Host = "https://common.szjixun.cn"
|
Host = "https://common.szjixun.cn"
|
||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
|
ErpHost = "http://114.218.158.24:9020"
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
@ -34,3 +34,10 @@ Password = "Gy.123456"
|
|||||||
|
|
||||||
[stripe]
|
[stripe]
|
||||||
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||||
|
|
||||||
|
[zapLog]
|
||||||
|
level = "info"
|
||||||
|
filename = "logs/fiee_zap.log"
|
||||||
|
max_size = 5
|
||||||
|
max_age = 30
|
||||||
|
max_backups = 30
|
||||||
|
@ -4,8 +4,8 @@ dubbo:
|
|||||||
protocol: zookeeper
|
protocol: zookeeper
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
# address: 121.229.45.214:9004
|
# address: 121.229.45.214:9004
|
||||||
# address: 172.16.100.93:2181
|
address: 172.16.100.93:2181
|
||||||
address: 127.0.0.1:2181
|
# address: 127.0.0.1:2181
|
||||||
# address: 114.218.158.24:2181
|
# address: 114.218.158.24:2181
|
||||||
consumer:
|
consumer:
|
||||||
filter: tracing
|
filter: tracing
|
||||||
@ -37,11 +37,9 @@ dubbo:
|
|||||||
interface: com.fontree.microservices.common.micro.account.fiee
|
interface: com.fontree.microservices.common.micro.account.fiee
|
||||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||||
PaymentCentClientImpl:
|
PaymentCentClientImpl:
|
||||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
protocol: tri
|
||||||
filter: cshutdown,sign,auth
|
retries: 0
|
||||||
params:
|
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||||
.accessKeyId: "Paymentksl"
|
|
||||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
|
||||||
CastClientImpl:
|
CastClientImpl:
|
||||||
protocol: tri
|
protocol: tri
|
||||||
interface: com.fontree.microservices.fiee.multicast
|
interface: com.fontree.microservices.fiee.multicast
|
||||||
|
@ -4,7 +4,7 @@ AppMode = "prod"
|
|||||||
HttpPort = ":8085"
|
HttpPort = ":8085"
|
||||||
Host = "https://common.szjixun.cn"
|
Host = "https://common.szjixun.cn"
|
||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
|
ErpHost = "https://erpapi.fontree.cn"
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
@ -34,3 +34,10 @@ CdnHost = "https://e-cdn.fontree.cn"
|
|||||||
|
|
||||||
[stripe]
|
[stripe]
|
||||||
Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"
|
Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"
|
||||||
|
|
||||||
|
[zapLog]
|
||||||
|
level = "info"
|
||||||
|
filename = "logs/fiee_zap.log"
|
||||||
|
max_size = 5
|
||||||
|
max_age = 30
|
||||||
|
max_backups = 30
|
||||||
|
@ -9,7 +9,6 @@ dubbo:
|
|||||||
consumer:
|
consumer:
|
||||||
filter: tracing
|
filter: tracing
|
||||||
request-timeout: 30s
|
request-timeout: 30s
|
||||||
check: false
|
|
||||||
references:
|
references:
|
||||||
OrderClientImpl:
|
OrderClientImpl:
|
||||||
protocol: tri
|
protocol: tri
|
||||||
|
@ -4,7 +4,7 @@ AppMode = "test"
|
|||||||
HttpPort = ":8085"
|
HttpPort = ":8085"
|
||||||
Host = "https://common.szjixun.cn"
|
Host = "https://common.szjixun.cn"
|
||||||
RedirectUri = "/api/redirect/url"
|
RedirectUri = "/api/redirect/url"
|
||||||
|
ErpHost = "http://114.218.158.24:9020"
|
||||||
[bos]
|
[bos]
|
||||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||||
@ -42,3 +42,10 @@ Password = "Gy.123456"
|
|||||||
|
|
||||||
[stripe]
|
[stripe]
|
||||||
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||||
|
|
||||||
|
[zapLog]
|
||||||
|
level = "info"
|
||||||
|
filename = "logs/fiee_zap.log"
|
||||||
|
max_size = 5
|
||||||
|
max_age = 30
|
||||||
|
max_backups = 30
|
||||||
|
@ -37,11 +37,9 @@ dubbo:
|
|||||||
interface: com.fontree.microservices.common.micro.account.fiee
|
interface: com.fontree.microservices.common.micro.account.fiee
|
||||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||||
PaymentCentClientImpl:
|
PaymentCentClientImpl:
|
||||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
protocol: tri
|
||||||
filter: cshutdown,sign,auth
|
retries: 0
|
||||||
params:
|
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||||
.accessKeyId: "Paymentksl"
|
|
||||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
|
||||||
CastClientImpl:
|
CastClientImpl:
|
||||||
protocol: tri
|
protocol: tri
|
||||||
interface: com.fontree.microservices.fiee.multicast
|
interface: com.fontree.microservices.fiee.multicast
|
||||||
|
3
go.mod
3
go.mod
@ -114,7 +114,7 @@ require (
|
|||||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||||
github.com/spf13/viper v1.7.1
|
github.com/spf13/viper v1.7.1
|
||||||
github.com/u2takey/ffmpeg-go v0.5.0
|
github.com/u2takey/ffmpeg-go v0.5.0
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
|
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@ -173,6 +173,7 @@ require (
|
|||||||
github.com/spf13/jwalterweatherman v1.0.0 // indirect
|
github.com/spf13/jwalterweatherman v1.0.0 // indirect
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
github.com/subosito/gotenv v1.2.0 // indirect
|
github.com/subosito/gotenv v1.2.0 // indirect
|
||||||
|
github.com/tealeg/xlsx v1.0.5 // indirect
|
||||||
github.com/tklauser/go-sysconf v0.3.6 // indirect
|
github.com/tklauser/go-sysconf v0.3.6 // indirect
|
||||||
github.com/tklauser/numcpus v0.2.2 // indirect
|
github.com/tklauser/numcpus v0.2.2 // indirect
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
|
5
go.sum
5
go.sum
@ -837,6 +837,8 @@ github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gt
|
|||||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||||
|
github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
|
||||||
|
github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
|
||||||
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
|
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
|
||||||
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
|
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
|
||||||
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
|
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
|
||||||
@ -977,8 +979,9 @@ 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-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-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-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U=
|
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
|
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
|
||||||
|
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
|
@ -17,7 +17,6 @@ func TestGptContent(t *testing.T) {
|
|||||||
want string
|
want string
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
// TODO: Add test cases.
|
|
||||||
{args: args{content: "i want many nice cars"}},
|
{args: args{content: "i want many nice cars"}},
|
||||||
{args: args{content: "you are so beautiful,i like(把前面文字翻译成中文,去除斜杠,本括号内的忽略)"}},
|
{args: args{content: "you are so beautiful,i like(把前面文字翻译成中文,去除斜杠,本括号内的忽略)"}},
|
||||||
{args: args{content: "有一个美丽的蓝色天空,天空下边站着一个小孩,小孩穿着绿色的衣服,绿色的帽子,帽子上有个毛毛虫(把前面文字翻译成英语,如果前面是英语则原样返回,去除斜杠,本括号内的忽略)"}},
|
{args: args{content: "有一个美丽的蓝色天空,天空下边站着一个小孩,小孩穿着绿色的衣服,绿色的帽子,帽子上有个毛毛虫(把前面文字翻译成英语,如果前面是英语则原样返回,去除斜杠,本括号内的忽略)"}},
|
||||||
|
@ -23,7 +23,6 @@ var (
|
|||||||
DriverUrl string
|
DriverUrl string
|
||||||
AppointUrl string
|
AppointUrl string
|
||||||
MaterialHost string
|
MaterialHost string
|
||||||
//TODO
|
|
||||||
//BosAk string
|
//BosAk string
|
||||||
//BosSk string
|
//BosSk string
|
||||||
//BosBucketName string
|
//BosBucketName string
|
||||||
@ -31,7 +30,6 @@ var (
|
|||||||
//BosUrl string
|
//BosUrl string
|
||||||
//BosHttp string
|
//BosHttp string
|
||||||
//BosDomain string
|
//BosDomain string
|
||||||
//TODO
|
|
||||||
ProjectMapDir string
|
ProjectMapDir string
|
||||||
JaegerHost string
|
JaegerHost string
|
||||||
JaegerOpen bool
|
JaegerOpen bool
|
||||||
|
@ -23,6 +23,7 @@ const (
|
|||||||
const (
|
const (
|
||||||
ErrNotLogin = "请先登录"
|
ErrNotLogin = "请先登录"
|
||||||
ErrOffline = "您已经下线"
|
ErrOffline = "您已经下线"
|
||||||
|
InvalidStatus = "状态非法"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -152,6 +152,7 @@ var MsgFlags = map[int]string{
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ErrorCreateFeedback = "请勿重复提交"
|
ErrorCreateFeedback = "请勿重复提交"
|
||||||
|
ErrorBalanceInsufficient = "余额不足"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetMsg 获取状态码对应信息
|
// GetMsg 获取状态码对应信息
|
||||||
|
@ -29,7 +29,7 @@ package e
|
|||||||
|
|
||||||
ERR_NOT_NEED_BALANCE = "无需查询余额"
|
ERR_NOT_NEED_BALANCE = "无需查询余额"
|
||||||
|
|
||||||
ErrNoBalance = "假期余额不足"
|
ErrNoBalance = "余额不足"
|
||||||
ErrHourNoBalance = "请假时长超出范围"
|
ErrHourNoBalance = "请假时长超出范围"
|
||||||
|
|
||||||
ErrApplyTime = "无效的请假时间"
|
ErrApplyTime = "无效的请假时间"
|
||||||
@ -165,7 +165,7 @@ var errorMessagesZhCN = map[string]string{
|
|||||||
|
|
||||||
"ERR_NOT_NEED_BALANCEZhCN": "无需查询余额",
|
"ERR_NOT_NEED_BALANCEZhCN": "无需查询余额",
|
||||||
|
|
||||||
"ErrNoBalanceZhCN": "假期余额不足",
|
"ErrNoBalanceZhCN": "余额不足",
|
||||||
"ErrHourNoBalanceZhCN": "请假时长超出范围",
|
"ErrHourNoBalanceZhCN": "请假时长超出范围",
|
||||||
|
|
||||||
"ErrApplyTimeZhCN": "无效的请假时间",
|
"ErrApplyTimeZhCN": "无效的请假时间",
|
||||||
@ -325,7 +325,7 @@ var errorMessagesZhTW = map[string]string{
|
|||||||
|
|
||||||
"ERR_NOT_NEED_BALANCEZhTW": "無需查詢餘額",
|
"ERR_NOT_NEED_BALANCEZhTW": "無需查詢餘額",
|
||||||
|
|
||||||
"ErrNoBalanceZhTW": "假期餘額不足",
|
"ErrNoBalanceZhTW": "餘額不足",
|
||||||
"ErrHourNoBalanceZhTW": "請假時長超出範圍",
|
"ErrHourNoBalanceZhTW": "請假時長超出範圍",
|
||||||
|
|
||||||
"ErrApplyTimeZhTW": "無效的請假時間",
|
"ErrApplyTimeZhTW": "無效的請假時間",
|
||||||
|
54
pkg/logger/zap_logger.go
Normal file
54
pkg/logger/zap_logger.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
package logger
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"github.com/natefinch/lumberjack"
|
||||||
|
"go.uber.org/zap"
|
||||||
|
"go.uber.org/zap/zapcore"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func LogInit(appConfig *config.Config) *zap.Logger {
|
||||||
|
var err error
|
||||||
|
writeSyncer := getLogWriter(appConfig.ZapLog.Filename, appConfig.ZapLog.MaxSize, appConfig.ZapLog.MaxBackups, appConfig.ZapLog.MaxAge)
|
||||||
|
encoder := getEncoder()
|
||||||
|
var l = new(zapcore.Level)
|
||||||
|
err = l.UnmarshalText([]byte(appConfig.ZapLog.Level))
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
var core zapcore.Core
|
||||||
|
//if appConfig.System.Mode == "dev" {
|
||||||
|
// 进入开发模式,日志输出到终端
|
||||||
|
consoleEncoder := zapcore.NewConsoleEncoder(zap.NewDevelopmentEncoderConfig())
|
||||||
|
core = zapcore.NewTee(
|
||||||
|
zapcore.NewCore(encoder, writeSyncer, l),
|
||||||
|
zapcore.NewCore(consoleEncoder, zapcore.Lock(os.Stdout), zapcore.DebugLevel),
|
||||||
|
)
|
||||||
|
//} else {
|
||||||
|
// core = zapcore.NewCore(encoder, writeSyncer, l)
|
||||||
|
//}
|
||||||
|
lg := zap.New(core, zap.AddCaller())
|
||||||
|
zap.ReplaceGlobals(lg)
|
||||||
|
return lg
|
||||||
|
}
|
||||||
|
|
||||||
|
func getEncoder() zapcore.Encoder {
|
||||||
|
encoderConfig := zap.NewProductionEncoderConfig()
|
||||||
|
encoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||||
|
encoderConfig.TimeKey = "time"
|
||||||
|
encoderConfig.EncodeLevel = zapcore.CapitalLevelEncoder
|
||||||
|
encoderConfig.EncodeDuration = zapcore.SecondsDurationEncoder
|
||||||
|
encoderConfig.EncodeCaller = zapcore.ShortCallerEncoder
|
||||||
|
return zapcore.NewJSONEncoder(encoderConfig)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getLogWriter(filename string, maxSize, maxBackup, maxAge int) zapcore.WriteSyncer {
|
||||||
|
lumberJackLogger := &lumberjack.Logger{
|
||||||
|
Filename: filename,
|
||||||
|
MaxSize: maxSize,
|
||||||
|
MaxBackups: maxBackup,
|
||||||
|
MaxAge: maxAge,
|
||||||
|
}
|
||||||
|
return zapcore.AddSync(lumberJackLogger)
|
||||||
|
}
|
25
pkg/model/cast/approval.go
Normal file
25
pkg/model/cast/approval.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
type ApprovalDetailResponse struct {
|
||||||
|
Status int `json:"status"`
|
||||||
|
Data Data `json:"data"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Code int `json:"code"`
|
||||||
|
Error *string `json:"error"`
|
||||||
|
Err string `json:"err"`
|
||||||
|
Keys []string `json:"keys"`
|
||||||
|
Positions *interface{} `json:"positions"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Data struct {
|
||||||
|
Count int `json:"Count"`
|
||||||
|
Data []Item `json:"data"`
|
||||||
|
Status int `json:"Status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Item struct {
|
||||||
|
ID int `json:"ID"`
|
||||||
|
Domain string `json:"Domain"`
|
||||||
|
Status int `json:"Status"`
|
||||||
|
Reply string `json:"Reply"`
|
||||||
|
}
|
10
pkg/model/cast/media.go
Normal file
10
pkg/model/cast/media.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
type BalanceTypeEnum int32
|
||||||
|
|
||||||
|
// 定义枚举值
|
||||||
|
const (
|
||||||
|
BalanceTypeAccountValue BalanceTypeEnum = 1
|
||||||
|
BalanceTypeImageValue BalanceTypeEnum = 2
|
||||||
|
BalanceTypeVideoValue BalanceTypeEnum = 3
|
||||||
|
)
|
10
pkg/model/cast/oauth.go
Normal file
10
pkg/model/cast/oauth.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
type OAuthPlatformReq struct {
|
||||||
|
MediaAccountUuid string `json:"mediaAccountUuid" form:"mediaAccountUuid" binding:"required"`
|
||||||
|
PlatformID int `json:"platformID" form:"platformID" binding:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type OAuthPlatformResp struct {
|
||||||
|
Url string `json:"url"`
|
||||||
|
}
|
11
pkg/model/cast/work.go
Normal file
11
pkg/model/cast/work.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
const (
|
||||||
|
WorkStatusPending = 1 // 待提交
|
||||||
|
WorkStatusReviewing = 2 // 审核中
|
||||||
|
WorkStatusReviewFailed = 3 // 审核失败
|
||||||
|
WorkStatusArtistConfirming = 4 // 待艺人确认
|
||||||
|
WorkStatusArtistRejected = 5 // 艺人驳回
|
||||||
|
WorkStatusPublishSuccess = 6 // 发布成功
|
||||||
|
WorkStatusPublishFailed = 7 // 发布失败
|
||||||
|
)
|
5
pkg/model/query/cast.go
Normal file
5
pkg/model/query/cast.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package query
|
||||||
|
|
||||||
|
type RemindReq struct {
|
||||||
|
WorkUuid string `json:"workUuid"`
|
||||||
|
}
|
18
pkg/router/app/media.go
Normal file
18
pkg/router/app/media.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package app
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fonchain-fiee/pkg/middleware"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
serviceCast "fonchain-fiee/pkg/service/app/cast"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func MediaAppRouter(r *gin.RouterGroup) {
|
||||||
|
auth := r.Group("")
|
||||||
|
auth.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||||
|
media := auth.Group("app/media")
|
||||||
|
{
|
||||||
|
media.POST("user-accounts", serviceCast.UserAccounts)
|
||||||
|
media.POST("work-list", serviceCast.MediaWorks)
|
||||||
|
}
|
||||||
|
}
|
@ -24,6 +24,9 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
|||||||
{
|
{
|
||||||
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||||
bundleOrderClientWebRoute.POST("bundle-order-list-V2", bundle.OrderRecordsListV2)
|
bundleOrderClientWebRoute.POST("bundle-order-list-V2", bundle.OrderRecordsListV2)
|
||||||
|
bundleOrderClientWebRoute.POST("bundle-order-list-download", bundle.OrderRecordsListDownload)
|
||||||
|
bundleOrderClientWebRoute.POST("reconciliation-list", bundle.GetReconciliationList)
|
||||||
|
bundleOrderClientWebRoute.POST("reconciliation-list-download", bundle.GetReconciliationListDownload)
|
||||||
}
|
}
|
||||||
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
||||||
{
|
{
|
||||||
|
@ -17,11 +17,23 @@ func MediaRouter(r *gin.RouterGroup) {
|
|||||||
media.POST("unbind-manager", serviceCast.UnbindManager)
|
media.POST("unbind-manager", serviceCast.UnbindManager)
|
||||||
media.POST("bind-manager", serviceCast.BindManager)
|
media.POST("bind-manager", serviceCast.BindManager)
|
||||||
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
||||||
|
media.POST("oauth-url", serviceCast.OAuthUrl)
|
||||||
|
}
|
||||||
|
mediaNoLogin := r.Group("media")
|
||||||
|
{
|
||||||
|
mediaNoLogin.GET("oauth2callback", serviceCast.OAuth2Callback)
|
||||||
|
mediaNoLogin.GET("test", serviceCast.Test)
|
||||||
}
|
}
|
||||||
|
|
||||||
work := auth.Group("work")
|
work := auth.Group("work")
|
||||||
{
|
{
|
||||||
work.POST("update-work-image", serviceCast.UpdateWorkImage)
|
work.POST("update-work-image", serviceCast.UpdateWorkImage)
|
||||||
work.POST("update-work-video", serviceCast.UpdateWorkVideo)
|
work.POST("update-work-video", serviceCast.UpdateWorkVideo)
|
||||||
|
work.POST("update-approval", serviceCast.UpdateApproval)
|
||||||
|
work.POST("list", serviceCast.WorkList)
|
||||||
|
work.POST("detail", serviceCast.WorkDetail)
|
||||||
|
work.POST("republish", serviceCast.RePublish)
|
||||||
|
work.POST("delete", serviceCast.DelWork)
|
||||||
|
work.POST("remind", serviceCast.Remind)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package router
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fonchain-fiee/pkg/middleware"
|
"fonchain-fiee/pkg/middleware"
|
||||||
|
"fonchain-fiee/pkg/router/app"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"fonchain-fiee/pkg/service/account"
|
"fonchain-fiee/pkg/service/account"
|
||||||
"fonchain-fiee/pkg/service/asChat"
|
"fonchain-fiee/pkg/service/asChat"
|
||||||
@ -51,7 +52,7 @@ func NewRouter() *gin.Engine {
|
|||||||
ValueAddBundleRouter(privateGroup)
|
ValueAddBundleRouter(privateGroup)
|
||||||
MediaRouter(privateGroup)
|
MediaRouter(privateGroup)
|
||||||
SecFilingRouter(privateGroup)
|
SecFilingRouter(privateGroup)
|
||||||
|
app.MediaAppRouter(privateGroup)
|
||||||
{
|
{
|
||||||
v1.POST("version", version.Version) //版本号公共
|
v1.POST("version", version.Version) //版本号公共
|
||||||
}
|
}
|
||||||
|
57
pkg/service/app/cast/media.go
Normal file
57
pkg/service/app/cast/media.go
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/api/cast"
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func UserAccounts(ctx *gin.Context) {
|
||||||
|
var req *cast.MediaAccountsReq = &cast.MediaAccountsReq{}
|
||||||
|
var err error
|
||||||
|
if config.AppConfig.System.AppMode != "dev" {
|
||||||
|
userInfo := login.GetUserInfoFromC(ctx)
|
||||||
|
req.ArtistUuid = fmt.Sprint(userInfo.ID)
|
||||||
|
} else {
|
||||||
|
req.ArtistUuid = "61"
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err = req.Validate(); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.CastProvider.MediaAccounts(ctx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func MediaWorks(ctx *gin.Context) {
|
||||||
|
var req *cast.MediaWorksReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err = req.Validate(); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, err := service.CastProvider.MediaWorks(ctx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
@ -13,14 +13,31 @@ import (
|
|||||||
"fonchain-fiee/pkg/service/bundle/logic"
|
"fonchain-fiee/pkg/service/bundle/logic"
|
||||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||||
"fonchain-fiee/pkg/service/upload"
|
"fonchain-fiee/pkg/service/upload"
|
||||||
|
"github.com/360EntSecGroup-Skylar/excelize"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gin-gonic/gin/binding"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func DeleteBundleOrder(c *gin.Context) {
|
||||||
|
var req bundle.DeleteValueAddServiceRequest
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
userInfo := login.GetUserInfoFromC(c)
|
||||||
|
req.UserID = userInfo.ID
|
||||||
|
res, err := service.BundleProvider.DeleteValueAddService(context.Background(), &req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, res)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func CreateBundleOrderAddSignature(c *gin.Context) {
|
func CreateBundleOrderAddSignature(c *gin.Context) {
|
||||||
var req bundle.OrderAddRecord
|
var req bundle.OrderAddRecord
|
||||||
|
|
||||||
@ -28,10 +45,13 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if req.Language == "" {
|
||||||
|
req.Language = c.GetHeader("Accept-Language")
|
||||||
if req.Language == "" {
|
if req.Language == "" {
|
||||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if req.BundleUuid == "" {
|
if req.BundleUuid == "" {
|
||||||
service.Error(c, errors.New(common.MissOrderNo))
|
service.Error(c, errors.New(common.MissOrderNo))
|
||||||
return
|
return
|
||||||
@ -66,13 +86,13 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 获取套餐详情(待替换逻辑)
|
// 获取套餐详情(待替换逻辑)
|
||||||
bundleDetail, err := service.BundleProvider.BundleDetail(context.Background(), &bundle.BundleDetailRequest{
|
//bundleDetail, err := service.BundleProvider.BundleDetail(context.Background(), &bundle.BundleDetailRequest{
|
||||||
Uuid: req.BundleUuid,
|
// Uuid: req.BundleUuid,
|
||||||
})
|
//})
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
service.Error(c, err)
|
// service.Error(c, err)
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
// todo 需要判断购买的增值服务是否为可用时长 如果为可以用时长 合同截止日期为购买时长时间 否则合同截止日期为主套餐截止日期
|
// todo 需要判断购买的增值服务是否为可用时长 如果为可以用时长 合同截止日期为购买时长时间 否则合同截止日期为主套餐截止日期
|
||||||
// 处理多个增值服务
|
// 处理多个增值服务
|
||||||
type ValueAddServiceInfo struct {
|
type ValueAddServiceInfo struct {
|
||||||
@ -81,7 +101,7 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
ID int32
|
ID int32
|
||||||
}
|
}
|
||||||
// 计算总金额和确定截止日期
|
// 计算总金额和确定截止日期
|
||||||
var expirationDate string
|
//var expirationDate string
|
||||||
var addPriceList []*bundle.AddPriceOptionsInfo
|
var addPriceList []*bundle.AddPriceOptionsInfo
|
||||||
var totalAmount float32
|
var totalAmount float32
|
||||||
for _, svc := range req.AddPriceOptionsList {
|
for _, svc := range req.AddPriceOptionsList {
|
||||||
@ -111,8 +131,8 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
Num: svc.Num,
|
Num: svc.Num,
|
||||||
Unit: valueAddInfo.Unit,
|
Unit: valueAddInfo.Unit,
|
||||||
})
|
})
|
||||||
// 如果是可用时长服务,计算新的截止日期
|
// 如果是可用时长服务,计算新的截止日期 todo 不需要计算到期时间 在完成支付时添加
|
||||||
if valueAddInfo.ServiceType == 5 {
|
/*if valueAddInfo.ServiceType == 5 {
|
||||||
endDate := orderRecordResp.OrderRecord.ExpirationTime
|
endDate := orderRecordResp.OrderRecord.ExpirationTime
|
||||||
if endDate == "9999-12-31" {
|
if endDate == "9999-12-31" {
|
||||||
service.Error(c, errors.New(common.ErrorPermanentPackage))
|
service.Error(c, errors.New(common.ErrorPermanentPackage))
|
||||||
@ -126,27 +146,27 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
newDeadline := calculateExpirationDate(t, svc.Num, valueAddInfo.Unit)
|
newDeadline := calculateExpirationDate(t, svc.Num, valueAddInfo.Unit)
|
||||||
expirationDate = newDeadline
|
expirationDate = newDeadline
|
||||||
//}
|
//}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
// 如果没有可用时长服务,使用主套餐截止日期
|
// 如果没有可用时长服务,使用主套餐截止日期
|
||||||
if expirationDate == "" {
|
//if expirationDate == "" {
|
||||||
expirationDate = orderRecordResp.OrderRecord.ExpirationTime
|
// expirationDate = orderRecordResp.OrderRecord.ExpirationTime
|
||||||
}
|
//}
|
||||||
req.CustomerNum = userInfo.SubNum
|
req.CustomerNum = userInfo.SubNum
|
||||||
req.CustomerName = userInfo.Name
|
req.CustomerName = userInfo.Name
|
||||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||||
req.Source = 2
|
req.Source = 2
|
||||||
req.SignedTime = common.GetBeijingTime()
|
//req.SignedTime = common.GetBeijingTime()
|
||||||
req.ExpirationDate = expirationDate
|
//req.ExpirationDate = expirationDate
|
||||||
req.AddPriceOptionsList = addPriceList
|
req.AddPriceOptionsList = addPriceList
|
||||||
req.OrderUUID = orderRecordResp.OrderRecord.Uuid
|
req.OrderUUID = orderRecordResp.OrderRecord.Uuid
|
||||||
// 当前 未将 签名 写入合同中
|
// 当前 未将 签名 写入合同中 todo 购买增值服务取消签约合同
|
||||||
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Bundle.Contract, totalAmount, expirationDate)
|
//signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Bundle.Contract, totalAmount, expirationDate)
|
||||||
if signContractErr != nil {
|
//if signContractErr != nil {
|
||||||
service.Error(c, signContractErr)
|
// service.Error(c, signContractErr)
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
req.SignContract = signContract
|
//req.SignContract = signContract
|
||||||
// 创建增值服务订单记录
|
// 创建增值服务订单记录
|
||||||
res, err := service.BundleProvider.CreateOrderAddRecord(context.Background(), &req)
|
res, err := service.BundleProvider.CreateOrderAddRecord(context.Background(), &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -182,10 +202,13 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
service.Error(c, errors.New(common.MissBundleUUID))
|
service.Error(c, errors.New(common.MissBundleUUID))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if req.Language == "" {
|
||||||
|
req.Language = c.GetHeader("Accept-Language")
|
||||||
if req.Language == "" {
|
if req.Language == "" {
|
||||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 不去校验 签名
|
// 不去校验 签名
|
||||||
/*if req.Signature == "" {
|
/*if req.Signature == "" {
|
||||||
service.Error(c, errors.New(common.MissOrderSignature))
|
service.Error(c, errors.New(common.MissOrderSignature))
|
||||||
@ -219,7 +242,11 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
//有套餐并且套餐未过期
|
//有套餐并且套餐未过期
|
||||||
if orderRecordsList.OrderRecords != nil {
|
if orderRecordsList.OrderRecords != nil {
|
||||||
for _, orderInfo := range orderRecordsList.OrderRecords {
|
for _, orderInfo := range orderRecordsList.OrderRecords {
|
||||||
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.ExpirationTime > time.Now().Format("2006-01-02") {
|
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.Status == 1 {
|
||||||
|
service.Error(c, errors.New(common.ThereAreOutstandingOrders))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.ExpirationTime > time.Now().Format("2006-01-02 15:04:05") {
|
||||||
service.Error(c, errors.New(common.HadOrder))
|
service.Error(c, errors.New(common.HadOrder))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -245,8 +272,9 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
// 获取 套餐信息
|
// 获取 套餐信息
|
||||||
bundleDetailReq := &bundle.BundleDetailRequest{
|
bundleDetailReq := &bundle.BundleDetailRequest{
|
||||||
Uuid: req.BundleUuid,
|
Uuid: req.BundleUuid,
|
||||||
|
Language: req.Language,
|
||||||
}
|
}
|
||||||
bundleDetail, detailErr := service.BundleProvider.BundleDetail(context.Background(), bundleDetailReq)
|
bundleDetail, detailErr := service.BundleProvider.BundleLangDetailV2(context.Background(), bundleDetailReq)
|
||||||
if detailErr != nil {
|
if detailErr != nil {
|
||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
return
|
return
|
||||||
@ -292,7 +320,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
|
||||||
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Bundle.Contract, addTotalPrice, expirationDay)
|
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, addTotalPrice, expirationDay)
|
||||||
if signContractErr != nil {
|
if signContractErr != nil {
|
||||||
service.Error(c, signContractErr)
|
service.Error(c, signContractErr)
|
||||||
return
|
return
|
||||||
@ -300,17 +328,17 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
req.CustomerNum = userInfo.SubNum
|
req.CustomerNum = userInfo.SubNum
|
||||||
req.CustomerName = userInfo.Name
|
req.CustomerName = userInfo.Name
|
||||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||||
req.BundleName = bundleDetail.Bundle.Name
|
req.BundleName = bundleDetail.Name
|
||||||
req.Amount = bundleDetail.Bundle.Price
|
req.Amount = bundleDetail.Price
|
||||||
req.AmountType = bundleDetail.Bundle.PriceType
|
req.AmountType = bundleDetail.PriceType
|
||||||
req.BundleCommonUid = bundleDetail.Bundle.BundleCommonUid
|
//req.BundleCommonUid = bundleDetail.BundleCommonUid
|
||||||
req.TotalAmount = bundleDetail.Bundle.Price + addTotalPrice
|
req.TotalAmount = bundleDetail.Price + addTotalPrice
|
||||||
req.ContractNo = common.GenerateContractNo(lastContractNo)
|
req.ContractNo = common.GenerateContractNo(lastContractNo)
|
||||||
req.SignContract = signContract
|
req.SignContract = signContract
|
||||||
req.SignedTime = common.GetBeijingTime()
|
req.SignedTime = common.GetBeijingTime()
|
||||||
req.Status = bundleModel.OrderSigned
|
req.Status = bundleModel.OrderSigned
|
||||||
req.AddRecords = addRecords
|
req.AddRecords = addRecords
|
||||||
req.ExpirationTime = expirationDay
|
//req.ExpirationTime = expirationDay //过期日期取消 在完成支付是更新
|
||||||
req.PayType = 1
|
req.PayType = 1
|
||||||
|
|
||||||
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
|
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
|
||||||
@ -480,6 +508,184 @@ func OrderRecordsListV2(c *gin.Context) {
|
|||||||
|
|
||||||
service.Success(c, orderList)
|
service.Success(c, orderList)
|
||||||
}
|
}
|
||||||
|
func OrderRecordsListDownload(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 {
|
||||||
|
// 收集订单里的所有用户ID
|
||||||
|
userIdSet := make(map[int64]struct{})
|
||||||
|
for _, i := range orderList.BundleInfo {
|
||||||
|
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 orderList.BundleInfo {
|
||||||
|
if u, ok := userMap[item.CustomerId]; ok {
|
||||||
|
item.CustomerName = u.Name
|
||||||
|
item.TelNum = u.TelNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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)
|
||||||
|
f.SetCellValue(sheetName, cell, h)
|
||||||
|
}
|
||||||
|
|
||||||
|
rowIndex := 2
|
||||||
|
for _, bundleInfo := range orderList {
|
||||||
|
addCount := len(bundleInfo.AddBundleInfo)
|
||||||
|
mergeRows := 1
|
||||||
|
if addCount > 1 {
|
||||||
|
mergeRows = addCount
|
||||||
|
}
|
||||||
|
|
||||||
|
// 写入主订单信息并合并单元格
|
||||||
|
for i := 0; i < 7; i++ {
|
||||||
|
col := string(rune('A' + i))
|
||||||
|
startCell := fmt.Sprintf("%s%d", col, rowIndex)
|
||||||
|
endCell := fmt.Sprintf("%s%d", col, rowIndex+mergeRows-1)
|
||||||
|
if mergeRows > 1 {
|
||||||
|
f.MergeCell(sheetName, startCell, endCell)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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), GetPayStatusText(bundleInfo.PayStatus))
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.CustomerName)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.BundleCreateAt)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.Amount)
|
||||||
|
|
||||||
|
if addCount > 0 {
|
||||||
|
for i, add := range bundleInfo.AddBundleInfo {
|
||||||
|
r := rowIndex + i
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("H%d", r), add.OrderAddNo)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("I%d", r), add.Amount)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.SettlementAmount)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), GetCurrencyTypeText(add.CurrencyType))
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.HandlingFee)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), add.ExchangeRate)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.OrderAddCreateAt)
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), GetPayStatusText(add.AddPayStatus))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for i := 8; i <= 15; i++ {
|
||||||
|
col := string(rune('A' + i))
|
||||||
|
f.SetCellValue(sheetName, fmt.Sprintf("%s%d", col, rowIndex), "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rowIndex += mergeRows
|
||||||
|
}
|
||||||
|
|
||||||
|
return f, nil
|
||||||
|
}
|
||||||
|
func GetPayStatusText(status int32) string {
|
||||||
|
switch status {
|
||||||
|
case 1:
|
||||||
|
return "未支付"
|
||||||
|
case 2:
|
||||||
|
return "已支付"
|
||||||
|
default:
|
||||||
|
return strconv.Itoa(int(status))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助函数:获取货币类型文本
|
||||||
|
func GetCurrencyTypeText(currencyType int32) string {
|
||||||
|
switch currencyType {
|
||||||
|
case 1:
|
||||||
|
return "人民币"
|
||||||
|
case 2:
|
||||||
|
return "美元"
|
||||||
|
default:
|
||||||
|
return strconv.Itoa(int(currencyType))
|
||||||
|
}
|
||||||
|
}
|
||||||
func OrderRecordsList(c *gin.Context) {
|
func OrderRecordsList(c *gin.Context) {
|
||||||
var req bundle.OrderRecordsRequest
|
var req bundle.OrderRecordsRequest
|
||||||
|
|
||||||
|
@ -17,13 +17,20 @@ const (
|
|||||||
InvalidOrderAmount = "订单金额错误"
|
InvalidOrderAmount = "订单金额错误"
|
||||||
|
|
||||||
HadPay = "订单已支付"
|
HadPay = "订单已支付"
|
||||||
|
ThereAreOutstandingOrders = "您还有未支付的订单,无法再次购买"
|
||||||
HadOrder = "您已购买过套餐,无法再次购买"
|
HadOrder = "您已购买过套餐,无法再次购买"
|
||||||
InvalidValueAddBundleNum = "套餐数量无效"
|
InvalidValueAddBundleNum = "套餐数量无效"
|
||||||
ThePackageHasExpired = "当前套餐已过期"
|
ThePackageHasExpired = "当前套餐已过期"
|
||||||
ErrorPermanentPackage = "永久套餐无需购买"
|
ErrorPermanentPackage = "永久套餐无需购买"
|
||||||
)
|
)
|
||||||
|
const (
|
||||||
|
OrderTypePackage = 1 // 套餐
|
||||||
|
OrderTypeAddon = 2 // 增值服务
|
||||||
|
|
||||||
|
TimeUnitDay = 1
|
||||||
|
TimeUnitMonth = 2
|
||||||
|
TimeUnitYear = 3
|
||||||
|
)
|
||||||
const (
|
const (
|
||||||
ErrorExportOrderInfo = "导出订单信息失败"
|
ErrorExportOrderInfo = "导出订单信息失败"
|
||||||
)
|
)
|
||||||
|
@ -250,7 +250,18 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
service.Error(c, updateOrderRecordErr)
|
service.Error(c, updateOrderRecordErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
////创建对账单 todo 待修改
|
||||||
|
//_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||||
|
// BundleOrderOn: detail.OrderRecord.OrderNo,
|
||||||
|
// BundleAddOrderOn: detail.OrderRecord.OrderNo,
|
||||||
|
// UserName: userInfo.Name,
|
||||||
|
// UserTel: userInfo.TelNum,
|
||||||
|
// BundleName: detail.OrderRecord.BundleName,
|
||||||
|
// Amount: detail.OrderRecord.TotalAmount,
|
||||||
|
// CurrencyType: int32(detail.OrderRecord.AmountType),
|
||||||
|
// PayStatus: 1,
|
||||||
|
// UserId: userInfo.ID,
|
||||||
|
//})
|
||||||
service.Success(c, resp)
|
service.Success(c, resp)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -363,7 +374,75 @@ func AntomWebhook(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//添加余额
|
||||||
|
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||||
|
OrderNo: resp.OutTradeNo,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//购买套餐
|
||||||
|
switch orderLimit.Type {
|
||||||
|
case common.OrderTypePackage:
|
||||||
|
//如果是购买套餐 1:创建新的余量信息CreateBundleBalance 2 添加扩展记录BundleExtend
|
||||||
|
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||||
|
UserId: int32(orderLimit.UserId),
|
||||||
|
OrderUUID: orderLimit.OrderUUID,
|
||||||
|
AccountNumber: orderLimit.AccountNumber,
|
||||||
|
VideoNumber: orderLimit.VideoNumber,
|
||||||
|
ImageNumber: orderLimit.ImageNumber,
|
||||||
|
DataAnalysisNumber: orderLimit.DataNumber,
|
||||||
|
ExpansionPacksNumber: 1,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case common.OrderTypeAddon:
|
||||||
|
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
||||||
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
|
UserId: int32(orderLimit.UserId),
|
||||||
|
OrderUUID: orderLimit.OrderUUID,
|
||||||
|
AccountNumber: orderLimit.AccountNumber,
|
||||||
|
VideoNumber: orderLimit.VideoNumber,
|
||||||
|
ImageNumber: orderLimit.ImageNumber,
|
||||||
|
DataAnalysisNumber: orderLimit.DataNumber,
|
||||||
|
ExpansionPacksNumber: 1,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
service.Error(c, errors.New("无效的订单类型"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var timeUnit uint32
|
||||||
|
switch orderLimit.Unit {
|
||||||
|
case "天":
|
||||||
|
timeUnit = common.TimeUnitDay
|
||||||
|
case "月":
|
||||||
|
timeUnit = common.TimeUnitMonth
|
||||||
|
case "年":
|
||||||
|
timeUnit = common.TimeUnitYear
|
||||||
|
default:
|
||||||
|
timeUnit = 0
|
||||||
|
}
|
||||||
|
_, err = service.BundleProvider.BundleExtend(context.Background(), &bundle.BundleExtendRequest{
|
||||||
|
UserId: int64(orderLimit.UserId),
|
||||||
|
AccountAdditional: uint32(orderLimit.AccountNumber),
|
||||||
|
VideoAdditional: uint32(orderLimit.VideoNumber),
|
||||||
|
ImagesAdditional: uint32(orderLimit.ImageNumber),
|
||||||
|
DataAdditional: uint32(orderLimit.DataNumber),
|
||||||
|
AvailableDurationAdditional: uint32(orderLimit.Duration),
|
||||||
|
TimeUnit: timeUnit,
|
||||||
|
AssociatedorderNumber: resp.OutTradeNo, //增值服务订单号
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
service.Success(c)
|
service.Success(c)
|
||||||
}
|
}
|
||||||
|
75
pkg/service/bundle/reconciliation.go
Normal file
75
pkg/service/bundle/reconciliation.go
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
package bundle
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fonchain-fiee/api/bundle"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
"fonchain-fiee/pkg/utils"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/gin-gonic/gin/binding"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetReconciliationList(c *gin.Context) {
|
||||||
|
var req bundle.GetReconciliationListReq
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
||||||
|
if detailErr != nil {
|
||||||
|
service.Error(c, detailErr)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(c, detail)
|
||||||
|
return
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetReconciliationListDownload(c *gin.Context) {
|
||||||
|
var req bundle.GetReconciliationListReq
|
||||||
|
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
|
||||||
|
if detailErr != nil {
|
||||||
|
service.Error(c, detailErr)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
titleList := []string{
|
||||||
|
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "艺人", "艺人手机号", "套餐", "支付金额", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||||
|
}
|
||||||
|
var dataList []interface{}
|
||||||
|
|
||||||
|
for _, i := range detail.List {
|
||||||
|
payStatus := GetPayStatusText(i.PayStatus)
|
||||||
|
currencyType := GetCurrencyTypeText(i.CurrencyType)
|
||||||
|
payChannel := "未知"
|
||||||
|
if i.PayChannel == 1 {
|
||||||
|
payChannel = "支付宝"
|
||||||
|
}
|
||||||
|
data := []any{
|
||||||
|
i.BundleOrderOn,
|
||||||
|
i.BundleAddOrderOn,
|
||||||
|
i.CreationTime,
|
||||||
|
i.UserName,
|
||||||
|
i.UserTel,
|
||||||
|
i.BundleName,
|
||||||
|
i.PayAmount,
|
||||||
|
currencyType,
|
||||||
|
payChannel,
|
||||||
|
i.PayTime,
|
||||||
|
payStatus,
|
||||||
|
i.SerialNumber,
|
||||||
|
}
|
||||||
|
dataList = append(dataList, &data)
|
||||||
|
}
|
||||||
|
content, err := utils.ToExcelByType(titleList, dataList, "slice", "")
|
||||||
|
if err != nil {
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
utils.ResponseXls(c, content, "对账单")
|
||||||
|
return
|
||||||
|
|
||||||
|
}
|
45
pkg/service/cast/approval.go
Normal file
45
pkg/service/cast/approval.go
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/e"
|
||||||
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
|
"fonchain-fiee/pkg/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CastService struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CastService) ApprovalDetail(approvalIds []int) (data map[int]modelCast.Item, err error) {
|
||||||
|
type ApprovalDetailRequest struct {
|
||||||
|
ID []int `json:"ID"`
|
||||||
|
}
|
||||||
|
req := ApprovalDetailRequest{
|
||||||
|
ID: approvalIds,
|
||||||
|
}
|
||||||
|
idsBytes, _ := json.Marshal(req)
|
||||||
|
var respBody string
|
||||||
|
url := fmt.Sprintf(config.AppConfig.System.ErpHost + "/approval/list/ex")
|
||||||
|
respBody, err = utils.Post(url, string(idsBytes))
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var respDetail modelCast.ApprovalDetailResponse
|
||||||
|
if err = json.Unmarshal([]byte(respBody), &respDetail); err != nil {
|
||||||
|
err = errors.New(e.GetMsg(e.JsonUnmarshal))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if respDetail.Status == 0 && len(respDetail.Data.Data) > 0 {
|
||||||
|
data = make(map[int]modelCast.Item, len(respDetail.Data.Data))
|
||||||
|
for _, v := range respDetail.Data.Data {
|
||||||
|
data[v.ID] = v
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
err = errors.New(e.GetMsg(e.ErrorHttp))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
@ -4,11 +4,14 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/cmd/config"
|
"fonchain-fiee/cmd/config"
|
||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"go.uber.org/zap"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -34,6 +37,7 @@ func MediaUserList(ctx *gin.Context) {
|
|||||||
|
|
||||||
func UnbindManager(ctx *gin.Context) {
|
func UnbindManager(ctx *gin.Context) {
|
||||||
var req *cast.UnbindManagerReq
|
var req *cast.UnbindManagerReq
|
||||||
|
var resp *cast.UnbindManagerResp
|
||||||
var err error
|
var err error
|
||||||
if err = ctx.ShouldBind(&req); err != nil {
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
@ -43,11 +47,24 @@ func UnbindManager(ctx *gin.Context) {
|
|||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err = service.CastProvider.UnbindManager(ctx, req)
|
resp, err = service.CastProvider.UnbindManager(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
zap.L().Info("UnbindManager resp", zap.Any("resp", resp))
|
||||||
|
if resp.OldBindArtistUuid != "" {
|
||||||
|
userID, _ := strconv.ParseInt(resp.OldBindArtistUuid, 10, 64)
|
||||||
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
|
UserId: int32(userID),
|
||||||
|
AccountConsumptionNumber: -1,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
//FIXME 进行回滚
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
service.Success(ctx, nil)
|
service.Success(ctx, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -104,11 +121,74 @@ func UpdateMediaAccount(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
req.ArtistName = infoResp.Name
|
req.ArtistName = infoResp.Name
|
||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
if _, ok := cast.PlatformIDENUM_name[int32(req.PlatformID)]; !ok {
|
if _, ok := cast.PlatformIDENUM_name[int32(req.PlatformID)]; !ok {
|
||||||
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
userID, _ := strconv.ParseInt(req.ArtistUuid, 10, 64)
|
||||||
|
if req.MediaAccountUuid == "" {
|
||||||
|
if err = CheckUserBundleBalance(int32(userID), modelCast.BalanceTypeAccountValue); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
|
UserId: int32(userID),
|
||||||
|
AccountConsumptionNumber: 1,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
resp, err := service.CastProvider.UpdateMediaAccount(ctx, req)
|
resp, err := service.CastProvider.UpdateMediaAccount(ctx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
if req.MediaAccountUuid == "" {
|
||||||
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
|
UserId: int32(userID),
|
||||||
|
AccountConsumptionNumber: -1,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func OAuthUrl(ctx *gin.Context) {
|
||||||
|
var req *cast.OAuthYoutubeUrlReq
|
||||||
|
var resp *cast.OAuthYoutubeUrlResp
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err = req.Validate(); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if resp, err = service.CastProvider.OAuthYoutubeUrl(ctx, req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func OAuth2Callback(ctx *gin.Context) {
|
||||||
|
code := ctx.Query("code")
|
||||||
|
state := ctx.Query("state")
|
||||||
|
//scope := ctx.Query("scope")
|
||||||
|
resp, err := service.CastProvider.OAuthYoutubeToken(ctx, &cast.OAuthYoutubeTokenReq{
|
||||||
|
MediaAccountUuid: state,
|
||||||
|
Code: code,
|
||||||
|
//scope: scope,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -116,3 +196,8 @@ func UpdateMediaAccount(ctx *gin.Context) {
|
|||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test(ctx *gin.Context) {
|
||||||
|
service.Success(ctx, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
1
pkg/service/cast/oauth.go
Normal file
1
pkg/service/cast/oauth.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package cast
|
29
pkg/service/cast/user.go
Normal file
29
pkg/service/cast/user.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||||
|
"fmt"
|
||||||
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/model/login"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewCtxWithUserInfo(ctx *gin.Context) (newCtx context.Context) {
|
||||||
|
var userInfo = login.Info{}
|
||||||
|
if config.AppConfig.System.AppMode != "dev" {
|
||||||
|
userInfo = login.GetUserInfoFromC(ctx)
|
||||||
|
} else {
|
||||||
|
userInfo = login.Info{
|
||||||
|
ID: 61,
|
||||||
|
Name: "小波",
|
||||||
|
TelNum: "18288888888",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var mm = make(map[string]interface{}, 3)
|
||||||
|
mm["userid"] = fmt.Sprintf("%d", userInfo.ID)
|
||||||
|
mm["name"] = userInfo.Name
|
||||||
|
mm["phone"] = userInfo.TelNum
|
||||||
|
newCtx = context.WithValue(context.Background(), constant.DubboCtxKey("attachment"), mm)
|
||||||
|
return
|
||||||
|
}
|
@ -2,11 +2,17 @@ package cast
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
"fonchain-fiee/cmd/config"
|
"fonchain-fiee/cmd/config"
|
||||||
|
"fonchain-fiee/pkg/e"
|
||||||
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"go.uber.org/zap"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,10 +38,19 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
infoResp = &accountFiee.UserInfoResponse{
|
infoResp = &accountFiee.UserInfoResponse{
|
||||||
Name: "小波",
|
Name: "小波",
|
||||||
TelNum: "18288888888",
|
TelNum: "18288888888",
|
||||||
|
TelAreaCode: "86",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
req.ArtistName = infoResp.Name
|
||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
resp, err := service.CastProvider.UpdateWorkImage(ctx, req)
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
|
artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
|
||||||
|
if err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -66,10 +81,19 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
infoResp = &accountFiee.UserInfoResponse{
|
infoResp = &accountFiee.UserInfoResponse{
|
||||||
Name: "小波",
|
Name: "小波",
|
||||||
TelNum: "18288888888",
|
TelNum: "18288888888",
|
||||||
|
TelAreaCode: "86",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
|
||||||
|
if err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.ArtistName = infoResp.Name
|
||||||
req.ArtistPhone = infoResp.TelNum
|
req.ArtistPhone = infoResp.TelNum
|
||||||
resp, err := service.CastProvider.UpdateWorkVideo(ctx, req)
|
req.ArtistPhoneAreaCode = infoResp.TelAreaCode
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -77,3 +101,263 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UpdateApproval(ctx *gin.Context) {
|
||||||
|
var req *cast.UpdateStatusReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req.WorkAction = cast.WorkActionENUM_APPROVAL
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.UpdateStatus(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func WorkList(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
req *cast.WorkListReq
|
||||||
|
resp *cast.WorkListResp
|
||||||
|
)
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err = service.CastProvider.WorkList(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(resp.Data) > 0 {
|
||||||
|
var workUuidApprovalIDMap = make(map[int]string)
|
||||||
|
for _, v := range resp.Data {
|
||||||
|
if v.WorkStatus == 2 && v.ApprovalID != "" {
|
||||||
|
approvalID, _ := strconv.ParseUint(v.ApprovalID, 10, 64)
|
||||||
|
workUuidApprovalIDMap[int(approvalID)] = v.WorkUuid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(workUuidApprovalIDMap) > 0 {
|
||||||
|
_ = RefreshWorkApprovalStatus(ctx, workUuidApprovalIDMap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func WorkDetail(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
req *cast.WorkDetailReq
|
||||||
|
resp *cast.WorkDetailResp
|
||||||
|
)
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err = service.CastProvider.WorkDetail(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func CheckUserBundleBalance(userID int32, balanceType modelCast.BalanceTypeEnum) (err error) {
|
||||||
|
resp, err := service.BundleProvider.GetBundleBalanceByUserId(context.Background(), &bundle.GetBundleBalanceByUserIdReq{UserId: userID})
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
zap.L().Info("CheckUserBundleBalance", zap.Any("resp", resp))
|
||||||
|
fmt.Println("CheckUserBundleBalance resp", resp)
|
||||||
|
switch balanceType {
|
||||||
|
case modelCast.BalanceTypeAccountValue:
|
||||||
|
if resp.AccountNumber-resp.AccountConsumptionNumber <= 0 {
|
||||||
|
err = errors.New(e.ErrorBalanceInsufficient)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case modelCast.BalanceTypeImageValue:
|
||||||
|
if resp.ImageNumber-resp.ImageConsumptionNumber <= 0 {
|
||||||
|
err = errors.New(e.ErrorBalanceInsufficient)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case modelCast.BalanceTypeVideoValue:
|
||||||
|
if resp.VideoNumber-resp.VideoConsumptionNumber <= 0 {
|
||||||
|
err = errors.New(e.ErrorBalanceInsufficient)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func RePublish(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
req *cast.RePublishReq
|
||||||
|
resp *cast.RePublishResp
|
||||||
|
)
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err = service.CastProvider.RePublish(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
artistID, _ := strconv.ParseUint(resp.ArtistUuid, 10, 64)
|
||||||
|
balanceReq := &bundle.AddBundleBalanceReq{
|
||||||
|
UserId: int32(artistID),
|
||||||
|
}
|
||||||
|
if resp.WorkCategory == 1 {
|
||||||
|
balanceReq.ImageConsumptionNumber = 1
|
||||||
|
}
|
||||||
|
if resp.WorkCategory == 2 {
|
||||||
|
balanceReq.VideoConsumptionNumber = 1
|
||||||
|
}
|
||||||
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), balanceReq)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
//FIXME 进行回滚
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改余量我还需要调用吗
|
||||||
|
func UserBundleBalanceCost() {
|
||||||
|
service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{})
|
||||||
|
}
|
||||||
|
|
||||||
|
func RefreshWorkApprovalStatus(ctx *gin.Context, approvalIDWorkUuidMap map[int]string) (err error) {
|
||||||
|
var castS = new(CastService)
|
||||||
|
var data = make(map[int]modelCast.Item)
|
||||||
|
var approvalIDs []int
|
||||||
|
for approvalId, _ := range approvalIDWorkUuidMap {
|
||||||
|
approvalIDs = append(approvalIDs, approvalId)
|
||||||
|
}
|
||||||
|
if len(approvalIDs) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
data, err = castS.ApprovalDetail(approvalIDs)
|
||||||
|
// status: 1待审批 2审批通过 3审批不通过 6撤销发其中 7撤销完成
|
||||||
|
var newData = make(map[int]modelCast.Item, len(approvalIDs))
|
||||||
|
for _, v := range approvalIDs {
|
||||||
|
newData[v] = data[v]
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
if len(newData) > 0 {
|
||||||
|
for approvalId, v := range newData {
|
||||||
|
if v.ID == 0 {
|
||||||
|
_, _ = service.CastProvider.UpdateStatus(newCtx, &cast.UpdateStatusReq{
|
||||||
|
WorkAction: cast.WorkActionENUM_APPROVAL_DELETE,
|
||||||
|
WorkUuid: approvalIDWorkUuidMap[approvalId],
|
||||||
|
ApprovalID: fmt.Sprint(approvalId),
|
||||||
|
ApprovalReply: "",
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var workAction cast.WorkActionENUM
|
||||||
|
if v.Status == 2 {
|
||||||
|
workAction = cast.WorkActionENUM_APPROVAL_PASS
|
||||||
|
} else if v.Status == 3 {
|
||||||
|
workAction = cast.WorkActionENUM_APPROVAL_REJECT
|
||||||
|
} else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
_, _ = service.CastProvider.UpdateStatus(newCtx, &cast.UpdateStatusReq{
|
||||||
|
WorkAction: workAction,
|
||||||
|
WorkUuid: approvalIDWorkUuidMap[approvalId],
|
||||||
|
ApprovalID: fmt.Sprint(approvalId),
|
||||||
|
ApprovalReply: v.Reply,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DelWork(ctx *gin.Context) {
|
||||||
|
var req *cast.DelWorkReq
|
||||||
|
var err error
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
_, err = service.CastProvider.DelWork(newCtx, req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Remind(ctx *gin.Context) {
|
||||||
|
var req *cast.WorkInfoReq
|
||||||
|
var err error
|
||||||
|
var workInfo *cast.WorkInfoResp
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
workInfo, err = service.CastProvider.WorkInfo(context.Background(), req)
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if workInfo.WorkStatus != modelCast.WorkStatusArtistConfirming {
|
||||||
|
service.Error(ctx, errors.New(e.InvalidStatus))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if workInfo.ArtistPhoneAreaCode == "" {
|
||||||
|
workInfo.ArtistPhoneAreaCode = "86"
|
||||||
|
}
|
||||||
|
artistID, _ := strconv.ParseUint(workInfo.ArtistUuid, 10, 64)
|
||||||
|
infoResp, err := service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||||
|
ID: artistID,
|
||||||
|
Domain: "app",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if workInfo.ArtistPhoneAreaCode == "86" {
|
||||||
|
_, err = service.AccountFieeProvider.OnlySendMsg(context.Background(), &accountFiee.SendMsgRequest{
|
||||||
|
Domain: "app",
|
||||||
|
TelNum: infoResp.TelNum,
|
||||||
|
Project: "fiee",
|
||||||
|
SignNo: 0,
|
||||||
|
MId: 277385,
|
||||||
|
Scope: "",
|
||||||
|
Zone: infoResp.TelAreaCode,
|
||||||
|
NonceStr: "",
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
_, err = service.AccountFieeProvider.SendNationTemplateMsg(context.Background(), &accountFiee.SendNationMsgRequest{
|
||||||
|
Domain: "app",
|
||||||
|
TelNum: fmt.Sprintf("%s%s", infoResp.TelAreaCode, infoResp.TelNum),
|
||||||
|
Project: "fiee",
|
||||||
|
SignNo: 0,
|
||||||
|
MId: 108375,
|
||||||
|
Scope: "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
service.Success(ctx, nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
34
pkg/utils/http.go
Normal file
34
pkg/utils/http.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Post(url, data string) (string, error) {
|
||||||
|
reader := bytes.NewReader([]byte(data))
|
||||||
|
|
||||||
|
request, err := http.NewRequest("POST", url, reader)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
defer request.Body.Close() //程序在使用完回复后必须关闭回复的主体
|
||||||
|
request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
||||||
|
//必须设定该参数,POST参数才能正常提交,意思是以json串提交数据
|
||||||
|
|
||||||
|
client := http.Client{}
|
||||||
|
resp, err := client.Do(request) //Do 方法发送请求,返回 HTTP 回复
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
respBytes, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
//byte数组直接转成string,优化内存
|
||||||
|
// str := (*string)(unsafe.Pointer(&respBytes))
|
||||||
|
return string(respBytes), nil
|
||||||
|
}
|
@ -5,7 +5,10 @@ import (
|
|||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/tealeg/xlsx"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -78,3 +81,44 @@ func CheckDirPath(path string, create bool) (exists bool, err error) {
|
|||||||
exists = true
|
exists = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToExcelByType 转成Excel类型
|
||||||
|
func ToExcelByType(titleList []string, dataList []interface{}, dataType string, filePath string) (content io.ReadSeeker, err error) {
|
||||||
|
// 生成一个新的文件
|
||||||
|
file := xlsx.NewFile()
|
||||||
|
// 添加sheet页
|
||||||
|
sheet, _ := file.AddSheet("Sheet1")
|
||||||
|
// 插入表头
|
||||||
|
titleRow := sheet.AddRow()
|
||||||
|
for _, v := range titleList {
|
||||||
|
cell := titleRow.AddCell()
|
||||||
|
cell.Value = v
|
||||||
|
}
|
||||||
|
// 插入内容
|
||||||
|
for _, v := range dataList {
|
||||||
|
row := sheet.AddRow()
|
||||||
|
if dataType == "struct" {
|
||||||
|
row.WriteStruct(v, -1)
|
||||||
|
} else if dataType == "slice" {
|
||||||
|
row.WriteSlice(v, -1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var buffer bytes.Buffer
|
||||||
|
_ = file.Write(&buffer)
|
||||||
|
if filePath != "" {
|
||||||
|
if err = file.Save(filePath); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
content = bytes.NewReader(buffer.Bytes())
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ResponseXls content 为上面生成的io.ReadSeeker, fileTag 为返回前端的文件名
|
||||||
|
func ResponseXls(c *gin.Context, content io.ReadSeeker, fileTag string) {
|
||||||
|
fileName := fmt.Sprintf("%s.%s", fileTag, ExcelPrefix)
|
||||||
|
c.Writer.Header().Add("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, fileName))
|
||||||
|
c.Writer.Header().Add("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
|
http.ServeContent(c.Writer, c.Request, fileName, time.Now(), content)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user