refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/order/internal/logic/mgt"
|
||||
pb "bsm/full/module/ec/order/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type MgtServer struct {
|
||||
@@ -16,17 +16,17 @@ func NewMgtServer() *MgtServer {
|
||||
}
|
||||
|
||||
// 创建订单
|
||||
func (s *MgtServer) OrderCreate(ctx context.Context, in *pb.CreateOrderRequest) (*pb.StatusReply, error) {
|
||||
func (s *MgtServer) OrderCreate(ctx context.Context, in *pb.CreateOrderRequest) (*pb.OrderStatusReply, error) {
|
||||
return mgt.OrderCreate(ctx, in)
|
||||
}
|
||||
|
||||
// 修改订单
|
||||
func (s *MgtServer) OrderModify(ctx context.Context, in *pb.OrderSummaryItem) (*pb.StatusReply, error) {
|
||||
func (s *MgtServer) OrderModify(ctx context.Context, in *pb.OrderSummaryItem) (*pb.OrderStatusReply, error) {
|
||||
return mgt.OrderModify(ctx, in)
|
||||
}
|
||||
|
||||
// 获取一个订单的详情数据
|
||||
func (s *MgtServer) OrderGet(ctx context.Context, in *pb.IdentRequest) (*pb.OrderGetReply, error) {
|
||||
func (s *MgtServer) OrderGet(ctx context.Context, in *pb.OrderIdentRequest) (*pb.OrderGetReply, error) {
|
||||
return mgt.OrderGet(ctx, in)
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ func (s *MgtServer) OrderListByStore(ctx context.Context, in *pb.OrderListByStor
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
func (s *MgtServer) OrderCancel(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *MgtServer) OrderCancel(ctx context.Context, in *pb.OrderIdentRequest) (*pb.OrderStatusReply, error) {
|
||||
return mgt.OrderCancel(ctx, in)
|
||||
}
|
||||
|
||||
// 退货
|
||||
func (s *MgtServer) OrderReturnable(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *MgtServer) OrderReturnable(ctx context.Context, in *pb.OrderIdentRequest) (*pb.OrderStatusReply, error) {
|
||||
return mgt.OrderReturnable(ctx, in)
|
||||
}
|
||||
|
||||
// 订单审批
|
||||
func (s *MgtServer) OrderApprove(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *MgtServer) OrderApprove(ctx context.Context, in *pb.OrderIdentRequest) (*pb.OrderStatusReply, error) {
|
||||
return mgt.OrderApprove(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user