Compare commits

..

No commits in common. "6829778c8cbbda0427e2186f2e16fd9d963782eb" and "28d92a6ca2bf10d1845dffdc6e03c42e86b14f02" have entirely different histories.

7 changed files with 863 additions and 1049 deletions

View File

@ -108,7 +108,3 @@ func (b *BundleProvider) UpdateReconciliation(_ context.Context, req *bundle.Rec
func (b *BundleProvider) OnlyAddValueListByOrderNo(_ context.Context, req *bundle.OnlyAddValueListByOrderNoRequest) (res *bundle.OnlyAddValueListByOrderNoResp, err error) { func (b *BundleProvider) OnlyAddValueListByOrderNo(_ context.Context, req *bundle.OnlyAddValueListByOrderNoRequest) (res *bundle.OnlyAddValueListByOrderNoResp, err error) {
return logic.OnlyAddValueListByOrderNo(req) return logic.OnlyAddValueListByOrderNo(req)
} }
func (b *BundleProvider) UpdateReconciliationStatusBySerialNumber(_ context.Context, req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
return logic.UpdateReconciliationStatusBySerialNumber(req)
}

View File

@ -610,15 +610,6 @@ func GetReconciliationList(req *bundle.GetReconciliationListReq) (*bundle.GetRec
return res, nil return res, nil
} }
func CreateReconciliation(req *bundle.ReconciliationInfo) (res *bundle.CommonResponse, err error) { func CreateReconciliation(req *bundle.ReconciliationInfo) (res *bundle.CommonResponse, err error) {
if req.SerialNumber != "" {
var existing model.Reconciliation
err = app.ModuleClients.BundleDB.Where("serial_number = ?", req.SerialNumber).First(&existing).Error
if err == nil {
// 说明这笔流水存在对账单
return &bundle.CommonResponse{Msg: "创建对账单成功"}, nil
}
}
record := &model.Reconciliation{ record := &model.Reconciliation{
BundleOrderOn: req.BundleOrderOn, BundleOrderOn: req.BundleOrderOn,
BundleAddOrderOn: req.BundleAddOrderOn, BundleAddOrderOn: req.BundleAddOrderOn,
@ -692,22 +683,3 @@ func OnlyAddValueListByOrderNo(req *bundle.OnlyAddValueListByOrderNoRequest) (re
// 返回成功响应 // 返回成功响应
return response, nil return response, nil
} }
func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
var existing model.Reconciliation
if err := app.ModuleClients.BundleDB.Where("serial_number = ?", req.SerialNumber).First(&existing).Error; err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errors.New("对账单记录不存在")
}
return nil, fmt.Errorf("查询对账单失败: %v", err)
}
updates := model.Reconciliation{
PayTime: req.PayTime,
PayStatus: int(req.PaymentStatus),
SerialNumber: req.SerialNumber,
}
if err := app.ModuleClients.BundleDB.Model(&existing).Updates(updates).Error; err != nil {
return nil, fmt.Errorf("更新对账单失败: %v", err)
}
// 返回成功响应
return &bundle.CommonResponse{Msg: "更新成功"}, nil
}

View File

@ -151,8 +151,3 @@ func OnlyAddValueListByOrderNo(req *bundle.OnlyAddValueListByOrderNoRequest) (re
res, err = dao.OnlyAddValueListByOrderNo(req) res, err = dao.OnlyAddValueListByOrderNo(req)
return return
} }
func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
res = new(bundle.CommonResponse)
res, err = dao.UpdateReconciliationStatusBySerialNumber(req)
return
}

View File

@ -67,7 +67,6 @@ service Bundle {
rpc GetReconciliationList(GetReconciliationListReq) returns (GetReconciliationListResp) {} // rpc GetReconciliationList(GetReconciliationListReq) returns (GetReconciliationListResp) {} //
rpc CreateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // rpc CreateReconciliation(ReconciliationInfo) returns (CommonResponse) {} //
rpc UpdateReconciliation(ReconciliationInfo) returns (CommonResponse) {} // rpc UpdateReconciliation(ReconciliationInfo) returns (CommonResponse) {} //
rpc UpdateReconciliationStatusBySerialNumber(UpdateStatusAndPayTimeBySerialNumber) returns (CommonResponse) {} //
} }
message GetReconciliationListReq{ message GetReconciliationListReq{
@ -777,10 +776,4 @@ message AddBundleInfo {
string checkOutSessionId = 3; string checkOutSessionId = 3;
string orderNo = 4; string orderNo = 4;
int32 paymentStatus = 5; int32 paymentStatus = 5;
}
message UpdateStatusAndPayTimeBySerialNumber {
string serialNumber = 1;
string payTime = 2;
int32 paymentStatus = 3;
} }

File diff suppressed because it is too large Load Diff

View File

@ -422,6 +422,3 @@ func (this *OnlyAddValueListByOrderNoResp) Validate() error {
func (this *AddBundleInfo) Validate() error { func (this *AddBundleInfo) Validate() error {
return nil return nil
} }
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
return nil
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT. // Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-triple v1.0.8 // - protoc-gen-go-triple v1.0.8
// - protoc v5.26.1 // - protoc v3.20.3
// source: pb/bundle.proto // source: pb/bundle.proto
package bundle package bundle
@ -74,7 +74,6 @@ type BundleClient interface {
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment) GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) UpdateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
} }
type bundleClient struct { type bundleClient struct {
@ -82,48 +81,47 @@ type bundleClient struct {
} }
type BundleClientImpl struct { type BundleClientImpl struct {
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error) CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error) UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error) DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error) HandShelf func(ctx context.Context, in *HandShelfRequest) (*CommonResponse, error)
SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error) SaveBundle func(ctx context.Context, in *BundleProfile) (*SaveResponse, error)
BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error) BundleListV2 func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error) BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error) BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error) BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error) CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error)
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error) UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error) UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error) OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error) OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error) UpdateFinancialConfirmationStatus func(ctx context.Context, in *FinancialConfirmationRequest) (*CommonResponse, error)
CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error) CreateOrderAddRecord func(ctx context.Context, in *OrderAddRecord) (*CommonResponse, error)
PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error) PackagePriceAndTime func(ctx context.Context, in *OrderRecord) (*PackagePriceAndTimeResponse, error)
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error) OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error) OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error) ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error) ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error) SaveValueAddService func(ctx context.Context, in *ValueAddServiceLang) (*SaveResponse, error)
ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error) ValueAddServiceList func(ctx context.Context, in *ValueAddServiceListRequest) (*ValueAddServiceListResponse, error)
ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error) ValueAddServiceDetail func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceDetailResponse, error)
ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error) ValueAddServiceLangByUuidAndLanguage func(ctx context.Context, in *ValueAddServiceDetailRequest) (*ValueAddServiceLang, error)
CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error) CalculatePrice func(ctx context.Context, in *CalculatePriceRequest) (*CalculatePriceResponse, error)
BundleExtend func(ctx context.Context, in *BundleExtendRequest) (*BundleExtendResponse, error) 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) 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)
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)
UpdateReconciliationStatusBySerialNumber func(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
} }
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient { func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
@ -384,12 +382,6 @@ func (c *bundleClient) UpdateReconciliation(ctx context.Context, in *Reconciliat
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliation", in, out) return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliation", in, out)
} }
func (c *bundleClient) UpdateReconciliationStatusBySerialNumber(ctx context.Context, in *UpdateStatusAndPayTimeBySerialNumber, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
out := new(CommonResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateReconciliationStatusBySerialNumber", in, out)
}
// BundleServer is the server API for Bundle service. // BundleServer is the server API for Bundle service.
// All implementations must embed UnimplementedBundleServer // All implementations must embed UnimplementedBundleServer
// for forward compatibility // for forward compatibility
@ -440,7 +432,6 @@ type BundleServer interface {
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error)
mustEmbedUnimplementedBundleServer() mustEmbedUnimplementedBundleServer()
} }
@ -572,9 +563,6 @@ func (UnimplementedBundleServer) CreateReconciliation(context.Context, *Reconcil
func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) { func (UnimplementedBundleServer) UpdateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliation not implemented") return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliation not implemented")
} }
func (UnimplementedBundleServer) UpdateReconciliationStatusBySerialNumber(context.Context, *UpdateStatusAndPayTimeBySerialNumber) (*CommonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateReconciliationStatusBySerialNumber not implemented")
}
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) { func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl s.proxyImpl = impl
} }
@ -1792,35 +1780,6 @@ func _Bundle_UpdateReconciliation_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Bundle_UpdateReconciliationStatusBySerialNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateStatusAndPayTimeBySerialNumber)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("UpdateReconciliationStatusBySerialNumber", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service. // Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
// It's only intended for direct use with grpc_go.RegisterService, // It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -1992,10 +1951,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "UpdateReconciliation", MethodName: "UpdateReconciliation",
Handler: _Bundle_UpdateReconciliation_Handler, Handler: _Bundle_UpdateReconciliation_Handler,
}, },
{
MethodName: "UpdateReconciliationStatusBySerialNumber",
Handler: _Bundle_UpdateReconciliationStatusBySerialNumber_Handler,
},
}, },
Streams: []grpc_go.StreamDesc{}, Streams: []grpc_go.StreamDesc{},
Metadata: "pb/bundle.proto", Metadata: "pb/bundle.proto",