Compare commits
No commits in common. "6829778c8cbbda0427e2186f2e16fd9d963782eb" and "28d92a6ca2bf10d1845dffdc6e03c42e86b14f02" have entirely different histories.
6829778c8c
...
28d92a6ca2
@ -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)
|
|
||||||
}
|
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
|
@ -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{
|
||||||
@ -778,9 +777,3 @@ message AddBundleInfo {
|
|||||||
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
@ -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
|
|
||||||
}
|
|
||||||
|
@ -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 {
|
||||||
@ -123,7 +122,6 @@ type BundleClientImpl struct {
|
|||||||
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",
|
||||||
|
Loading…
Reference in New Issue
Block a user