fix: payment route name
CI / changes (push) Successful in 1m28s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 29s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 1s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 1s
CI / payment (push) Successful in 27s
CI / product (push) Successful in 1s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 1s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 1s

This commit is contained in:
zzw
2026-10-07 09:43:24 +08:00
parent 0137302e37
commit d26b73c2cc
5 changed files with 55 additions and 56 deletions
Binary file not shown.
+11 -12
View File
@@ -7,13 +7,12 @@
package payment
import (
reflect "reflect"
sync "sync"
unsafe "unsafe"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -88,7 +87,7 @@ type PayReq struct {
OrderSn string `protobuf:"bytes,1,opt,name=order_sn,json=orderSn,proto3" json:"order_sn,omitempty"`
Client string `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
Openid string `protobuf:"bytes,4,opt,name=openid,proto3" json:"openid,omitempty"` // 小程序微信支付必传,当前微信会话的openid
Openid string `protobuf:"bytes,4,opt,name=openid,proto3" json:"openid,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -414,13 +413,13 @@ const file_payment_payment_proto_rawDesc = "" +
"\x04body\x18\x03 \x01(\fR\x04body\x1a:\n" +
"\fHeadersEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x9e\x03\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xa0\x03\n" +
"\aPayment\x12I\n" +
"\x03Pay\x12\x0f.payment.PayReq\x1a\x11.payment.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/api/v3/payment/pay\x12O\n" +
"\x05Query\x12\x11.payment.QueryReq\x1a\x11.payment.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/api/v3/payment/query\x12O\n" +
"\x05Close\x12\x11.payment.CloseReq\x1a\x11.payment.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/api/v3/payment/close\x12R\n" +
"\x06Refund\x12\x12.payment.RefundReq\x1a\x11.payment.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/api/v3/payment/refund\x12R\n" +
"\x06Notify\x12\x12.payment.NotifyReq\x1a\x11.payment.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/api/v3/payment/notifyB\x1bZ\x19lone-services/rpc/paymentb\x06proto3"
"\x06Notify\x12\x12.payment.NotifyReq\x1a\x11.payment.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/api/v3/payment/notify\x12T\n" +
"\x06Refund\x12\x12.payment.RefundReq\x1a\x11.payment.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/admin/v3/payment/refundB\x1bZ\x19lone-services/rpc/paymentb\x06proto3"
var (
file_payment_payment_proto_rawDescOnce sync.Once
@@ -449,13 +448,13 @@ var file_payment_payment_proto_depIdxs = []int32{
1, // 1: payment.Payment.Pay:input_type -> payment.PayReq
2, // 2: payment.Payment.Query:input_type -> payment.QueryReq
3, // 3: payment.Payment.Close:input_type -> payment.CloseReq
4, // 4: payment.Payment.Refund:input_type -> payment.RefundReq
5, // 5: payment.Payment.Notify:input_type -> payment.NotifyReq
5, // 4: payment.Payment.Notify:input_type -> payment.NotifyReq
4, // 5: payment.Payment.Refund:input_type -> payment.RefundReq
0, // 6: payment.Payment.Pay:output_type -> payment.Response
0, // 7: payment.Payment.Query:output_type -> payment.Response
0, // 8: payment.Payment.Close:output_type -> payment.Response
0, // 9: payment.Payment.Refund:output_type -> payment.Response
0, // 10: payment.Payment.Notify:output_type -> payment.Response
0, // 9: payment.Payment.Notify:output_type -> payment.Response
0, // 10: payment.Payment.Refund:output_type -> payment.Response
6, // [6:11] is the sub-list for method output_type
1, // [1:6] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
+32 -32
View File
@@ -22,8 +22,8 @@ const (
Payment_Pay_FullMethodName = "/payment.Payment/Pay"
Payment_Query_FullMethodName = "/payment.Payment/Query"
Payment_Close_FullMethodName = "/payment.Payment/Close"
Payment_Refund_FullMethodName = "/payment.Payment/Refund"
Payment_Notify_FullMethodName = "/payment.Payment/Notify"
Payment_Refund_FullMethodName = "/payment.Payment/Refund"
)
// PaymentClient is the client API for Payment service.
@@ -33,8 +33,8 @@ type PaymentClient interface {
Pay(ctx context.Context, in *PayReq, opts ...grpc.CallOption) (*Response, error)
Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*Response, error)
Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*Response, error)
Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error)
Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*Response, error)
Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error)
}
type paymentClient struct {
@@ -75,20 +75,20 @@ func (c *paymentClient) Close(ctx context.Context, in *CloseReq, opts ...grpc.Ca
return out, nil
}
func (c *paymentClient) Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error) {
func (c *paymentClient) Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Payment_Refund_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, Payment_Notify_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paymentClient) Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*Response, error) {
func (c *paymentClient) Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Payment_Notify_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, Payment_Refund_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -102,8 +102,8 @@ type PaymentServer interface {
Pay(context.Context, *PayReq) (*Response, error)
Query(context.Context, *QueryReq) (*Response, error)
Close(context.Context, *CloseReq) (*Response, error)
Refund(context.Context, *RefundReq) (*Response, error)
Notify(context.Context, *NotifyReq) (*Response, error)
Refund(context.Context, *RefundReq) (*Response, error)
mustEmbedUnimplementedPaymentServer()
}
@@ -123,12 +123,12 @@ func (UnimplementedPaymentServer) Query(context.Context, *QueryReq) (*Response,
func (UnimplementedPaymentServer) Close(context.Context, *CloseReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Close not implemented")
}
func (UnimplementedPaymentServer) Refund(context.Context, *RefundReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Refund not implemented")
}
func (UnimplementedPaymentServer) Notify(context.Context, *NotifyReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Notify not implemented")
}
func (UnimplementedPaymentServer) Refund(context.Context, *RefundReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method Refund not implemented")
}
func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {}
func (UnimplementedPaymentServer) testEmbeddedByValue() {}
@@ -204,24 +204,6 @@ func _Payment_Close_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler)
}
func _Payment_Refund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefundReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServer).Refund(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Payment_Refund_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServer).Refund(ctx, req.(*RefundReq))
}
return interceptor(ctx, in, info, handler)
}
func _Payment_Notify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotifyReq)
if err := dec(in); err != nil {
@@ -240,6 +222,24 @@ func _Payment_Notify_Handler(srv interface{}, ctx context.Context, dec func(inte
return interceptor(ctx, in, info, handler)
}
func _Payment_Refund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefundReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PaymentServer).Refund(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Payment_Refund_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PaymentServer).Refund(ctx, req.(*RefundReq))
}
return interceptor(ctx, in, info, handler)
}
// Payment_ServiceDesc is the grpc.ServiceDesc for Payment service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -259,14 +259,14 @@ var Payment_ServiceDesc = grpc.ServiceDesc{
MethodName: "Close",
Handler: _Payment_Close_Handler,
},
{
MethodName: "Refund",
Handler: _Payment_Refund_Handler,
},
{
MethodName: "Notify",
Handler: _Payment_Notify_Handler,
},
{
MethodName: "Refund",
Handler: _Payment_Refund_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "payment/payment.proto",
@@ -7,7 +7,7 @@ package server
import (
"context"
payment "lone-services/rpc/payment/pb"
"lone-services/rpc/payment/pb"
"lone-services/services/payment/internal/logic"
"lone-services/services/payment/internal/svc"
)
@@ -38,12 +38,12 @@ func (s *PaymentServer) Close(ctx context.Context, in *payment.CloseReq) (*payme
return l.Close(in)
}
func (s *PaymentServer) Refund(ctx context.Context, in *payment.RefundReq) (*payment.Response, error) {
l := logic.NewRefundLogic(ctx, s.svcCtx)
return l.Refund(in)
}
func (s *PaymentServer) Notify(ctx context.Context, in *payment.NotifyReq) (*payment.Response, error) {
l := logic.NewNotifyLogic(ctx, s.svcCtx)
return l.Notify(in)
}
func (s *PaymentServer) Refund(ctx context.Context, in *payment.RefundReq) (*payment.Response, error) {
l := logic.NewRefundLogic(ctx, s.svcCtx)
return l.Refund(in)
}
+6 -6
View File
@@ -25,8 +25,8 @@ type (
Pay(ctx context.Context, in *PayReq, opts ...grpc.CallOption) (*Response, error)
Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*Response, error)
Close(ctx context.Context, in *CloseReq, opts ...grpc.CallOption) (*Response, error)
Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error)
Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*Response, error)
Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error)
}
defaultPayment struct {
@@ -55,12 +55,12 @@ func (m *defaultPayment) Close(ctx context.Context, in *CloseReq, opts ...grpc.C
return client.Close(ctx, in, opts...)
}
func (m *defaultPayment) Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error) {
client := payment.NewPaymentClient(m.cli.Conn())
return client.Refund(ctx, in, opts...)
}
func (m *defaultPayment) Notify(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*Response, error) {
client := payment.NewPaymentClient(m.cli.Conn())
return client.Notify(ctx, in, opts...)
}
func (m *defaultPayment) Refund(ctx context.Context, in *RefundReq, opts ...grpc.CallOption) (*Response, error) {
client := payment.NewPaymentClient(m.cli.Conn())
return client.Refund(ctx, in, opts...)
}