增加金额计算-冲突
This commit is contained in:
parent
3cf6a506a8
commit
74d03c57b4
@ -30,6 +30,7 @@ service Bundle {
|
||||
rpc UpdateFinancialConfirmationStatus(FinancialConfirmationRequest) returns (CommonResponse) {}
|
||||
rpc CreateOrderAddRecord(OrderAddRecord) returns (CommonResponse) {}
|
||||
rpc PackagePriceAndTime(OrderRecord) returns (PackagePriceAndTimeResponse) {}//计算套餐价格和有效时间
|
||||
rpc OrderRecordsListV2(OrderRecordsRequestV2) returns (OrderRecordsResponseV2) {}
|
||||
|
||||
//增值套餐
|
||||
rpc CreateValueAddBundle(CreateValueAddBundleRequest) returns (CreateValueAddBundleResponse) {}
|
||||
@ -44,9 +45,56 @@ service Bundle {
|
||||
rpc CalculatePrice(CalculatePriceRequest) returns (CalculatePriceResponse) {}
|
||||
|
||||
|
||||
// 余量管理
|
||||
rpc BundleExtend(BundleExtendRequest) returns (BundleExtendResponse) {} // 套餐扩展
|
||||
rpc BundleExtendRecordsList(BundleExtendRecordsListRequest) returns (BundleExtendRecordsListResponse) {} // 套餐扩展记录查询
|
||||
|
||||
// 余量管理
|
||||
rpc BundleExtend(BundleExtendRequest) returns (BundleExtendResponse) {} // 套餐扩展
|
||||
rpc BundleExtendRecordsList(BundleExtendRecordsListRequest) returns (BundleExtendRecordsListResponse) {} // 套餐扩展记录查询
|
||||
rpc GetBundleBalance(GetBundleBalanceReq) returns (GetBundleBalanceResp) {} // 余量信息
|
||||
}
|
||||
message OrderRecordsRequestV2{
|
||||
string customerName = 1;
|
||||
string telNum = 2;
|
||||
string bundleName = 3;
|
||||
int32 payStatus = 4;
|
||||
int32 addPayStatus = 5;
|
||||
string orderNo = 6;
|
||||
string orderAddNo = 7;
|
||||
string bundleCreateAtStart = 8;
|
||||
string bundleCreateAtEnd = 9;
|
||||
string orderAddCreateAtStart = 10;
|
||||
string orderAddCreateAtEnd = 11;
|
||||
int32 page = 12;
|
||||
int32 pageSize = 13;
|
||||
repeated int64 userIds = 14;
|
||||
}
|
||||
message OrderRecordsResponseV2{
|
||||
repeated OrderBundleRecordInfo bundleInfo = 1;
|
||||
int32 page = 2;
|
||||
int32 pageSize = 3;
|
||||
int32 total = 4;
|
||||
}
|
||||
message OrderBundleRecordInfo{
|
||||
string orderNo = 1;
|
||||
string bundleName = 2;
|
||||
int32 payStatus = 3;
|
||||
string telNum = 4;
|
||||
string customerName = 5;
|
||||
string bundleCreateAt = 6;
|
||||
float amount = 7;
|
||||
repeated OrderAddBundleRecordInfo addBundleInfo = 8;
|
||||
int64 customerId = 9;
|
||||
}
|
||||
message OrderAddBundleRecordInfo{
|
||||
string orderAddNo = 1;
|
||||
float amount = 2;
|
||||
float settlementAmount = 3;
|
||||
int32 currencyType = 4;
|
||||
float handlingFee = 5;
|
||||
float exchangeRate = 6;
|
||||
string orderAddCreateAt = 7;
|
||||
int32 addPayStatus = 8;
|
||||
string contract = 9;
|
||||
string snapshot = 10;
|
||||
}
|
||||
message PackagePriceAndTimeResponse{
|
||||
float price = 1 [json_name = "price"];
|
||||
@ -174,6 +222,7 @@ message OrderRecord {
|
||||
string language = 35 [json_name = "language"];
|
||||
repeated PriceOptionsInfo priceOptionsInfo = 36 [json_name = "priceOptionsInfo"];
|
||||
string expirationTime = 37 [json_name = "expirationTime"];
|
||||
string snapshot = 38 [json_name = "snapshot"];
|
||||
}
|
||||
message OrderAddRecord{
|
||||
string bundleUuid = 1 [json_name = "bundleUuid"];
|
||||
@ -188,6 +237,7 @@ message OrderAddRecord{
|
||||
string signature = 9 [json_name = "signature"];
|
||||
string signedTime = 10 [json_name = "signedTime"];
|
||||
string expirationDate = 11 [json_name = "expirationDate"];
|
||||
string snapshot = 38 [json_name = "snapshot"];
|
||||
}
|
||||
message AddPriceOptionsInfo {
|
||||
int32 id = 1 [json_name = "id"];
|
||||
@ -368,7 +418,8 @@ message BundleExtendRequest{
|
||||
uint32 availableDurationAdditional = 6;
|
||||
string remark = 7;
|
||||
string associatedorderNumber = 8;
|
||||
int64 operatorId = 9;
|
||||
string operatorName = 9;
|
||||
string operatorPhoneNumber = 10;
|
||||
}
|
||||
|
||||
message BundleExtendResponse{
|
||||
@ -406,17 +457,35 @@ message BundleExtendRecordItem{
|
||||
string operatorPhoneNumber = 13;
|
||||
}
|
||||
|
||||
message SetBundleBalanceRequest {
|
||||
int32 userId = 1;
|
||||
int64 expirationTime = 2;
|
||||
message GetBundleBalanceReq{
|
||||
string userName = 1;
|
||||
int32 status = 2;
|
||||
string bundleName = 3;
|
||||
int32 accountNumber = 4;
|
||||
int32 videoNumber = 5;
|
||||
int32 imageNumber = 6;
|
||||
int32 dataAnalysisNumber = 7;
|
||||
int32 expansionPacksNumber = 8;
|
||||
int64 expiredTimeStart = 4;
|
||||
int64 expiredTimeEnd = 5;
|
||||
int32 page = 6;
|
||||
int32 pageSize = 7;
|
||||
}
|
||||
|
||||
message SetBundleBalanceResponse {
|
||||
|
||||
message BundleBalanceItem{
|
||||
string userName = 1;
|
||||
string userPhoneNumber = 2;
|
||||
int32 status = 3;
|
||||
string bundleName = 4;
|
||||
int64 expiredTime = 5;
|
||||
int32 accountNumber = 6;
|
||||
int32 accountConsumptionNumber = 7;
|
||||
int32 videoNumber = 8;
|
||||
int32 videoConsumptionNumber = 9;
|
||||
int32 imageNumber = 10;
|
||||
int32 imageConsumptionNumber = 11;
|
||||
int32 dataAnalysisNumber = 12;
|
||||
int32 dataAnalysisConsumptionNumber = 13;
|
||||
int32 expansionPacksNumber = 14;
|
||||
}
|
||||
|
||||
message GetBundleBalanceResp{
|
||||
int64 total = 1;
|
||||
repeated BundleBalanceItem data = 2;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,32 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
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 {
|
||||
return nil
|
||||
}
|
||||
@ -254,9 +280,19 @@ func (this *BundleExtendRecordsListResponse) Validate() error {
|
||||
func (this *BundleExtendRecordItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SetBundleBalanceRequest) Validate() error {
|
||||
func (this *GetBundleBalanceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SetBundleBalanceResponse) Validate() error {
|
||||
func (this *BundleBalanceItem) Validate() error {
|
||||
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
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ type BundleClient interface {
|
||||
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)
|
||||
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)
|
||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||
@ -58,6 +59,7 @@ type BundleClient interface {
|
||||
// 余量管理
|
||||
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)
|
||||
GetBundleBalance(ctx context.Context, in *GetBundleBalanceReq, opts ...grpc_go.CallOption) (*GetBundleBalanceResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type bundleClient struct {
|
||||
@ -82,6 +84,7 @@ type BundleClientImpl struct {
|
||||
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, 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)
|
||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||
@ -92,6 +95,7 @@ type BundleClientImpl struct {
|
||||
CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error)
|
||||
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList func(ctx context.Context, in *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
GetBundleBalance func(ctx context.Context, in *GetBundleBalanceReq) (*GetBundleBalanceResp, error)
|
||||
}
|
||||
|
||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||
@ -208,6 +212,12 @@ func (c *bundleClient) PackagePriceAndTime(ctx context.Context, in *OrderRecord,
|
||||
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) {
|
||||
out := new(CreateValueAddBundleResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -268,6 +278,12 @@ func (c *bundleClient) BundleExtendRecordsList(ctx context.Context, in *BundleEx
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleExtendRecordsList", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) GetBundleBalance(ctx context.Context, in *GetBundleBalanceReq, opts ...grpc_go.CallOption) (*GetBundleBalanceResp, common.ErrorWithAttachment) {
|
||||
out := new(GetBundleBalanceResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetBundleBalance", in, out)
|
||||
}
|
||||
|
||||
// BundleServer is the server API for Bundle service.
|
||||
// All implementations must embed UnimplementedBundleServer
|
||||
// for forward compatibility
|
||||
@ -289,6 +305,7 @@ type BundleServer interface {
|
||||
UpdateFinancialConfirmationStatus(context.Context, *FinancialConfirmationRequest) (*CommonResponse, error)
|
||||
CreateOrderAddRecord(context.Context, *OrderAddRecord) (*CommonResponse, error)
|
||||
PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error)
|
||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
//增值套餐
|
||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
@ -302,6 +319,7 @@ type BundleServer interface {
|
||||
// 余量管理
|
||||
BundleExtend(context.Context, *BundleExtendRequest) (*BundleExtendResponse, error)
|
||||
BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error)
|
||||
GetBundleBalance(context.Context, *GetBundleBalanceReq) (*GetBundleBalanceResp, error)
|
||||
mustEmbedUnimplementedBundleServer()
|
||||
}
|
||||
|
||||
@ -361,6 +379,9 @@ func (UnimplementedBundleServer) CreateOrderAddRecord(context.Context, *OrderAdd
|
||||
func (UnimplementedBundleServer) PackagePriceAndTime(context.Context, *OrderRecord) (*PackagePriceAndTimeResponse, error) {
|
||||
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) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||
}
|
||||
@ -391,6 +412,9 @@ func (UnimplementedBundleServer) BundleExtend(context.Context, *BundleExtendRequ
|
||||
func (UnimplementedBundleServer) BundleExtendRecordsList(context.Context, *BundleExtendRecordsListRequest) (*BundleExtendRecordsListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleExtendRecordsList not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) GetBundleBalance(context.Context, *GetBundleBalanceReq) (*GetBundleBalanceResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBundleBalance not implemented")
|
||||
}
|
||||
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
@ -912,6 +936,35 @@ func _Bundle_PackagePriceAndTime_Handler(srv interface{}, ctx context.Context, d
|
||||
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) {
|
||||
in := new(CreateValueAddBundleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1202,6 +1255,35 @@ func _Bundle_BundleExtendRecordsList_Handler(srv interface{}, ctx context.Contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_GetBundleBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBundleBalanceReq)
|
||||
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("GetBundleBalance", 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)
|
||||
@ -1277,6 +1359,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "PackagePriceAndTime",
|
||||
Handler: _Bundle_PackagePriceAndTime_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OrderRecordsListV2",
|
||||
Handler: _Bundle_OrderRecordsListV2_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateValueAddBundle",
|
||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||
@ -1317,6 +1403,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "BundleExtendRecordsList",
|
||||
Handler: _Bundle_BundleExtendRecordsList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBundleBalance",
|
||||
Handler: _Bundle_GetBundleBalance_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "pb/bundle.proto",
|
||||
|
Loading…
Reference in New Issue
Block a user