Compare commits
	
		
			2 Commits
		
	
	
		
			359dbede04
			...
			7210111abf
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7210111abf | |||
| 7c15c18f81 | 
| @ -38,6 +38,10 @@ service Bundle { | ||||
|   rpc SaveValueAddService(ValueAddServiceLang) returns (SaveResponse) {} | ||||
|   rpc ValueAddServiceList(ValueAddServiceListRequest) returns (ValueAddServiceListResponse) {} | ||||
|   rpc ValueAddServiceDetail(ValueAddServiceDetailRequest) returns (ValueAddServiceDetailResponse) {}   | ||||
| 
 | ||||
|    // 余量管理 | ||||
|    rpc BundleExtend(BundleExtendRequest) returns (BundleExtendResponse) {} // 套餐扩展 | ||||
|    rpc BundleExtendRecordsList(BundleExtendRecordsListRequest) returns (BundleExtendRecordsListResponse) {} // 套餐扩展记录查询 | ||||
| } | ||||
| 
 | ||||
| message CommonResponse { | ||||
| @ -304,3 +308,65 @@ message ValueAddServiceDetailResponse { | ||||
|   ValueAddService valueAddService = 2 [json_name = "valueAddService"]; | ||||
| } | ||||
| //*********************************新增值服务-over****************************************** | ||||
| 
 | ||||
| message BundleExtendRequest{ | ||||
|   int64 userId = 1; | ||||
|   uint32 accountAdditional = 2;  | ||||
|   uint32 videoAdditional = 3;  | ||||
|   uint32 imagesAdditional = 4;  | ||||
|   uint32 dataAdditional = 5; | ||||
|   uint32 availableDurationAdditional = 6;  | ||||
|   string remark = 7;  | ||||
|   string associatedorderNumber = 8;  | ||||
|   int64 operatorId = 9; | ||||
| } | ||||
| 
 | ||||
| message BundleExtendResponse{ | ||||
| } | ||||
| 
 | ||||
| message BundleExtendRecordsListRequest{ | ||||
|   int32 page = 1; | ||||
|   int32 pageSize = 2; | ||||
|   string user = 3;  | ||||
|   string operator = 4; | ||||
|   uint64 startTime = 5; | ||||
|   uint64 endTime = 6; | ||||
|   uint32 type = 7; | ||||
|   string associatedOrderNumber = 8; | ||||
| } | ||||
| 
 | ||||
| message BundleExtendRecordsListResponse{ | ||||
|   int64 total = 1; | ||||
|   repeated BundleExtendRecordItem data = 2; | ||||
| } | ||||
| 
 | ||||
| message BundleExtendRecordItem{ | ||||
|   string userName = 1;  | ||||
|   string userPhoneNumber = 2;  | ||||
|   uint32 accountAdditional = 3; | ||||
|   uint32 videoAdditional = 4;  | ||||
|   uint32 imagesAdditional = 5;  | ||||
|   uint32 dataAdditional = 6;  | ||||
|   uint32 availableDurationAdditional = 7; | ||||
|   int32 type = 8; | ||||
|   uint64 createdAt = 9;  | ||||
|   string remark = 10;  | ||||
|   string associatedOrderNumber = 11; | ||||
|   string operatorName = 12;  | ||||
|   string operatorPhoneNumber = 13;  | ||||
| } | ||||
| 
 | ||||
| message SetBundleBalanceRequest { | ||||
|   int32 userId = 1; | ||||
|   int64 expirationTime = 2; | ||||
|   string bundleName = 3; | ||||
|   int32 accountNumber = 4; | ||||
|   int32 videoNumber = 5; | ||||
|   int32 imageNumber = 6; | ||||
|   int32 dataAnalysisNumber = 7; | ||||
|   int32 expansionPacksNumber = 8; | ||||
| } | ||||
| 
 | ||||
| message SetBundleBalanceResponse { | ||||
| 
 | ||||
| } | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -207,3 +207,31 @@ func (this *ValueAddServiceDetailResponse) Validate() error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (this *BundleExtendRequest) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
| func (this *BundleExtendResponse) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
| func (this *BundleExtendRecordsListRequest) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
| func (this *BundleExtendRecordsListResponse) 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 *BundleExtendRecordItem) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
| func (this *SetBundleBalanceRequest) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
| func (this *SetBundleBalanceResponse) Validate() error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| @ -51,6 +51,9 @@ type BundleClient interface { | ||||
| 	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) | ||||
| 	ValueAddServiceDetail(ctx context.Context, in *ValueAddServiceDetailRequest, opts ...grpc_go.CallOption) (*ValueAddServiceDetailResponse, 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) | ||||
| } | ||||
| 
 | ||||
| type bundleClient struct { | ||||
| @ -79,6 +82,8 @@ type BundleClientImpl struct { | ||||
| 	SaveValueAddService               func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error) | ||||
| 	ValueAddServiceList               func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) | ||||
| 	ValueAddServiceDetail             func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) | ||||
| 	BundleExtend                      func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error) | ||||
| 	BundleExtendRecordsList           func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error) | ||||
| } | ||||
| 
 | ||||
| func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient { | ||||
| @ -219,6 +224,18 @@ func (c *bundleClient) ValueAddServiceDetail(ctx context.Context, in *ValueAddSe | ||||
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ValueAddServiceDetail", in, out) | ||||
| } | ||||
| 
 | ||||
| func (c *bundleClient) BundleExtend(ctx context.Context, in *BundleExtendRequest, opts ...grpc_go.CallOption) (*BundleExtendResponse, common.ErrorWithAttachment) { | ||||
| 	out := new(BundleExtendResponse) | ||||
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleExtend", in, out) | ||||
| } | ||||
| 
 | ||||
| func (c *bundleClient) BundleExtendRecordsList(ctx context.Context, in *BundleExtendRecordsListRequest, opts ...grpc_go.CallOption) (*BundleExtendRecordsListResponse, common.ErrorWithAttachment) { | ||||
| 	out := new(BundleExtendRecordsListResponse) | ||||
| 	interfaceKey := ctx.Value(constant.InterfaceKey).(string) | ||||
| 	return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleExtendRecordsList", in, out) | ||||
| } | ||||
| 
 | ||||
| // BundleServer is the server API for Bundle service.
 | ||||
| // All implementations must embed UnimplementedBundleServer
 | ||||
| // for forward compatibility
 | ||||
| @ -246,6 +263,9 @@ type BundleServer interface { | ||||
| 	SaveValueAddService(context.Context, *ValueAddServiceLang) (*SaveResponse, error) | ||||
| 	ValueAddServiceList(context.Context, *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) | ||||
| 	ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) | ||||
| 	// 余量管理
 | ||||
| 	BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) | ||||
| 	BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error) | ||||
| 	mustEmbedUnimplementedBundleServer() | ||||
| } | ||||
| 
 | ||||
| @ -317,6 +337,12 @@ func (UnimplementedBundleServer) ValueAddServiceList(context.Context, *ValueAddS | ||||
| func (UnimplementedBundleServer) ValueAddServiceDetail(context.Context, *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) { | ||||
| 	return nil, status.Errorf(codes.Unimplemented, "method ValueAddServiceDetail not implemented") | ||||
| } | ||||
| func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error) { | ||||
| 	return nil, status.Errorf(codes.Unimplemented, "method BundleExtend not implemented") | ||||
| } | ||||
| func (UnimplementedBundleServer) BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error) { | ||||
| 	return nil, status.Errorf(codes.Unimplemented, "method BundleExtendRecordsList not implemented") | ||||
| } | ||||
| func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) { | ||||
| 	s.proxyImpl = impl | ||||
| } | ||||
| @ -954,6 +980,64 @@ func _Bundle_ValueAddServiceDetail_Handler(srv interface{}, ctx context.Context, | ||||
| 	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) { | ||||
| 	in := new(BundleExtendRequest) | ||||
| 	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("BundleExtend", 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_BundleExtendRecordsList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { | ||||
| 	in := new(BundleExtendRecordsListRequest) | ||||
| 	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("BundleExtendRecordsList", args, invAttachment) | ||||
| 	if interceptor == nil { | ||||
| 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||
| 		return result, result.Error() | ||||
| 	} | ||||
| 	info := &grpc_go.UnaryServerInfo{ | ||||
| 		Server:     srv, | ||||
| 		FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), | ||||
| 	} | ||||
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||||
| 		result := base.XXX_GetProxyImpl().Invoke(ctx, invo) | ||||
| 		return result, result.Error() | ||||
| 	} | ||||
| 	return interceptor(ctx, in, info, handler) | ||||
| } | ||||
| 
 | ||||
| // Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
 | ||||
| // It's only intended for direct use with grpc_go.RegisterService,
 | ||||
| // and not to be introspected or modified (even as a copy)
 | ||||
| @ -1045,6 +1129,14 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{ | ||||
| 			MethodName: "ValueAddServiceDetail", | ||||
| 			Handler:    _Bundle_ValueAddServiceDetail_Handler, | ||||
| 		}, | ||||
| 		{ | ||||
| 			MethodName: "BundleExtend", | ||||
| 			Handler:    _Bundle_BundleExtend_Handler, | ||||
| 		}, | ||||
| 		{ | ||||
| 			MethodName: "BundleExtendRecordsList", | ||||
| 			Handler:    _Bundle_BundleExtendRecordsList_Handler, | ||||
| 		}, | ||||
| 	}, | ||||
| 	Streams:  []grpc_go.StreamDesc{}, | ||||
| 	Metadata: "pb/bundle.proto", | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user