Compare commits
	
		
			2 Commits
		
	
	
		
			126360113d
			...
			c22977816b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c22977816b | |||
| 4a30ddad23 | 
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -18,6 +18,7 @@ | |||||||
| syntax = "proto3"; | syntax = "proto3"; | ||||||
| package accountFiee; | package accountFiee; | ||||||
| import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto"; | import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto"; | ||||||
|  | 
 | ||||||
| option go_package = "./;accountFiee"; | option go_package = "./;accountFiee"; | ||||||
| 
 | 
 | ||||||
| //protoc -I . -I C:\Users\lenovo\go\src  --go_out=. --go-triple_out=. ./accountFiee.proto | //protoc -I . -I C:\Users\lenovo\go\src  --go_out=. --go-triple_out=. ./accountFiee.proto | ||||||
| @ -184,6 +185,8 @@ message UserListRequest{ | |||||||
|   int32 auditStatus = 7; |   int32 auditStatus = 7; | ||||||
|   uint64 page = 8; |   uint64 page = 8; | ||||||
|   uint64 pageSize = 9; |   uint64 pageSize = 9; | ||||||
|  |   string blurNameTel = 10; | ||||||
|  |   repeated int64 ids = 11; | ||||||
| } | } | ||||||
| message UserInfoResponse{ | message UserInfoResponse{ | ||||||
|   uint64 id = 1; |   uint64 id = 1; | ||||||
|  | |||||||
| @ -525,3 +525,175 @@ func (this *ClockLogListResponse) Validate() error { | |||||||
| func (this *SubmitInfoRequest) Validate() error { | func (this *SubmitInfoRequest) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  | func (this *CommonMsg) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ChatRecordData) Validate() error { | ||||||
|  | 	for _, item := range this.Medias { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("Medias", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateChatRecordResp) Validate() error { | ||||||
|  | 	if this.Data != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DeleteChatRecordRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatRecordByIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatRecordListRequest) Validate() error { | ||||||
|  | 	if this.Query != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Query", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatRecordListResp) Validate() error { | ||||||
|  | 	for _, item := range this.List { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("List", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RegisterWaiterRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *RegisterWaiterResp) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ChatMediaData) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateChatMediaResp) Validate() error { | ||||||
|  | 	if this.Data != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DeleteChatMediaRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatMediaByIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatMediaListRequest) Validate() error { | ||||||
|  | 	if this.Query != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Query", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatMediaListResp) Validate() error { | ||||||
|  | 	for _, item := range this.List { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("List", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatUserListRequest2) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ChatUser2) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatUserListResp2) Validate() error { | ||||||
|  | 	for _, item := range this.List { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("List", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ChatAutoReplyRulerData) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateChatAutoReplyRulerResp) Validate() error { | ||||||
|  | 	if this.Data != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DeleteChatAutoReplyRulerRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatAutoReplyRulerByIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatAutoReplyRulerListRequest) Validate() error { | ||||||
|  | 	if this.Query != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Query", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatAutoReplyRulerListResp) Validate() error { | ||||||
|  | 	for _, item := range this.List { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("List", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *ChatUserData) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *CreateChatUserResp) Validate() error { | ||||||
|  | 	if this.Data != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Data", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *DeleteChatUserRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatUserByIdRequest) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatUserListRequest) Validate() error { | ||||||
|  | 	if this.Query != nil { | ||||||
|  | 		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil { | ||||||
|  | 			return github_com_mwitkow_go_proto_validators.FieldError("Query", err) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *GetChatUserListResp) Validate() error { | ||||||
|  | 	for _, item := range this.List { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("List", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | |||||||
| @ -1,8 +1,8 @@ | |||||||
| // Code generated by protoc-gen-go-triple. DO NOT EDIT.
 | // Code generated by protoc-gen-go-triple. DO NOT EDIT.
 | ||||||
| // versions:
 | // versions:
 | ||||||
| // - protoc-gen-go-triple v1.0.8
 | // - protoc-gen-go-triple v1.0.8
 | ||||||
| // - protoc             v4.22.0--rc2
 | // - protoc             v4.24.0--rc1
 | ||||||
| // source: accountFiee.proto
 | // source: api/accountFiee/accountFiee.proto
 | ||||||
| 
 | 
 | ||||||
| package accountFiee | package accountFiee | ||||||
| 
 | 
 | ||||||
| @ -3074,5 +3074,5 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{ | |||||||
| 		}, | 		}, | ||||||
| 	}, | 	}, | ||||||
| 	Streams:  []grpc_go.StreamDesc{}, | 	Streams:  []grpc_go.StreamDesc{}, | ||||||
| 	Metadata: "accountFiee.proto", | 	Metadata: "api/accountFiee/accountFiee.proto", | ||||||
| } | } | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -17,6 +17,32 @@ var _ = proto.Marshal | |||||||
| var _ = fmt.Errorf | var _ = fmt.Errorf | ||||||
| var _ = math.Inf | var _ = math.Inf | ||||||
| 
 | 
 | ||||||
|  | func (this *OrderRecordsRequestV2) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *OrderRecordsResponseV2) Validate() error { | ||||||
|  | 	for _, item := range this.BundleInfo { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("BundleInfo", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *OrderBundleRecordInfo) Validate() error { | ||||||
|  | 	for _, item := range this.AddBundleInfo { | ||||||
|  | 		if item != nil { | ||||||
|  | 			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { | ||||||
|  | 				return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfo", err) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  | func (this *OrderAddBundleRecordInfo) Validate() error { | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
| func (this *PackagePriceAndTimeResponse) Validate() error { | func (this *PackagePriceAndTimeResponse) Validate() error { | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  | |||||||
| @ -45,6 +45,7 @@ type BundleClient interface { | |||||||
| 	UpdateFinancialConfirmationStatus(ctx context.Context, in *FinancialConfirmationRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) | 	UpdateFinancialConfirmationStatus(ctx context.Context, in *FinancialConfirmationRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) | ||||||
| 	CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) | 	CreateOrderAddRecord(ctx context.Context, in *OrderAddRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) | ||||||
| 	PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment) | 	PackagePriceAndTime(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*PackagePriceAndTimeResponse, common.ErrorWithAttachment) | ||||||
|  | 	OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment) | ||||||
| 	//增值套餐
 | 	//增值套餐
 | ||||||
| 	CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) | 	CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) | ||||||
| 	ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment) | 	ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment) | ||||||
| @ -53,6 +54,7 @@ type BundleClient interface { | |||||||
| 	SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment) | 	SaveValueAddService(ctx context.Context, in *ValueAddServiceLang, opts ...grpc_go.CallOption) (*SaveResponse, common.ErrorWithAttachment) | ||||||
| 	ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment) | 	ValueAddServiceList(ctx context.Context, in *ValueAddServiceListRequest, opts ...grpc_go.CallOption) (*ValueAddServiceListResponse, common.ErrorWithAttachment) | ||||||
| 	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) | ||||||
| 	// 余量管理
 | 	// 余量管理
 | ||||||
| 	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) | ||||||
| @ -80,12 +82,14 @@ type BundleClientImpl struct { | |||||||
| 	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) | ||||||
| 	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) | ||||||
| 	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) | ||||||
| } | } | ||||||
| @ -204,6 +208,12 @@ func (c *bundleClient) PackagePriceAndTime(ctx context.Context, in *OrderRecord, | |||||||
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PackagePriceAndTime", in, out) | 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PackagePriceAndTime", in, out) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func (c *bundleClient) OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment) { | ||||||
|  | 	out := new(OrderRecordsResponseV2) | ||||||
|  | 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||||
|  | 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OrderRecordsListV2", in, out) | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) { | func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) { | ||||||
| 	out := new(CreateValueAddBundleResponse) | 	out := new(CreateValueAddBundleResponse) | ||||||
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||||
| @ -240,6 +250,12 @@ func (c *bundleClient) ValueAddServiceDetail(ctx context.Context, in *ValueAddSe | |||||||
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceDetail", in, out) | 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceDetail", in, out) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func (c *bundleClient) ValueAddServiceLangByUuidAndLanguage(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceLang, common.ErrorWithAttachment) { | ||||||
|  | 	out := new(ValueAddServiceLang) | ||||||
|  | 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||||
|  | 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceLangByUuidAndLanguage", 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) | ||||||
| @ -273,6 +289,7 @@ type BundleServer interface { | |||||||
| 	UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error) | 	UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error) | ||||||
| 	CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error) | 	CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error) | ||||||
| 	PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) | 	PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) | ||||||
|  | 	OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) | ||||||
| 	//增值套餐
 | 	//增值套餐
 | ||||||
| 	CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) | 	CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) | ||||||
| 	ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error) | 	ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error) | ||||||
| @ -281,6 +298,7 @@ type BundleServer interface { | |||||||
| 	SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error) | 	SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error) | ||||||
| 	ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) | 	ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) | ||||||
| 	ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) | 	ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) | ||||||
|  | 	ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, 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) | ||||||
| @ -343,6 +361,9 @@ func (UnimplementedBundleServer) CreateOrderAddRecord(context.Context, *OrderAdd | |||||||
| func (UnimplementedBundleServer) PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) { | func (UnimplementedBundleServer) PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) { | ||||||
| 	return nil, status.Errorf(codes.Unimplemented, "method PackagePriceAndTime not implemented") | 	return nil, status.Errorf(codes.Unimplemented, "method PackagePriceAndTime not implemented") | ||||||
| } | } | ||||||
|  | func (UnimplementedBundleServer) OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) { | ||||||
|  | 	return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsListV2 not implemented") | ||||||
|  | } | ||||||
| func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) { | func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) { | ||||||
| 	return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented") | 	return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented") | ||||||
| } | } | ||||||
| @ -361,6 +382,9 @@ func (UnimplementedBundleServer) ValueAddServiceList(context.Context, *ValueAddS | |||||||
| func (UnimplementedBundleServer) ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) { | func (UnimplementedBundleServer) ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) { | ||||||
| 	return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceDetail not implemented") | 	return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceDetail not implemented") | ||||||
| } | } | ||||||
|  | func (UnimplementedBundleServer) ValueAddServiceLangByUuidAndLanguage(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error) { | ||||||
|  | 	return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceLangByUuidAndLanguage 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") | ||||||
| } | } | ||||||
| @ -888,6 +912,35 @@ func _Bundle_PackagePriceAndTime_Handler(srv interface{}, ctx context.Context, d | |||||||
| 	return interceptor(ctx, in, info, handler) | 	return interceptor(ctx, in, info, handler) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func _Bundle_OrderRecordsListV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||||
|  | 	in := new(OrderRecordsRequestV2) | ||||||
|  | 	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("OrderRecordsListV2", args, invAttachment) | ||||||
|  | 	if interceptor == nil { | ||||||
|  | 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||||
|  | 		return result, result.Error() | ||||||
|  | 	} | ||||||
|  | 	info := &grpc_go.UnaryServerInfo{ | ||||||
|  | 		Server:     srv, | ||||||
|  | 		FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), | ||||||
|  | 	} | ||||||
|  | 	handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||||||
|  | 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||||
|  | 		return result, result.Error() | ||||||
|  | 	} | ||||||
|  | 	return interceptor(ctx, in, info, handler) | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||||
| 	in := new(CreateValueAddBundleRequest) | 	in := new(CreateValueAddBundleRequest) | ||||||
| 	if err := dec(in); err != nil { | 	if err := dec(in); err != nil { | ||||||
| @ -1062,6 +1115,35 @@ func _Bundle_ValueAddServiceDetail_Handler(srv interface{}, ctx context.Context, | |||||||
| 	return interceptor(ctx, in, info, handler) | 	return interceptor(ctx, in, info, handler) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | func _Bundle_ValueAddServiceLangByUuidAndLanguage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||||
|  | 	in := new(ValueAddServiceDetailRequest) | ||||||
|  | 	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("ValueAddServiceLangByUuidAndLanguage", 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 { | ||||||
| @ -1195,6 +1277,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{ | |||||||
| 			MethodName: "PackagePriceAndTime", | 			MethodName: "PackagePriceAndTime", | ||||||
| 			Handler:    _Bundle_PackagePriceAndTime_Handler, | 			Handler:    _Bundle_PackagePriceAndTime_Handler, | ||||||
| 		}, | 		}, | ||||||
|  | 		{ | ||||||
|  | 			MethodName: "OrderRecordsListV2", | ||||||
|  | 			Handler:    _Bundle_OrderRecordsListV2_Handler, | ||||||
|  | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			MethodName: "CreateValueAddBundle", | 			MethodName: "CreateValueAddBundle", | ||||||
| 			Handler:    _Bundle_CreateValueAddBundle_Handler, | 			Handler:    _Bundle_CreateValueAddBundle_Handler, | ||||||
| @ -1219,6 +1305,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{ | |||||||
| 			MethodName: "ValueAddServiceDetail", | 			MethodName: "ValueAddServiceDetail", | ||||||
| 			Handler:    _Bundle_ValueAddServiceDetail_Handler, | 			Handler:    _Bundle_ValueAddServiceDetail_Handler, | ||||||
| 		}, | 		}, | ||||||
|  | 		{ | ||||||
|  | 			MethodName: "ValueAddServiceLangByUuidAndLanguage", | ||||||
|  | 			Handler:    _Bundle_ValueAddServiceLangByUuidAndLanguage_Handler, | ||||||
|  | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			MethodName: "BundleExtend", | 			MethodName: "BundleExtend", | ||||||
| 			Handler:    _Bundle_BundleExtend_Handler, | 			Handler:    _Bundle_BundleExtend_Handler, | ||||||
|  | |||||||
| @ -23,6 +23,7 @@ func BundleOrderRouter(r *gin.RouterGroup) { | |||||||
| 		bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web") | 		bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web") | ||||||
| 		{ | 		{ | ||||||
| 			bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList) | 			bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList) | ||||||
|  | 			bundleOrderClientWebRoute.POST("bundle-order-list-V2", bundle.OrderRecordsListV2) | ||||||
| 		} | 		} | ||||||
| 		bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app") | 		bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app") | ||||||
| 		{ | 		{ | ||||||
|  | |||||||
| @ -86,33 +86,33 @@ func CreateBundleOrderAddSignature(c *gin.Context) { | |||||||
| 		totalAmount      float64 | 		totalAmount      float64 | ||||||
| 		mainDeadline     = orderRecordResp.OrderRecord.ExpirationTime | 		mainDeadline     = orderRecordResp.OrderRecord.ExpirationTime | ||||||
| 	) | 	) | ||||||
| 	//for _, opt := range req.AddPriceOptionsList {
 | 	for _, opt := range req.AddPriceOptionsList { | ||||||
| 	//	valueAddInfo, err := service.BundleProvider.ValueAddServiceDetail(context.Background(), &bundle.ValueAddServiceDetailRequest{
 | 		valueAddInfo, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &bundle.ValueAddServiceDetailRequest{ | ||||||
| 	//		Uuid:     opt.ValueUid,
 | 			Uuid:     opt.ValueUid, | ||||||
| 	//		Language: req.Language,
 | 			Language: req.Language, | ||||||
| 	//	})
 | 		}) | ||||||
| 	//	if err != nil {
 | 		if err != nil { | ||||||
| 	//		service.Error(c, err)
 | 			service.Error(c, err) | ||||||
| 	//		return
 | 			return | ||||||
| 	//	}
 | 		} | ||||||
| 	//	// 找到匹配的选项
 | 		// 找到匹配的选项
 | ||||||
| 	//	var selectedOption *bundle.ValueAddPriceOptions
 | 		var selectedOption *bundle.ValueAddPriceOptions | ||||||
| 	//	for _, option := range valueAddInfo.ValueAddServiceLang.Options {
 | 		for _, option := range valueAddInfo.Options { | ||||||
| 	//		if int32(option.Id) == opt.Id {
 | 			if int32(option.Id) == opt.Id { | ||||||
| 	//			selectedOption = option
 | 				selectedOption = option | ||||||
| 	//			break
 | 				break | ||||||
| 	//		}
 | 			} | ||||||
| 	//	}
 | 		} | ||||||
| 	//	if selectedOption == nil {
 | 		if selectedOption == nil { | ||||||
| 	//		service.Error(c, errors.New("未找到匹配的价格选项"))
 | 			service.Error(c, errors.New("未找到匹配的价格选项")) | ||||||
| 	//		return
 | 			return | ||||||
| 	//	}
 | 		} | ||||||
| 	//	valueAddServices = append(valueAddServices, ValueAddServiceInfo{
 | 		valueAddServices = append(valueAddServices, ValueAddServiceInfo{ | ||||||
| 	//		Service: valueAddInfo.ValueAddServiceLang,
 | 			Service: valueAddInfo, | ||||||
| 	//		Options: selectedOption,
 | 			Options: selectedOption, | ||||||
| 	//		ID:      opt.Id,
 | 			ID:      opt.Id, | ||||||
| 	//	})
 | 		}) | ||||||
| 	//}
 | 	} | ||||||
| 	// 计算总金额和确定截止日期
 | 	// 计算总金额和确定截止日期
 | ||||||
| 	var expirationDate string | 	var expirationDate string | ||||||
| 	var addPriceList []*bundle.AddPriceOptionsInfo | 	var addPriceList []*bundle.AddPriceOptionsInfo | ||||||
| @ -421,7 +421,87 @@ func UpdateBundleOrderStatusPaid(c *gin.Context) { | |||||||
| 
 | 
 | ||||||
| 	service.Success(c, nil) | 	service.Success(c, nil) | ||||||
| } | } | ||||||
|  | func OrderRecordsListV2(c *gin.Context) { | ||||||
|  | 	var req bundle.OrderRecordsRequestV2 | ||||||
|  | 	if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil { | ||||||
|  | 		service.Error(c, err) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
|  | 	res := &bundle.OrderRecordsResponseV2{} | ||||||
|  | 
 | ||||||
|  | 	// Step 1: 如果有姓名/电话筛选,先查用户列表
 | ||||||
|  | 	if req.CustomerName != "" { | ||||||
|  | 		userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ | ||||||
|  | 			BlurNameTel: req.CustomerName, | ||||||
|  | 			Domain:      "app", | ||||||
|  | 		}) | ||||||
|  | 		if err != nil { | ||||||
|  | 			service.Error(c, err) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		if len(userListResp.UserList) == 0 { | ||||||
|  | 			// 没查到用户,直接返回空结果
 | ||||||
|  | 			res.Page = req.Page | ||||||
|  | 			res.PageSize = req.PageSize | ||||||
|  | 			res.Total = 0 | ||||||
|  | 			service.Success(c, res) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		// 提取用户ID列表
 | ||||||
|  | 		for _, u := range userListResp.UserList { | ||||||
|  | 			req.UserIds = append(req.UserIds, int64(u.Id)) | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// Step 2: 查询订单列表
 | ||||||
|  | 	orderList, err := service.BundleProvider.OrderRecordsListV2(context.Background(), &req) | ||||||
|  | 	if err != nil { | ||||||
|  | 		service.Error(c, err) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	// Step 3: 如果订单不为空,查一次用户信息填充(只查一次)
 | ||||||
|  | 	if len(orderList.BundleInfo) > 0 { | ||||||
|  | 		// 收集订单里的所有用户ID
 | ||||||
|  | 		userIdSet := make(map[int64]struct{}) | ||||||
|  | 		for _, i := range orderList.BundleInfo { | ||||||
|  | 			userIdSet[i.CustomerId] = struct{}{} | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		var userIds []int64 | ||||||
|  | 		for id := range userIdSet { | ||||||
|  | 			userIds = append(userIds, id) | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ | ||||||
|  | 			Ids:    userIds, | ||||||
|  | 			Domain: "app", | ||||||
|  | 		}) | ||||||
|  | 		if err != nil { | ||||||
|  | 			service.Error(c, err) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		// 建立用户ID -> 用户信息映射
 | ||||||
|  | 		userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList)) | ||||||
|  | 		for _, u := range userListResp.UserList { | ||||||
|  | 			userMap[int64(u.Id)] = u | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		// 填充订单中的用户信息
 | ||||||
|  | 		for _, item := range orderList.BundleInfo { | ||||||
|  | 			if u, ok := userMap[item.CustomerId]; ok { | ||||||
|  | 				item.CustomerName = u.Name | ||||||
|  | 				item.TelNum = u.TelNum | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	service.Success(c, orderList) | ||||||
|  | } | ||||||
| func OrderRecordsList(c *gin.Context) { | func OrderRecordsList(c *gin.Context) { | ||||||
| 	var req bundle.OrderRecordsRequest | 	var req bundle.OrderRecordsRequest | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user