Compare commits
No commits in common. "9546978e3c6cf2da842bad7ea246711d1594c457" and "4af106da5df4d89596e0a66121e7dc00d8f45bcb" have entirely different histories.
9546978e3c
...
4af106da5d
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,9 @@ 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 {
|
func (this *GetReconciliationListReq) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -303,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
|
||||||
}
|
}
|
||||||
@ -334,16 +350,6 @@ func (this *GetBundleBalanceReq) Validate() error {
|
|||||||
func (this *BundleBalanceItem) Validate() error {
|
func (this *BundleBalanceItem) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *GetBundleBalanceResp) Validate() error {
|
|
||||||
for _, item := range this.Data {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *GetBundleBalanceListResp) Validate() error {
|
func (this *GetBundleBalanceListResp) Validate() error {
|
||||||
for _, item := range this.Data {
|
for _, item := range this.Data {
|
||||||
if item != nil {
|
if item != nil {
|
||||||
@ -397,7 +403,23 @@ func (this *GetVedioeWorkDetailResp) Validate() error {
|
|||||||
func (this *ToBeComfirmedWorksReq) Validate() error {
|
func (this *ToBeComfirmedWorksReq) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *WorkItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *ToBeComfirmedWorksResp) Validate() error {
|
func (this *ToBeComfirmedWorksResp) Validate() error {
|
||||||
|
for _, item := range this.Data {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceByUserIdReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *GetBundleBalanceByUserIdResp) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *OnlyAddValueListByOrderNoRequest) Validate() error {
|
func (this *OnlyAddValueListByOrderNoRequest) Validate() error {
|
||||||
@ -419,3 +441,9 @@ func (this *AddBundleInfo) Validate() error {
|
|||||||
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *ConfirmWorkReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ConfirmWorkResp) 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 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)
|
||||||
@ -58,10 +60,13 @@ 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)
|
||||||
GetBundleBalanceList(ctx context.Context, in *GetBundleBalanceListReq, opts ...grpc_go.CallOption) (*GetBundleBalanceListResp, common.ErrorWithAttachment)
|
GetBundleBalanceList(ctx context.Context, in *GetBundleBalanceListReq, opts ...grpc_go.CallOption) (*GetBundleBalanceListResp, common.ErrorWithAttachment)
|
||||||
|
GetBundleBalanceByUserId(ctx context.Context, in *GetBundleBalanceByUserIdReq, opts ...grpc_go.CallOption) (*GetBundleBalanceByUserIdResp, common.ErrorWithAttachment)
|
||||||
CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment)
|
CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment)
|
||||||
AddBundleBalance(ctx context.Context, in *AddBundleBalanceReq, opts ...grpc_go.CallOption) (*AddBundleBalanceResp, common.ErrorWithAttachment)
|
AddBundleBalance(ctx context.Context, in *AddBundleBalanceReq, opts ...grpc_go.CallOption) (*AddBundleBalanceResp, common.ErrorWithAttachment)
|
||||||
// 使用记录
|
// 使用记录
|
||||||
@ -69,6 +74,7 @@ type BundleClient interface {
|
|||||||
GetImageWorkDetail(ctx context.Context, in *GetImageWorkDetailReq, opts ...grpc_go.CallOption) (*GetImageWorkDetailResp, common.ErrorWithAttachment)
|
GetImageWorkDetail(ctx context.Context, in *GetImageWorkDetailReq, opts ...grpc_go.CallOption) (*GetImageWorkDetailResp, common.ErrorWithAttachment)
|
||||||
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)
|
||||||
//对账单
|
//对账单
|
||||||
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)
|
||||||
@ -88,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)
|
||||||
@ -109,15 +117,19 @@ 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)
|
||||||
|
GetBundleBalanceByUserId func(ctx context.Context, in *GetBundleBalanceByUserIdReq) (*GetBundleBalanceByUserIdResp, error)
|
||||||
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
CreateBundleBalance func(ctx context.Context, in *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
||||||
AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
AddBundleBalance func(ctx context.Context, in *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
||||||
GetUsedRecordList func(ctx context.Context, in *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
|
GetUsedRecordList func(ctx context.Context, in *GetUsedRecordListReq) (*GetUsedRecordListResp, error)
|
||||||
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
GetImageWorkDetail func(ctx context.Context, in *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
||||||
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)
|
||||||
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
CreateReconciliation 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)
|
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||||
@ -178,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)
|
||||||
@ -304,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)
|
||||||
@ -322,6 +358,12 @@ func (c *bundleClient) GetBundleBalanceList(ctx context.Context, in *GetBundleBa
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetBundleBalanceList", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetBundleBalanceList", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) GetBundleBalanceByUserId(ctx context.Context, in *GetBundleBalanceByUserIdReq, opts ...grpc_go.CallOption) (*GetBundleBalanceByUserIdResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(GetBundleBalanceByUserIdResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetBundleBalanceByUserId", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *bundleClient) CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment) {
|
func (c *bundleClient) CreateBundleBalance(ctx context.Context, in *CreateBundleBalanceReq, opts ...grpc_go.CallOption) (*CreateBundleBalanceResp, common.ErrorWithAttachment) {
|
||||||
out := new(CreateBundleBalanceResp)
|
out := new(CreateBundleBalanceResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -358,6 +400,12 @@ func (c *bundleClient) ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmed
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ToBeComfirmedWorks", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ToBeComfirmedWorks", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(ConfirmWorkResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
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) {
|
func (c *bundleClient) GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment) {
|
||||||
out := new(GetReconciliationListResp)
|
out := new(GetReconciliationListResp)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -393,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)
|
||||||
@ -416,10 +466,13 @@ 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)
|
||||||
GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error)
|
||||||
|
GetBundleBalanceByUserId(context.Context, *GetBundleBalanceByUserIdReq) (*GetBundleBalanceByUserIdResp, error)
|
||||||
CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error)
|
||||||
AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
AddBundleBalance(context.Context, *AddBundleBalanceReq) (*AddBundleBalanceResp, error)
|
||||||
// 使用记录
|
// 使用记录
|
||||||
@ -427,6 +480,7 @@ type BundleServer interface {
|
|||||||
GetImageWorkDetail(context.Context, *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
GetImageWorkDetail(context.Context, *GetImageWorkDetailReq) (*GetImageWorkDetailResp, error)
|
||||||
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)
|
||||||
//对账单
|
//对账单
|
||||||
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||||
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||||
@ -461,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")
|
||||||
}
|
}
|
||||||
@ -524,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")
|
||||||
}
|
}
|
||||||
@ -533,6 +599,9 @@ func (UnimplementedBundleServer) BundleExtendRecordsList(context.Context, *Bundl
|
|||||||
func (UnimplementedBundleServer) GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error) {
|
func (UnimplementedBundleServer) GetBundleBalanceList(context.Context, *GetBundleBalanceListReq) (*GetBundleBalanceListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalanceList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalanceList not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) GetBundleBalanceByUserId(context.Context, *GetBundleBalanceByUserIdReq) (*GetBundleBalanceByUserIdResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalanceByUserId not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error) {
|
func (UnimplementedBundleServer) CreateBundleBalance(context.Context, *CreateBundleBalanceReq) (*CreateBundleBalanceResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateBundleBalance not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateBundleBalance not implemented")
|
||||||
}
|
}
|
||||||
@ -551,6 +620,9 @@ func (UnimplementedBundleServer) GetVedioWorkDetail(context.Context, *GetVedioWo
|
|||||||
func (UnimplementedBundleServer) ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error) {
|
func (UnimplementedBundleServer) ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ToBeComfirmedWorks not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ToBeComfirmedWorks not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ConfirmWork not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) {
|
func (UnimplementedBundleServer) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetReconciliationList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetReconciliationList not implemented")
|
||||||
}
|
}
|
||||||
@ -794,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 {
|
||||||
@ -1403,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 {
|
||||||
@ -1490,6 +1678,35 @@ func _Bundle_GetBundleBalanceList_Handler(srv interface{}, ctx context.Context,
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_GetBundleBalanceByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetBundleBalanceByUserIdReq)
|
||||||
|
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("GetBundleBalanceByUserId", 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_CreateBundleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_CreateBundleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateBundleBalanceReq)
|
in := new(CreateBundleBalanceReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1664,6 +1881,35 @@ func _Bundle_ToBeComfirmedWorks_Handler(srv interface{}, ctx context.Context, de
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_ConfirmWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ConfirmWorkReq)
|
||||||
|
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("ConfirmWork", 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_GetReconciliationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_GetReconciliationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(GetReconciliationListReq)
|
in := new(GetReconciliationListReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -1815,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,
|
||||||
@ -1899,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,
|
||||||
@ -1911,6 +2173,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "GetBundleBalanceList",
|
MethodName: "GetBundleBalanceList",
|
||||||
Handler: _Bundle_GetBundleBalanceList_Handler,
|
Handler: _Bundle_GetBundleBalanceList_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetBundleBalanceByUserId",
|
||||||
|
Handler: _Bundle_GetBundleBalanceByUserId_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "CreateBundleBalance",
|
MethodName: "CreateBundleBalance",
|
||||||
Handler: _Bundle_CreateBundleBalance_Handler,
|
Handler: _Bundle_CreateBundleBalance_Handler,
|
||||||
@ -1935,6 +2201,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "ToBeComfirmedWorks",
|
MethodName: "ToBeComfirmedWorks",
|
||||||
Handler: _Bundle_ToBeComfirmedWorks_Handler,
|
Handler: _Bundle_ToBeComfirmedWorks_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ConfirmWork",
|
||||||
|
Handler: _Bundle_ConfirmWork_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "GetReconciliationList",
|
MethodName: "GetReconciliationList",
|
||||||
Handler: _Bundle_GetReconciliationList_Handler,
|
Handler: _Bundle_GetReconciliationList_Handler,
|
||||||
|
@ -21,7 +21,6 @@ func BundleRouter(r *gin.RouterGroup) {
|
|||||||
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
||||||
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
||||||
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
||||||
bundleClientRoute.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
|
||||||
|
|
||||||
bundleExtend := bundleClientRoute.Group("extend")
|
bundleExtend := bundleClientRoute.Group("extend")
|
||||||
{
|
{
|
||||||
@ -34,16 +33,9 @@ func BundleRouter(r *gin.RouterGroup) {
|
|||||||
bundleBalance.POST("used-record", bundle.GetUsedRecordList)
|
bundleBalance.POST("used-record", bundle.GetUsedRecordList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
|
||||||
|
bundleAppRoute = bundleAppRoute.Group("common")
|
||||||
{
|
{
|
||||||
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
|
|
||||||
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
|
|
||||||
bundleClientRouteV2.POST("bundle-list", bundle.BundleListV2)
|
|
||||||
bundleClientRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
|
||||||
}
|
|
||||||
bundleAppRouteV1 := bundleAppRoute.Group("common")
|
|
||||||
{
|
|
||||||
bundleAppRouteV1.POST("bundle-list", bundle.BundleList)
|
|
||||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||||
|
|
||||||
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks) // 作品状态变更的待确认记录
|
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks) // 作品状态变更的待确认记录
|
||||||
@ -53,17 +45,6 @@ func BundleRouter(r *gin.RouterGroup) {
|
|||||||
bundleAppRoute.POST("work-detail", bundle.GetWorkDetail)
|
bundleAppRoute.POST("work-detail", bundle.GetWorkDetail)
|
||||||
bundleAppRoute.POST("work-confirm", bundle.WorkConfirm)
|
bundleAppRoute.POST("work-confirm", bundle.WorkConfirm)
|
||||||
}
|
}
|
||||||
bundleAppRouteV2 := bundleAppRoute.Group("app/system/v2")
|
|
||||||
{
|
|
||||||
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
|
|
||||||
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
|
||||||
bundleAppRouteV2.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
|
||||||
|
|
||||||
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks)
|
|
||||||
bundleAppRoute.POST("balance", bundle.GetUserBalance)
|
|
||||||
bundleAppRoute.POST("work-detail", bundle.GetWorkDetail)
|
|
||||||
bundleAppRoute.POST("work-confirm", bundle.WorkConfirm)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
|||||||
{
|
{
|
||||||
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
||||||
bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
|
bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
|
||||||
bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder)
|
|
||||||
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
|
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
|
||||||
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
|
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ func SendMsg(c *gin.Context) {
|
|||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
service.Success1(c, "发送成功", res)
|
service.Success(c, res)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||||
@ -165,7 +165,7 @@ func SendMsg(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
service.Success1(c, "发送成功", res)
|
service.Success(c, res)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,83 +77,3 @@ func BundleList(c *gin.Context) {
|
|||||||
|
|
||||||
service.Success(c, res)
|
service.Success(c, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SaveBundleV2(c *gin.Context) {
|
|
||||||
var req bundle.BundleProfile
|
|
||||||
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res, err := service.BundleProvider.SaveBundle(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
|
|
||||||
func BundleListV2(c *gin.Context) {
|
|
||||||
var req bundle.BundleListRequest
|
|
||||||
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res, err := service.BundleProvider.BundleListV2(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
func BundleDetailV2(c *gin.Context) {
|
|
||||||
var req bundle.BundleDetailRequest
|
|
||||||
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res, err := service.BundleProvider.BundleDetailV2(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
func HandShelf(c *gin.Context) {
|
|
||||||
var req bundle.HandShelfRequest
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
res, err := service.BundleProvider.HandShelf(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
|
|
||||||
func OnlyAddValueListByOrderNo(c *gin.Context) {
|
|
||||||
var req bundle.OnlyAddValueListByOrderNoRequest
|
|
||||||
|
|
||||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res, err := service.BundleProvider.OnlyAddValueListByOrderNo(context.Background(), &req)
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c, res)
|
|
||||||
}
|
|
||||||
|
@ -47,10 +47,6 @@ func SignContractV2(customerNum, contract string, price float32, expirationDate
|
|||||||
}
|
}
|
||||||
|
|
||||||
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string) error {
|
func InsertSignatureV2(templatePath, outputPath string, price float32, expirationDate string) error {
|
||||||
fmt.Println("================================templatePath:", templatePath)
|
|
||||||
fmt.Println("================================outputPath:", outputPath)
|
|
||||||
fmt.Println("================================price:", price)
|
|
||||||
fmt.Println("================================expirationDate:", expirationDate)
|
|
||||||
pdf := gopdf.GoPdf{}
|
pdf := gopdf.GoPdf{}
|
||||||
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package bundle
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -142,85 +141,16 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
// 获取 用户信息
|
// 获取 用户信息
|
||||||
userInfo := login.GetUserInfoFromC(c)
|
userInfo := login.GetUserInfoFromC(c)
|
||||||
|
|
||||||
// outTradeNo就是orderNo,根据这个去查询子表的source,如果是2就时单独的子套餐,如果是1就是主套餐
|
// 检查 订单信息
|
||||||
orderLimit, err := service.BundleProvider.OrderListByOrderNo(context.Background(), &bundle.OrderInfoByOrderNoRequest{
|
|
||||||
OrderNo: req.OutTradeNo,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,查询订单source报错:", err)
|
|
||||||
logger.Errorf("=============== antom创建支付,查询订单source报错:", err)
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
currencyType := 0
|
|
||||||
if req.ProductPriceCurrency == "cny" || req.ProductPriceCurrency == "CNY" {
|
|
||||||
currencyType = 1
|
|
||||||
}
|
|
||||||
if req.ProductPriceCurrency == "usd" || req.ProductPriceCurrency == "USD" {
|
|
||||||
currencyType = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
bundleName := "" // 套餐名称
|
|
||||||
|
|
||||||
if orderLimit != nil && orderLimit.Type == 1 { // 这儿的type实际就是source
|
|
||||||
// 检查 订单信息 type是1说明既有主套餐又有增值服务
|
|
||||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||||
OrderNo: req.OutTradeNo,
|
OrderNo: req.OutTradeNo,
|
||||||
})
|
})
|
||||||
|
|
||||||
if detailErr != nil {
|
if detailErr != nil {
|
||||||
fmt.Println("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
|
||||||
logger.Errorf("=============== antom创建支付,查询主订单信息报错:", detailErr)
|
|
||||||
service.Error(c, detailErr)
|
service.Error(c, detailErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
|
||||||
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
|
||||||
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
|
||||||
|
|
||||||
bundleName = detail.OrderRecord.BundleName
|
|
||||||
|
|
||||||
// 主套餐
|
|
||||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
|
||||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
|
||||||
// 查询支付结果
|
|
||||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
|
||||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
|
||||||
})
|
|
||||||
|
|
||||||
if stripeInfosErr != nil {
|
|
||||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
|
||||||
for _, info := range stripeInfosRes.Infos {
|
|
||||||
if info.OutTradeNo == detail.OrderRecord.OrderNo && info.Status == "paid" {
|
|
||||||
// 更新主套餐和子套餐 TODO
|
|
||||||
// 更新子套餐,TODO
|
|
||||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
|
||||||
OrderNo: req.OutTradeNo,
|
|
||||||
PayTime: common.GetBeijingTime(),
|
|
||||||
Status: bundleModel.OrderPaid,
|
|
||||||
})
|
|
||||||
fmt.Println("detail.OrderRecord.Uuid :", detail.OrderRecord.Uuid)
|
|
||||||
if updateStatusErr != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,更新主套餐和子套餐支付状态报错:", updateStatusErr)
|
|
||||||
logger.Errorf("=============== antom创建支付,更新主套餐和子套餐支付状态报错:", updateStatusErr)
|
|
||||||
service.Error(c, updateStatusErr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(c, &service.Response{
|
|
||||||
Msg: common.HadPay,
|
|
||||||
Code: 0,
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println("detail.OrderRecord.CustomerID :", detail.OrderRecord.CustomerID)
|
fmt.Println("detail.OrderRecord.CustomerID :", detail.OrderRecord.CustomerID)
|
||||||
|
|
||||||
// 判断 是否是 本人操作
|
// 判断 是否是 本人操作
|
||||||
@ -234,33 +164,23 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
fmt.Println("detail.OrderRecord.TotalAmount*100 :", detail.OrderRecord.TotalAmount*100)
|
||||||
|
|
||||||
//金额校验
|
//金额校验
|
||||||
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount) * 100))
|
orderAmountInCents := int64(math.Round(float64(detail.OrderRecord.TotalAmount * 100)))
|
||||||
reqAmountInCents := req.ProductAllPrice
|
reqAmountInCents := int64(math.Round(float64(req.ProductAllPrice)))
|
||||||
if orderAmountInCents != reqAmountInCents {
|
if orderAmountInCents != reqAmountInCents {
|
||||||
fmt.Println("111111111111111111111111111111111111")
|
fmt.Println("111111111111111111111111111111111111")
|
||||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
service.Error(c, errors.New(common.InvalidOrderAmount))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if orderLimit != nil && orderLimit.Type == 2 {
|
fmt.Println("detail.OrderRecord.Status :", detail.OrderRecord.Status)
|
||||||
|
fmt.Println("detail.OrderRecord.CheckoutSessionId :", detail.OrderRecord.CheckoutSessionId)
|
||||||
|
fmt.Println("detail.OrderRecord.PayTime :", detail.OrderRecord.PayTime)
|
||||||
|
|
||||||
res, listErr := service.BundleProvider.OnlyAddValueListByOrderNo(context.Background(), &bundle.OnlyAddValueListByOrderNoRequest{
|
|
||||||
OrderNo: req.OutTradeNo,
|
|
||||||
})
|
|
||||||
if listErr != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,查询单独增值服务列表报错:", listErr)
|
|
||||||
logger.Errorf("=============== antom创建支付,查询单独增值服务列表报错:", listErr)
|
|
||||||
service.Error(c, listErr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if res != nil && len(res.AddBundleInfos) > 0 {
|
|
||||||
firstAddBundle := res.AddBundleInfos[0]
|
|
||||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||||
if firstAddBundle.PaymentStatus == bundleModel.OrderSigned && firstAddBundle.CheckOutSessionId != "" {
|
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||||
// 查询支付结果
|
// 查询支付结果
|
||||||
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
stripeInfosRes, stripeInfosErr := service.PaymentProvider.QueryAntomPayByCheckoutSessionId(context.Background(), &payment.AntomPayQueryRequest{
|
||||||
CheckoutSessionIds: []string{firstAddBundle.CheckOutSessionId},
|
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
||||||
})
|
})
|
||||||
|
|
||||||
if stripeInfosErr != nil {
|
if stripeInfosErr != nil {
|
||||||
@ -270,18 +190,15 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
|
|
||||||
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
if stripeInfosRes != nil && len(stripeInfosRes.Infos) > 0 {
|
||||||
for _, info := range stripeInfosRes.Infos {
|
for _, info := range stripeInfosRes.Infos {
|
||||||
if info.OutTradeNo == firstAddBundle.OrderNo && info.Status == "paid" {
|
if info.OutTradeNo == detail.OrderRecord.OrderNo && info.Status == "paid" {
|
||||||
// 更新子套餐,TODO
|
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
Uuid: detail.OrderRecord.Uuid,
|
||||||
OrderNo: req.OutTradeNo,
|
|
||||||
PayTime: common.GetBeijingTime(),
|
|
||||||
Status: bundleModel.OrderPaid,
|
Status: bundleModel.OrderPaid,
|
||||||
|
PayTime: common.GetBeijingTime(),
|
||||||
})
|
})
|
||||||
fmt.Println("req.OutTradeNo :", req.OutTradeNo)
|
fmt.Println("detail.OrderRecord.Uuid :", detail.OrderRecord.Uuid)
|
||||||
if updateStatusErr != nil {
|
if updateOrderRecordErr != nil {
|
||||||
fmt.Println("=============== antom创建支付,更新子套餐支付状态报错:", updateStatusErr)
|
service.Error(c, detailErr)
|
||||||
logger.Errorf("=============== antom创建支付,更新子套餐支付状态报错:", updateStatusErr)
|
|
||||||
service.Error(c, updateStatusErr)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
service.Success(c, &service.Response{
|
service.Success(c, &service.Response{
|
||||||
@ -294,140 +211,6 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("firstAddBundle.CustomerID :", firstAddBundle.CustomerID)
|
|
||||||
|
|
||||||
// 判断 是否是 本人操作
|
|
||||||
if strconv.FormatUint(userInfo.ID, 10) != firstAddBundle.CustomerID {
|
|
||||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
orderAmountInCents := int64(0.0)
|
|
||||||
for _, info := range res.AddBundleInfos {
|
|
||||||
temp := int64(math.Round(float64(info.Amount) * 100))
|
|
||||||
orderAmountInCents += temp
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println("orderAmountInCents :", orderAmountInCents)
|
|
||||||
fmt.Println("req.ProductAllPrice :", req.ProductAllPrice)
|
|
||||||
|
|
||||||
//金额校验
|
|
||||||
reqAmountInCents := req.ProductAllPrice
|
|
||||||
if orderAmountInCents != reqAmountInCents {
|
|
||||||
fmt.Println("111111111111111111111111111111111111")
|
|
||||||
service.Error(c, errors.New(common.InvalidOrderAmount))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if req.ProductAllPrice == 0 {
|
|
||||||
////创建对账单 todo 待修改
|
|
||||||
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
|
||||||
BundleOrderOn: req.OutTradeNo,
|
|
||||||
BundleAddOrderOn: req.OutTradeNo,
|
|
||||||
UserName: userInfo.Name,
|
|
||||||
UserTel: userInfo.TelNum,
|
|
||||||
BundleName: bundleName,
|
|
||||||
PayAmount: float32(req.ProductAllPrice),
|
|
||||||
CurrencyType: int32(currencyType),
|
|
||||||
PayStatus: 2,
|
|
||||||
PayTime: common.GetBeijingTime(),
|
|
||||||
UserID: userInfo.ID,
|
|
||||||
SerialNumber: "zero-price-serial-number",
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
|
||||||
logger.Errorf("=============== antom创建支付,创建对账单报错:", err)
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
|
||||||
OrderNo: req.OutTradeNo,
|
|
||||||
PayTime: common.GetBeijingTime(),
|
|
||||||
Status: bundleModel.OrderPaid,
|
|
||||||
})
|
|
||||||
if updateStatusErr != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,更新订单报错:", updateStatusErr)
|
|
||||||
logger.Errorf("=============== antom创建支付,更新订单报错:", updateStatusErr)
|
|
||||||
service.Error(c, updateStatusErr)
|
|
||||||
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 {
|
|
||||||
fmt.Println("=============== antom创建支付,OrderTypePackage报错:", err)
|
|
||||||
logger.Errorf("=============== antom创建支付,OrderTypePackage报错:", err)
|
|
||||||
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 {
|
|
||||||
// fmt.Println("=============== antom创建支付,OrderTypePackage报错:", err)
|
|
||||||
// logger.Errorf("=============== antom创建支付,OrderTypePackage报错:", err)
|
|
||||||
// service.Error(c, err)
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
default:
|
|
||||||
fmt.Println("=============== antom创建支付,无效的订单类型:", err)
|
|
||||||
logger.Errorf("=============== antom创建支付,无效的订单类型:", err)
|
|
||||||
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: req.OutTradeNo, //增值服务订单号
|
|
||||||
Type: 2, //自行购买
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
service.Success(c)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var antomReq payment.CreatePayRequest
|
var antomReq payment.CreatePayRequest
|
||||||
antomReq.Payee = "Antom"
|
antomReq.Payee = "Antom"
|
||||||
antomReq.Platform = "antom"
|
antomReq.Platform = "antom"
|
||||||
@ -450,9 +233,9 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
fmt.Println("result.CheckoutSessionId :", result.CheckoutSessionId)
|
fmt.Println("result.CheckoutSessionId :", result.CheckoutSessionId)
|
||||||
fmt.Println("result.Url :", result.Url)
|
fmt.Println("result.Url :", result.Url)
|
||||||
|
|
||||||
//更新订单url和checkSessionId
|
//更新订单状态
|
||||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||||
OrderNo: req.OutTradeNo,
|
Uuid: detail.OrderRecord.Uuid,
|
||||||
CheckoutSessionId: result.CheckoutSessionId,
|
CheckoutSessionId: result.CheckoutSessionId,
|
||||||
CheckoutSessionUrl: result.Url,
|
CheckoutSessionUrl: result.Url,
|
||||||
})
|
})
|
||||||
@ -460,35 +243,25 @@ func CreateAntomPay(c *gin.Context) {
|
|||||||
resp := &order.CreateStripeCheckoutSessionResponse{}
|
resp := &order.CreateStripeCheckoutSessionResponse{}
|
||||||
resp.CheckoutSessionUrl = result.Url
|
resp.CheckoutSessionUrl = result.Url
|
||||||
resp.CheckoutSessionId = result.CheckoutSessionId
|
resp.CheckoutSessionId = result.CheckoutSessionId
|
||||||
fmt.Println("req.OutTradeNo :", req.OutTradeNo)
|
|
||||||
if updateStatusErr != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,更新订单的请求id报错:", updateStatusErr)
|
|
||||||
logger.Errorf("=============== antom创建支付,更新订单的请求id报错:", updateStatusErr)
|
|
||||||
service.Error(c, updateStatusErr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
fmt.Println("resp:", resp)
|
fmt.Println("resp:", resp)
|
||||||
|
|
||||||
////创建对账单 todo 待修改
|
if updateOrderRecordErr != nil {
|
||||||
_, err = service.BundleProvider.CreateReconciliation(context.Background(), &bundle.ReconciliationInfo{
|
fmt.Println("有更新报错:", updateOrderRecordErr)
|
||||||
BundleOrderOn: req.OutTradeNo,
|
service.Error(c, updateOrderRecordErr)
|
||||||
BundleAddOrderOn: req.OutTradeNo,
|
|
||||||
UserName: userInfo.Name,
|
|
||||||
UserTel: userInfo.TelNum,
|
|
||||||
BundleName: bundleName,
|
|
||||||
PayAmount: float32(req.ProductAllPrice),
|
|
||||||
CurrencyType: int32(currencyType),
|
|
||||||
PayStatus: 1,
|
|
||||||
UserID: userInfo.ID,
|
|
||||||
SerialNumber: result.CheckoutSessionId,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("=============== antom创建支付,创建对账单报错:", err)
|
|
||||||
logger.Errorf("=============== antom创建支付,创建对账单报错:", err)
|
|
||||||
service.Error(c, err)
|
|
||||||
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)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -601,19 +374,6 @@ 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,
|
||||||
@ -629,10 +389,10 @@ func AntomWebhook(c *gin.Context) {
|
|||||||
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
_, err = service.BundleProvider.CreateBundleBalance(context.Background(), &bundle.CreateBundleBalanceReq{
|
||||||
UserId: int32(orderLimit.UserId),
|
UserId: int32(orderLimit.UserId),
|
||||||
OrderUUID: orderLimit.OrderUUID,
|
OrderUUID: orderLimit.OrderUUID,
|
||||||
//AccountNumber: orderLimit.AccountNumber,
|
AccountNumber: orderLimit.AccountNumber,
|
||||||
//VideoNumber: orderLimit.VideoNumber,
|
VideoNumber: orderLimit.VideoNumber,
|
||||||
//ImageNumber: orderLimit.ImageNumber,
|
ImageNumber: orderLimit.ImageNumber,
|
||||||
//DataAnalysisNumber: orderLimit.DataNumber,
|
DataAnalysisNumber: orderLimit.DataNumber,
|
||||||
ExpansionPacksNumber: 1,
|
ExpansionPacksNumber: 1,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -641,19 +401,19 @@ func AntomWebhook(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
case common.OrderTypeAddon:
|
case common.OrderTypeAddon:
|
||||||
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
//如果是购买增值服务 1:修改余量信息AddBundleBalance 2 添加扩展记录BundleExtend
|
||||||
//_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
_, err = service.BundleProvider.AddBundleBalance(context.Background(), &bundle.AddBundleBalanceReq{
|
||||||
// UserId: int32(orderLimit.UserId),
|
UserId: int32(orderLimit.UserId),
|
||||||
// OrderUUID: orderLimit.OrderUUID,
|
OrderUUID: orderLimit.OrderUUID,
|
||||||
// AccountNumber: orderLimit.AccountNumber,
|
AccountNumber: orderLimit.AccountNumber,
|
||||||
// VideoNumber: orderLimit.VideoNumber,
|
VideoNumber: orderLimit.VideoNumber,
|
||||||
// ImageNumber: orderLimit.ImageNumber,
|
ImageNumber: orderLimit.ImageNumber,
|
||||||
// DataAnalysisNumber: orderLimit.DataNumber,
|
DataAnalysisNumber: orderLimit.DataNumber,
|
||||||
// ExpansionPacksNumber: 1,
|
ExpansionPacksNumber: 1,
|
||||||
//})
|
})
|
||||||
//if err != nil {
|
if err != nil {
|
||||||
// service.Error(c, err)
|
service.Error(c, err)
|
||||||
// return
|
return
|
||||||
//}
|
}
|
||||||
default:
|
default:
|
||||||
service.Error(c, errors.New("无效的订单类型"))
|
service.Error(c, errors.New("无效的订单类型"))
|
||||||
return
|
return
|
||||||
@ -678,7 +438,6 @@ func AntomWebhook(c *gin.Context) {
|
|||||||
AvailableDurationAdditional: uint32(orderLimit.Duration),
|
AvailableDurationAdditional: uint32(orderLimit.Duration),
|
||||||
TimeUnit: timeUnit,
|
TimeUnit: timeUnit,
|
||||||
AssociatedorderNumber: resp.OutTradeNo, //增值服务订单号
|
AssociatedorderNumber: resp.OutTradeNo, //增值服务订单号
|
||||||
Type: 2, //自行购买
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(c, err)
|
service.Error(c, err)
|
||||||
@ -726,21 +485,15 @@ func HomePageRoll(c *gin.Context) {
|
|||||||
|
|
||||||
var roll []Roll
|
var roll []Roll
|
||||||
for _, i := range res.BundleInfo {
|
for _, i := range res.BundleInfo {
|
||||||
tel := ""
|
maskedTel := userMap[i.CustomerId].TelNum
|
||||||
name := i.BundleName // Use bundle name as fallback
|
if len(userMap[i.CustomerId].TelNum) >= 11 { // 标准11位手机号
|
||||||
if userInfo, exists := userMap[i.CustomerId]; exists && userInfo != nil {
|
maskedTel = userMap[i.CustomerId].TelNum[:3] + "****" + userMap[i.CustomerId].TelNum[7:]
|
||||||
tel = userInfo.TelNum
|
} else if len(userMap[i.CustomerId].TelNum) >= 7 { // 短号处理
|
||||||
if len(tel) >= 2 {
|
maskedTel = userMap[i.CustomerId].TelNum[:3] + "****" + userMap[i.CustomerId].TelNum[7:]
|
||||||
masked := ""
|
|
||||||
for j := 0; j < len(tel)-2; j++ {
|
|
||||||
masked += "*"
|
|
||||||
}
|
|
||||||
tel = masked + tel[len(tel)-2:]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
roll = append(roll, Roll{
|
roll = append(roll, Roll{
|
||||||
Tel: tel,
|
Tel: maskedTel,
|
||||||
Name: name,
|
Name: i.BundleName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
service.Success(c, roll)
|
service.Success(c, roll)
|
||||||
|
Loading…
Reference in New Issue
Block a user