Merge branch 'dev' of http://gitea-inner.fontree.cn/fiee/fonchain-fiee into dev
This commit is contained in:
commit
48a85b000c
File diff suppressed because it is too large
Load Diff
@ -5,11 +5,11 @@ package bundle
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
|
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
|
||||||
math "math"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -303,6 +303,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
|
||||||
}
|
}
|
||||||
@ -422,3 +435,6 @@ func (this *OnlyAddValueListByOrderNoResp) Validate() error {
|
|||||||
func (this *AddBundleInfo) Validate() error {
|
func (this *AddBundleInfo) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
||||||
|
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 v5.26.1
|
// - protoc v3.20.3
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -58,6 +58,7 @@ 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)
|
||||||
// 余量管理
|
// 余量管理
|
||||||
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)
|
||||||
@ -74,6 +75,7 @@ type BundleClient interface {
|
|||||||
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, 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)
|
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)
|
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 {
|
||||||
@ -81,47 +83,49 @@ type bundleClient struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BundleClientImpl struct {
|
type BundleClientImpl struct {
|
||||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||||
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||||
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||||
HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error)
|
HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error)
|
||||||
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)
|
||||||
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)
|
||||||
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||||
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||||
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)
|
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
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)
|
||||||
SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error)
|
SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error)
|
||||||
ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
|
||||||
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)
|
||||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
BatchGetValueAddServiceLang func(ctx context.Context, in *BatchGetValueAddServiceLangRequest) (*BatchGetValueAddServiceLangResponse, error)
|
||||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||||
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||||
GetBundleBalanceByUserId func(ctx context.Context, in *GetBundleBalanceByUserIdReq) (*GetBundleBalanceByUserIdResp, error)
|
GetBundleBalanceList func(ctx context.Context, in *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
||||||
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
GetBundleBalanceByUserId func(ctx context.Context, in *GetBundleBalanceByUserIdReq) (*GetBundleBalanceByUserIdResp, error)
|
||||||
AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
||||||
GetUsedRecordList func(ctx context.Context, in *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
|
AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
||||||
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
GetUsedRecordList func(ctx context.Context, in *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
|
||||||
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
||||||
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||||
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||||
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, 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 {
|
||||||
@ -304,6 +308,12 @@ 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) 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)
|
||||||
@ -382,6 +392,12 @@ func (c *bundleClient) UpdateReconciliation(ctx context.Context, in *Reconciliat
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliation", in, out)
|
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
|
||||||
@ -416,6 +432,7 @@ 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)
|
||||||
// 余量管理
|
// 余量管理
|
||||||
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||||
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||||
@ -432,6 +449,7 @@ type BundleServer interface {
|
|||||||
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
|
UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
|
||||||
mustEmbedUnimplementedBundleServer()
|
mustEmbedUnimplementedBundleServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,6 +542,9 @@ 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) 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")
|
||||||
}
|
}
|
||||||
@ -563,6 +584,9 @@ func (UnimplementedBundleServer) CreateReconciliation(context.Context, *Reconcil
|
|||||||
func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) {
|
func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliation not implemented")
|
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
|
||||||
}
|
}
|
||||||
@ -1403,6 +1427,35 @@ 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_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 {
|
||||||
@ -1780,6 +1833,35 @@ func _Bundle_UpdateReconciliation_Handler(srv interface{}, ctx context.Context,
|
|||||||
return interceptor(ctx, in, info, handler)
|
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)
|
||||||
@ -1899,6 +1981,10 @@ 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: "BundleExtend",
|
MethodName: "BundleExtend",
|
||||||
Handler: _Bundle_BundleExtend_Handler,
|
Handler: _Bundle_BundleExtend_Handler,
|
||||||
@ -1951,6 +2037,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "UpdateReconciliation",
|
MethodName: "UpdateReconciliation",
|
||||||
Handler: _Bundle_UpdateReconciliation_Handler,
|
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",
|
||||||
|
1327
api/cast/cast.pb.go
1327
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
@ -149,6 +149,122 @@ var _ interface {
|
|||||||
ErrorName() string
|
ErrorName() string
|
||||||
} = MediaUserListReqValidationError{}
|
} = MediaUserListReqValidationError{}
|
||||||
|
|
||||||
|
// Validate checks the field values on MediaUserInfo with the rules defined in
|
||||||
|
// the proto definition for this message. If any rules are violated, the first
|
||||||
|
// error encountered is returned, or nil if there are no violations.
|
||||||
|
func (m *MediaUserInfo) Validate() error {
|
||||||
|
return m.validate(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateAll checks the field values on MediaUserInfo with the rules defined
|
||||||
|
// in the proto definition for this message. If any rules are violated, the
|
||||||
|
// result is a list of violation errors wrapped in MediaUserInfoMultiError, or
|
||||||
|
// nil if none found.
|
||||||
|
func (m *MediaUserInfo) ValidateAll() error {
|
||||||
|
return m.validate(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MediaUserInfo) validate(all bool) error {
|
||||||
|
if m == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var errors []error
|
||||||
|
|
||||||
|
// no validation rules for PlatformUserName
|
||||||
|
|
||||||
|
// no validation rules for PlatformID
|
||||||
|
|
||||||
|
// no validation rules for ArtistName
|
||||||
|
|
||||||
|
// no validation rules for ArtistPhone
|
||||||
|
|
||||||
|
// no validation rules for ArtistUuid
|
||||||
|
|
||||||
|
// no validation rules for ManagerUserName
|
||||||
|
|
||||||
|
// no validation rules for ManagerUuid
|
||||||
|
|
||||||
|
// no validation rules for MediaAccountUuid
|
||||||
|
|
||||||
|
if len(errors) > 0 {
|
||||||
|
return MediaUserInfoMultiError(errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MediaUserInfoMultiError is an error wrapping multiple validation errors
|
||||||
|
// returned by MediaUserInfo.ValidateAll() if the designated constraints
|
||||||
|
// aren't met.
|
||||||
|
type MediaUserInfoMultiError []error
|
||||||
|
|
||||||
|
// Error returns a concatenation of all the error messages it wraps.
|
||||||
|
func (m MediaUserInfoMultiError) Error() string {
|
||||||
|
var msgs []string
|
||||||
|
for _, err := range m {
|
||||||
|
msgs = append(msgs, err.Error())
|
||||||
|
}
|
||||||
|
return strings.Join(msgs, "; ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllErrors returns a list of validation violation errors.
|
||||||
|
func (m MediaUserInfoMultiError) AllErrors() []error { return m }
|
||||||
|
|
||||||
|
// MediaUserInfoValidationError is the validation error returned by
|
||||||
|
// MediaUserInfo.Validate if the designated constraints aren't met.
|
||||||
|
type MediaUserInfoValidationError struct {
|
||||||
|
field string
|
||||||
|
reason string
|
||||||
|
cause error
|
||||||
|
key bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Field function returns field value.
|
||||||
|
func (e MediaUserInfoValidationError) Field() string { return e.field }
|
||||||
|
|
||||||
|
// Reason function returns reason value.
|
||||||
|
func (e MediaUserInfoValidationError) Reason() string { return e.reason }
|
||||||
|
|
||||||
|
// Cause function returns cause value.
|
||||||
|
func (e MediaUserInfoValidationError) Cause() error { return e.cause }
|
||||||
|
|
||||||
|
// Key function returns key value.
|
||||||
|
func (e MediaUserInfoValidationError) Key() bool { return e.key }
|
||||||
|
|
||||||
|
// ErrorName returns error name.
|
||||||
|
func (e MediaUserInfoValidationError) ErrorName() string { return "MediaUserInfoValidationError" }
|
||||||
|
|
||||||
|
// Error satisfies the builtin error interface
|
||||||
|
func (e MediaUserInfoValidationError) Error() string {
|
||||||
|
cause := ""
|
||||||
|
if e.cause != nil {
|
||||||
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
key := ""
|
||||||
|
if e.key {
|
||||||
|
key = "key for "
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf(
|
||||||
|
"invalid %sMediaUserInfo.%s: %s%s",
|
||||||
|
key,
|
||||||
|
e.field,
|
||||||
|
e.reason,
|
||||||
|
cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ error = MediaUserInfoValidationError{}
|
||||||
|
|
||||||
|
var _ interface {
|
||||||
|
Field() string
|
||||||
|
Reason() string
|
||||||
|
Key() bool
|
||||||
|
Cause() error
|
||||||
|
ErrorName() string
|
||||||
|
} = MediaUserInfoValidationError{}
|
||||||
|
|
||||||
// Validate checks the field values on MediaUserListResp with the rules defined
|
// Validate checks the field values on MediaUserListResp with the rules defined
|
||||||
// in the proto definition for this message. If any rules are violated, the
|
// in the proto definition for this message. If any rules are violated, the
|
||||||
// first error encountered is returned, or nil if there are no violations.
|
// first error encountered is returned, or nil if there are no violations.
|
||||||
@ -2083,6 +2199,52 @@ func (m *WorkDetailResp) validate(all bool) error {
|
|||||||
|
|
||||||
// no validation rules for WorkCategory
|
// no validation rules for WorkCategory
|
||||||
|
|
||||||
|
{
|
||||||
|
sorted_keys := make([]string, len(m.GetMediaAccData()))
|
||||||
|
i := 0
|
||||||
|
for key := range m.GetMediaAccData() {
|
||||||
|
sorted_keys[i] = key
|
||||||
|
i++
|
||||||
|
}
|
||||||
|
sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
|
||||||
|
for _, key := range sorted_keys {
|
||||||
|
val := m.GetMediaAccData()[key]
|
||||||
|
_ = val
|
||||||
|
|
||||||
|
// no validation rules for MediaAccData[key]
|
||||||
|
|
||||||
|
if all {
|
||||||
|
switch v := interface{}(val).(type) {
|
||||||
|
case interface{ ValidateAll() error }:
|
||||||
|
if err := v.ValidateAll(); err != nil {
|
||||||
|
errors = append(errors, WorkDetailRespValidationError{
|
||||||
|
field: fmt.Sprintf("MediaAccData[%v]", key),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case interface{ Validate() error }:
|
||||||
|
if err := v.Validate(); err != nil {
|
||||||
|
errors = append(errors, WorkDetailRespValidationError{
|
||||||
|
field: fmt.Sprintf("MediaAccData[%v]", key),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
|
||||||
|
if err := v.Validate(); err != nil {
|
||||||
|
return WorkDetailRespValidationError{
|
||||||
|
field: fmt.Sprintf("MediaAccData[%v]", key),
|
||||||
|
reason: "embedded message failed validation",
|
||||||
|
cause: err,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
return WorkDetailRespMultiError(errors)
|
return WorkDetailRespMultiError(errors)
|
||||||
}
|
}
|
||||||
@ -2751,58 +2913,44 @@ var _ interface {
|
|||||||
ErrorName() string
|
ErrorName() string
|
||||||
} = MediaWorksRespValidationError{}
|
} = MediaWorksRespValidationError{}
|
||||||
|
|
||||||
// Validate checks the field values on MediaUserListResp_Info with the rules
|
// Validate checks the field values on OAuthYoutubeReq with the rules defined
|
||||||
// defined in the proto definition for this message. If any rules are
|
// in the proto definition for this message. If any rules are violated, the
|
||||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
// first error encountered is returned, or nil if there are no violations.
|
||||||
func (m *MediaUserListResp_Info) Validate() error {
|
func (m *OAuthYoutubeReq) Validate() error {
|
||||||
return m.validate(false)
|
return m.validate(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateAll checks the field values on MediaUserListResp_Info with the rules
|
// ValidateAll checks the field values on OAuthYoutubeReq with the rules
|
||||||
// defined in the proto definition for this message. If any rules are
|
// defined in the proto definition for this message. If any rules are
|
||||||
// violated, the result is a list of violation errors wrapped in
|
// violated, the result is a list of violation errors wrapped in
|
||||||
// MediaUserListResp_InfoMultiError, or nil if none found.
|
// OAuthYoutubeReqMultiError, or nil if none found.
|
||||||
func (m *MediaUserListResp_Info) ValidateAll() error {
|
func (m *OAuthYoutubeReq) ValidateAll() error {
|
||||||
return m.validate(true)
|
return m.validate(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MediaUserListResp_Info) validate(all bool) error {
|
func (m *OAuthYoutubeReq) validate(all bool) error {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var errors []error
|
var errors []error
|
||||||
|
|
||||||
// no validation rules for PlatformUserName
|
// no validation rules for Code
|
||||||
|
|
||||||
// no validation rules for PlatformID
|
|
||||||
|
|
||||||
// no validation rules for ArtistName
|
|
||||||
|
|
||||||
// no validation rules for ArtistPhone
|
|
||||||
|
|
||||||
// no validation rules for ArtistUuid
|
|
||||||
|
|
||||||
// no validation rules for ManagerUserName
|
|
||||||
|
|
||||||
// no validation rules for ManagerUuid
|
|
||||||
|
|
||||||
// no validation rules for MediaAccountUuid
|
|
||||||
|
|
||||||
if len(errors) > 0 {
|
if len(errors) > 0 {
|
||||||
return MediaUserListResp_InfoMultiError(errors)
|
return OAuthYoutubeReqMultiError(errors)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MediaUserListResp_InfoMultiError is an error wrapping multiple validation
|
// OAuthYoutubeReqMultiError is an error wrapping multiple validation errors
|
||||||
// errors returned by MediaUserListResp_Info.ValidateAll() if the designated
|
// returned by OAuthYoutubeReq.ValidateAll() if the designated constraints
|
||||||
// constraints aren't met.
|
// aren't met.
|
||||||
type MediaUserListResp_InfoMultiError []error
|
type OAuthYoutubeReqMultiError []error
|
||||||
|
|
||||||
// Error returns a concatenation of all the error messages it wraps.
|
// Error returns a concatenation of all the error messages it wraps.
|
||||||
func (m MediaUserListResp_InfoMultiError) Error() string {
|
func (m OAuthYoutubeReqMultiError) Error() string {
|
||||||
var msgs []string
|
var msgs []string
|
||||||
for _, err := range m {
|
for _, err := range m {
|
||||||
msgs = append(msgs, err.Error())
|
msgs = append(msgs, err.Error())
|
||||||
@ -2811,11 +2959,11 @@ func (m MediaUserListResp_InfoMultiError) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AllErrors returns a list of validation violation errors.
|
// AllErrors returns a list of validation violation errors.
|
||||||
func (m MediaUserListResp_InfoMultiError) AllErrors() []error { return m }
|
func (m OAuthYoutubeReqMultiError) AllErrors() []error { return m }
|
||||||
|
|
||||||
// MediaUserListResp_InfoValidationError is the validation error returned by
|
// OAuthYoutubeReqValidationError is the validation error returned by
|
||||||
// MediaUserListResp_Info.Validate if the designated constraints aren't met.
|
// OAuthYoutubeReq.Validate if the designated constraints aren't met.
|
||||||
type MediaUserListResp_InfoValidationError struct {
|
type OAuthYoutubeReqValidationError struct {
|
||||||
field string
|
field string
|
||||||
reason string
|
reason string
|
||||||
cause error
|
cause error
|
||||||
@ -2823,24 +2971,22 @@ type MediaUserListResp_InfoValidationError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Field function returns field value.
|
// Field function returns field value.
|
||||||
func (e MediaUserListResp_InfoValidationError) Field() string { return e.field }
|
func (e OAuthYoutubeReqValidationError) Field() string { return e.field }
|
||||||
|
|
||||||
// Reason function returns reason value.
|
// Reason function returns reason value.
|
||||||
func (e MediaUserListResp_InfoValidationError) Reason() string { return e.reason }
|
func (e OAuthYoutubeReqValidationError) Reason() string { return e.reason }
|
||||||
|
|
||||||
// Cause function returns cause value.
|
// Cause function returns cause value.
|
||||||
func (e MediaUserListResp_InfoValidationError) Cause() error { return e.cause }
|
func (e OAuthYoutubeReqValidationError) Cause() error { return e.cause }
|
||||||
|
|
||||||
// Key function returns key value.
|
// Key function returns key value.
|
||||||
func (e MediaUserListResp_InfoValidationError) Key() bool { return e.key }
|
func (e OAuthYoutubeReqValidationError) Key() bool { return e.key }
|
||||||
|
|
||||||
// ErrorName returns error name.
|
// ErrorName returns error name.
|
||||||
func (e MediaUserListResp_InfoValidationError) ErrorName() string {
|
func (e OAuthYoutubeReqValidationError) ErrorName() string { return "OAuthYoutubeReqValidationError" }
|
||||||
return "MediaUserListResp_InfoValidationError"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Error satisfies the builtin error interface
|
// Error satisfies the builtin error interface
|
||||||
func (e MediaUserListResp_InfoValidationError) Error() string {
|
func (e OAuthYoutubeReqValidationError) Error() string {
|
||||||
cause := ""
|
cause := ""
|
||||||
if e.cause != nil {
|
if e.cause != nil {
|
||||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||||
@ -2852,14 +2998,14 @@ func (e MediaUserListResp_InfoValidationError) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"invalid %sMediaUserListResp_Info.%s: %s%s",
|
"invalid %sOAuthYoutubeReq.%s: %s%s",
|
||||||
key,
|
key,
|
||||||
e.field,
|
e.field,
|
||||||
e.reason,
|
e.reason,
|
||||||
cause)
|
cause)
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ error = MediaUserListResp_InfoValidationError{}
|
var _ error = OAuthYoutubeReqValidationError{}
|
||||||
|
|
||||||
var _ interface {
|
var _ interface {
|
||||||
Field() string
|
Field() string
|
||||||
@ -2867,7 +3013,109 @@ var _ interface {
|
|||||||
Key() bool
|
Key() bool
|
||||||
Cause() error
|
Cause() error
|
||||||
ErrorName() string
|
ErrorName() string
|
||||||
} = MediaUserListResp_InfoValidationError{}
|
} = OAuthYoutubeReqValidationError{}
|
||||||
|
|
||||||
|
// Validate checks the field values on OAuthYoutubeResp with the rules defined
|
||||||
|
// in the proto definition for this message. If any rules are violated, the
|
||||||
|
// first error encountered is returned, or nil if there are no violations.
|
||||||
|
func (m *OAuthYoutubeResp) Validate() error {
|
||||||
|
return m.validate(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateAll checks the field values on OAuthYoutubeResp with the rules
|
||||||
|
// defined in the proto definition for this message. If any rules are
|
||||||
|
// violated, the result is a list of violation errors wrapped in
|
||||||
|
// OAuthYoutubeRespMultiError, or nil if none found.
|
||||||
|
func (m *OAuthYoutubeResp) ValidateAll() error {
|
||||||
|
return m.validate(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *OAuthYoutubeResp) validate(all bool) error {
|
||||||
|
if m == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var errors []error
|
||||||
|
|
||||||
|
// no validation rules for Url
|
||||||
|
|
||||||
|
if len(errors) > 0 {
|
||||||
|
return OAuthYoutubeRespMultiError(errors)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// OAuthYoutubeRespMultiError is an error wrapping multiple validation errors
|
||||||
|
// returned by OAuthYoutubeResp.ValidateAll() if the designated constraints
|
||||||
|
// aren't met.
|
||||||
|
type OAuthYoutubeRespMultiError []error
|
||||||
|
|
||||||
|
// Error returns a concatenation of all the error messages it wraps.
|
||||||
|
func (m OAuthYoutubeRespMultiError) Error() string {
|
||||||
|
var msgs []string
|
||||||
|
for _, err := range m {
|
||||||
|
msgs = append(msgs, err.Error())
|
||||||
|
}
|
||||||
|
return strings.Join(msgs, "; ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// AllErrors returns a list of validation violation errors.
|
||||||
|
func (m OAuthYoutubeRespMultiError) AllErrors() []error { return m }
|
||||||
|
|
||||||
|
// OAuthYoutubeRespValidationError is the validation error returned by
|
||||||
|
// OAuthYoutubeResp.Validate if the designated constraints aren't met.
|
||||||
|
type OAuthYoutubeRespValidationError struct {
|
||||||
|
field string
|
||||||
|
reason string
|
||||||
|
cause error
|
||||||
|
key bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Field function returns field value.
|
||||||
|
func (e OAuthYoutubeRespValidationError) Field() string { return e.field }
|
||||||
|
|
||||||
|
// Reason function returns reason value.
|
||||||
|
func (e OAuthYoutubeRespValidationError) Reason() string { return e.reason }
|
||||||
|
|
||||||
|
// Cause function returns cause value.
|
||||||
|
func (e OAuthYoutubeRespValidationError) Cause() error { return e.cause }
|
||||||
|
|
||||||
|
// Key function returns key value.
|
||||||
|
func (e OAuthYoutubeRespValidationError) Key() bool { return e.key }
|
||||||
|
|
||||||
|
// ErrorName returns error name.
|
||||||
|
func (e OAuthYoutubeRespValidationError) ErrorName() string { return "OAuthYoutubeRespValidationError" }
|
||||||
|
|
||||||
|
// Error satisfies the builtin error interface
|
||||||
|
func (e OAuthYoutubeRespValidationError) Error() string {
|
||||||
|
cause := ""
|
||||||
|
if e.cause != nil {
|
||||||
|
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
key := ""
|
||||||
|
if e.key {
|
||||||
|
key = "key for "
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf(
|
||||||
|
"invalid %sOAuthYoutubeResp.%s: %s%s",
|
||||||
|
key,
|
||||||
|
e.field,
|
||||||
|
e.reason,
|
||||||
|
cause)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ error = OAuthYoutubeRespValidationError{}
|
||||||
|
|
||||||
|
var _ interface {
|
||||||
|
Field() string
|
||||||
|
Reason() string
|
||||||
|
Key() bool
|
||||||
|
Cause() error
|
||||||
|
ErrorName() string
|
||||||
|
} = OAuthYoutubeRespValidationError{}
|
||||||
|
|
||||||
// Validate checks the field values on WorkListResp_Info with the rules defined
|
// Validate checks the field values on WorkListResp_Info with the rules defined
|
||||||
// in the proto definition for this message. If any rules are violated, the
|
// in the proto definition for this message. If any rules are violated, the
|
||||||
|
@ -40,6 +40,7 @@ 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)
|
||||||
|
OAuthYoutube(ctx context.Context, in *OAuthYoutubeReq, opts ...grpc_go.CallOption) (*OAuthYoutubeResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type castClient struct {
|
type castClient struct {
|
||||||
@ -58,6 +59,7 @@ 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)
|
||||||
|
OAuthYoutube func(ctx context.Context, in *OAuthYoutubeReq) (*OAuthYoutubeResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||||
@ -138,6 +140,12 @@ 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) OAuthYoutube(ctx context.Context, in *OAuthYoutubeReq, opts ...grpc_go.CallOption) (*OAuthYoutubeResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(OAuthYoutubeResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutube", 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
|
||||||
@ -153,6 +161,7 @@ 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)
|
||||||
|
OAuthYoutube(context.Context, *OAuthYoutubeReq) (*OAuthYoutubeResp, error)
|
||||||
mustEmbedUnimplementedCastServer()
|
mustEmbedUnimplementedCastServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,6 +203,9 @@ 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) OAuthYoutube(context.Context, *OAuthYoutubeReq) (*OAuthYoutubeResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutube 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 +553,35 @@ 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_OAuthYoutube_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OAuthYoutubeReq)
|
||||||
|
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("OAuthYoutube", 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 +633,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "MediaWorks",
|
MethodName: "MediaWorks",
|
||||||
Handler: _Cast_MediaWorks_Handler,
|
Handler: _Cast_MediaWorks_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "OAuthYoutube",
|
||||||
|
Handler: _Cast_OAuthYoutube_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/fiee/cast.proto",
|
Metadata: "pb/fiee/cast.proto",
|
||||||
|
@ -151,7 +151,8 @@ var MsgFlags = map[int]string{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ErrorCreateFeedback = "请勿重复提交"
|
ErrorCreateFeedback = "请勿重复提交"
|
||||||
|
ErrorBalanceInsufficient = "余额不足"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetMsg 获取状态码对应信息
|
// GetMsg 获取状态码对应信息
|
||||||
|
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"`
|
||||||
|
}
|
@ -49,6 +49,7 @@ func BundleRouter(r *gin.RouterGroup) {
|
|||||||
{
|
{
|
||||||
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
|
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
|
||||||
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||||
|
bundleAppRouteV2.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
||||||
|
|
||||||
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks)
|
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks)
|
||||||
bundleAppRoute.POST("balance", bundle.GetUserBalance)
|
bundleAppRoute.POST("balance", bundle.GetUserBalance)
|
||||||
|
@ -17,6 +17,7 @@ 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-platform", serviceCast.OAuthPlatform)
|
||||||
}
|
}
|
||||||
|
|
||||||
work := auth.Group("work")
|
work := auth.Group("work")
|
||||||
|
@ -154,7 +154,7 @@ func NewRouter() *gin.Engine {
|
|||||||
resourceRoute.POST("/tus/upload", file.TusUpload)
|
resourceRoute.POST("/tus/upload", file.TusUpload)
|
||||||
resourceRoute.GET("/raw", file.Raw)
|
resourceRoute.GET("/raw", file.Raw)
|
||||||
resourceRoute.GET("/raw/dir", file.DirDownload)
|
resourceRoute.GET("/raw/dir", file.DirDownload)
|
||||||
resourceRoute.GET("/preview", file.Preview)
|
resourceRoute.GET("/preview/:size/*path", file.Preview)
|
||||||
resourceRoute.GET("/list", file.List)
|
resourceRoute.GET("/list", file.List)
|
||||||
resourceRoute.GET("/usage", file.Usage)
|
resourceRoute.GET("/usage", file.Usage)
|
||||||
}
|
}
|
||||||
|
@ -183,13 +183,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
|
|||||||
service.Error(c, errors.New("作品不是待确认状态"))
|
service.Error(c, errors.New("作品不是待确认状态"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var workCategory int // 1 图文 2 视频
|
var workCategory = wordInfoRes.WorkCategory
|
||||||
|
|
||||||
if len(wordInfoRes.Images) == 0 { // 临时判断
|
|
||||||
workCategory = 2
|
|
||||||
} else {
|
|
||||||
workCategory = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
var addBalanceReq bundle.AddBundleBalanceReq
|
var addBalanceReq bundle.AddBundleBalanceReq
|
||||||
addBalanceReq.UserId = int32(userInfo.ID)
|
addBalanceReq.UserId = int32(userInfo.ID)
|
||||||
|
@ -30,8 +30,10 @@ func CreateBundleOrderAddSignature(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
if req.Language == "" {
|
if req.Language == "" {
|
||||||
req.Language = c.GetHeader("Accept-Language")
|
req.Language = c.GetHeader("Accept-Language")
|
||||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
if req.Language == "" {
|
||||||
return
|
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if req.BundleUuid == "" {
|
if req.BundleUuid == "" {
|
||||||
service.Error(c, errors.New(common.MissOrderNo))
|
service.Error(c, errors.New(common.MissOrderNo))
|
||||||
@ -185,8 +187,10 @@ func CreateBundleOrderSignature(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
if req.Language == "" {
|
if req.Language == "" {
|
||||||
req.Language = c.GetHeader("Accept-Language")
|
req.Language = c.GetHeader("Accept-Language")
|
||||||
service.Error(c, errors.New(common.MissLanguageTypes))
|
if req.Language == "" {
|
||||||
return
|
service.Error(c, errors.New(common.MissLanguageTypes))
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 不去校验 签名
|
// 不去校验 签名
|
||||||
/*if req.Signature == "" {
|
/*if req.Signature == "" {
|
||||||
|
@ -153,6 +153,8 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bundleName := "" // 套餐名称
|
||||||
|
|
||||||
if orderLimit != nil && orderLimit.Type == 1 { // 这儿的type实际就是source
|
if orderLimit != nil && orderLimit.Type == 1 { // 这儿的type实际就是source
|
||||||
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
||||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||||
@ -168,6 +170,9 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
||||||
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
||||||
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
||||||
|
|
||||||
|
bundleName = detail.OrderRecord.BundleName
|
||||||
|
|
||||||
// 主套餐
|
// 主套餐
|
||||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||||
@ -354,18 +359,34 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
fmt.Println("resp:", resp)
|
fmt.Println("resp:", resp)
|
||||||
|
|
||||||
|
currencyType := 0
|
||||||
|
if req.ProductPriceCurrency == "cny" || req.ProductPriceCurrency == "CNY" {
|
||||||
|
currencyType = 1
|
||||||
|
}
|
||||||
|
if req.ProductPriceCurrency == "usd" || req.ProductPriceCurrency == "USD" {
|
||||||
|
currencyType = 2
|
||||||
|
}
|
||||||
|
|
||||||
////创建对账单 todo 待修改
|
////创建对账单 todo 待修改
|
||||||
//_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
||||||
// BundleOrderOn: detail.OrderRecord.OrderNo,
|
BundleOrderOn: req.OutTradeNo,
|
||||||
// BundleAddOrderOn: detail.OrderRecord.OrderNo,
|
BundleAddOrderOn: req.OutTradeNo,
|
||||||
// UserName: userInfo.Name,
|
UserName: userInfo.Name,
|
||||||
// UserTel: userInfo.TelNum,
|
UserTel: userInfo.TelNum,
|
||||||
// BundleName: detail.OrderRecord.BundleName,
|
BundleName: bundleName,
|
||||||
// Amount: detail.OrderRecord.TotalAmount,
|
PayAmount: float32(req.ProductAllPrice),
|
||||||
// CurrencyType: int32(detail.OrderRecord.AmountType),
|
CurrencyType: int32(currencyType),
|
||||||
// PayStatus: 1,
|
PayStatus: 1,
|
||||||
// UserId: userInfo.ID,
|
UserID: userInfo.ID,
|
||||||
//})
|
SerialNumber: result.CheckoutSessionId,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
||||||
|
logger.Errorf("=============== antom创建支付,创建对账单报错:", err)
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
service.Success(c, resp)
|
service.Success(c, resp)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -478,6 +499,19 @@ func AntomWebhook(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 更新对账单
|
||||||
|
_, err = service.BundleProvider.UpdateReconciliationStatusBySerialNumber(context.Background(), &bundle.UpdateStatusAndPayTimeBySerialNumber{
|
||||||
|
PayTime: paymentTime,
|
||||||
|
PaymentStatus: 2,
|
||||||
|
SerialNumber: requestId,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("=============== antom回调,更新对账单报错:", err)
|
||||||
|
logger.Errorf("=============== antom回调,更新对账单报错:", err)
|
||||||
|
service.Error(c, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
//添加余额
|
//添加余额
|
||||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
||||||
OrderNo: resp.OutTradeNo,
|
OrderNo: resp.OutTradeNo,
|
||||||
|
37
pkg/service/cast/oauth.go
Normal file
37
pkg/service/cast/oauth.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package cast
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fonchain-fiee/api/cast"
|
||||||
|
"fonchain-fiee/pkg/service"
|
||||||
|
modelCast "fonchain-fiee/pkg/model/cast"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"context"
|
||||||
|
)
|
||||||
|
|
||||||
|
func OAuthPlatform(ctx *gin.Context) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
req *modelCast.OAuthPlatformReq
|
||||||
|
resp *modelCast.OAuthPlatformResp
|
||||||
|
)
|
||||||
|
if err = ctx.ShouldBind(&req); err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if req.PlatformID == int(cast.PlatformIDENUM_YOUTUBE) {
|
||||||
|
respOAuth, _err := service.CastProvider.OAuthYoutube(context.Background(), &cast.OAuthYoutubeReq{
|
||||||
|
Code: "",
|
||||||
|
})
|
||||||
|
if _err != nil {
|
||||||
|
service.Error(ctx, _err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp.Url = respOAuth.Url
|
||||||
|
}
|
||||||
|
//resp, err := service.CastProvider.OAuthPlatform(ctx, req)
|
||||||
|
//if err != nil {
|
||||||
|
// service.Error(ctx, err)
|
||||||
|
//}
|
||||||
|
service.Success(ctx, resp)
|
||||||
|
return
|
||||||
|
}
|
@ -3,6 +3,7 @@ package cast
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"fonchain-fiee/api/accountFiee"
|
"fonchain-fiee/api/accountFiee"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
@ -10,6 +11,7 @@ import (
|
|||||||
"fonchain-fiee/pkg/e"
|
"fonchain-fiee/pkg/e"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"go.uber.org/zap"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -164,8 +166,10 @@ func CheckUserBundleBalance(userID int32) (err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
zap.L().Info("CheckUserBundleBalance", zap.Any("resp", resp))
|
||||||
|
fmt.Println("CheckUserBundleBalance resp", resp)
|
||||||
if resp.AccountNumber-resp.AccountConsumptionNumber <= 0 {
|
if resp.AccountNumber-resp.AccountConsumptionNumber <= 0 {
|
||||||
err = errors.New(e.ErrNoBalance)
|
err = errors.New(e.ErrorBalanceInsufficient)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -169,7 +169,19 @@ func TusUpload(ctx *gin.Context) {
|
|||||||
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b, err := io.ReadAll(ctx.Request.Body)
|
mf, err := ctx.MultipartForm()
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
f, err := mf.File["file"][0].Open()
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, fmt.Errorf("invalid upload offset: %w", err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
b, err := io.ReadAll(f)
|
||||||
|
// b, err := io.ReadAll(ctx.Request.Body)
|
||||||
if !ok {
|
if !ok {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -190,12 +202,12 @@ func TusUpload(ctx *gin.Context) {
|
|||||||
|
|
||||||
func Preview(ctx *gin.Context) {
|
func Preview(ctx *gin.Context) {
|
||||||
var size int
|
var size int
|
||||||
size, err := strconv.Atoi(ctx.Query("size"))
|
size, err := strconv.Atoi(ctx.Param("size"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
size = 1
|
size = 1
|
||||||
}
|
}
|
||||||
resp, err := service.FilesProvider.Preview(ctx, &files.PreviewReq{
|
resp, err := service.FilesProvider.Preview(ctx, &files.PreviewReq{
|
||||||
Path: ctx.Query("path"),
|
Path: ctx.Param("path"),
|
||||||
UserSpacePath: getUserSpacePath(ctx),
|
UserSpacePath: getUserSpacePath(ctx),
|
||||||
Size: uint32(size),
|
Size: uint32(size),
|
||||||
})
|
})
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
@ -107,8 +108,8 @@ func DeleteSecFiling(c *gin.Context) {
|
|||||||
|
|
||||||
type GetSecFilingsReq struct {
|
type GetSecFilingsReq struct {
|
||||||
FilingDate string `json:"filingDate"`
|
FilingDate string `json:"filingDate"`
|
||||||
Page string `json:"page"`
|
Page int `json:"page"`
|
||||||
Limit string `json:"limit"`
|
PageSize int `json:"pageSize"`
|
||||||
}
|
}
|
||||||
type GetSecFilingsData struct {
|
type GetSecFilingsData struct {
|
||||||
Symbol string `json:"symbol"`
|
Symbol string `json:"symbol"`
|
||||||
@ -145,21 +146,22 @@ func GetSecFilings(c *gin.Context) {
|
|||||||
symbol := "MINM"
|
symbol := "MINM"
|
||||||
beginDate := req.FilingDate
|
beginDate := req.FilingDate
|
||||||
endDate := req.FilingDate
|
endDate := req.FilingDate
|
||||||
page := "0"
|
page := 0
|
||||||
limit := "100"
|
pageSize := 100
|
||||||
if req.Page != "" {
|
if req.Page != 0 {
|
||||||
page = req.Page
|
page = req.Page
|
||||||
}
|
}
|
||||||
if req.Limit != "" {
|
if req.PageSize != 0 {
|
||||||
limit = req.Limit
|
pageSize = req.PageSize
|
||||||
}
|
}
|
||||||
|
|
||||||
baseURL := "https://financialmodelingprep.com/stable/sec-filings-search/symbol"
|
baseURL := "https://financialmodelingprep.com/stable/sec-filings-search/symbol"
|
||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
params.Add("symbol", symbol)
|
params.Add("symbol", symbol)
|
||||||
params.Add("from", beginDate)
|
params.Add("from", beginDate)
|
||||||
params.Add("to", endDate)
|
params.Add("to", endDate)
|
||||||
params.Add("page", page)
|
params.Add("page", strconv.Itoa(page))
|
||||||
params.Add("limit", limit)
|
params.Add("limit", strconv.Itoa(pageSize))
|
||||||
params.Add("apikey", "lBQWUwdjRmfHVZ7e3I1trWe4jw0ZtDct")
|
params.Add("apikey", "lBQWUwdjRmfHVZ7e3I1trWe4jw0ZtDct")
|
||||||
|
|
||||||
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
|
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
|
||||||
|
Loading…
Reference in New Issue
Block a user