refactor: localize protobuf definitions
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"bsm/full/module/ec/order/internal/logic/summary"
|
||||
pb "bsm/full/module/ec/order/pb"
|
||||
"context"
|
||||
)
|
||||
|
||||
type SummaryServer struct {
|
||||
@@ -16,22 +16,22 @@ func NewSummaryServer() *SummaryServer {
|
||||
}
|
||||
|
||||
// 快速创建一个店铺订单
|
||||
func (s *SummaryServer) QuickCreateByProduct(ctx context.Context, in *pb.QuickCreateByProductRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) QuickCreateByProduct(ctx context.Context, in *pb.QuickCreateByProductRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.QuickCreateByProduct(ctx, in)
|
||||
}
|
||||
|
||||
// 将购物车的数据提交生成订单
|
||||
func (s *SummaryServer) Submit(ctx context.Context, in *pb.SubmitRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) Submit(ctx context.Context, in *pb.SubmitRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.Submit(ctx, in)
|
||||
}
|
||||
|
||||
// 检测是否有未确认及付款的订单
|
||||
func (s *SummaryServer) Check(ctx context.Context, in *pb.Empty) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) Check(ctx context.Context, in *pb.Empty) (*pb.OrderStatusReply, error) {
|
||||
return summary.Check(ctx, in)
|
||||
}
|
||||
|
||||
// 获取一个订单的详情数据
|
||||
func (s *SummaryServer) Get(ctx context.Context, in *pb.IdentRequest) (*pb.SummaryGetReply, error) {
|
||||
func (s *SummaryServer) Get(ctx context.Context, in *pb.OrderIdentRequest) (*pb.SummaryGetReply, error) {
|
||||
return summary.Get(ctx, in)
|
||||
}
|
||||
|
||||
@@ -46,21 +46,21 @@ func (s *SummaryServer) Confirm(ctx context.Context, in *pb.ConfirmRequest) (*pb
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
func (s *SummaryServer) Cancel(ctx context.Context, in *pb.CancelRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) Cancel(ctx context.Context, in *pb.CancelRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.Cancel(ctx, in)
|
||||
}
|
||||
|
||||
// 模拟支付
|
||||
func (s *SummaryServer) SimulatePay(ctx context.Context, in *pb.SimulatePayRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) SimulatePay(ctx context.Context, in *pb.SimulatePayRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.SimulatePay(ctx, in)
|
||||
}
|
||||
|
||||
// 模拟发货
|
||||
func (s *SummaryServer) SimulateShipments(ctx context.Context, in *pb.SimulateShipmentsRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) SimulateShipments(ctx context.Context, in *pb.SimulateShipmentsRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.SimulateShipments(ctx, in)
|
||||
}
|
||||
|
||||
// 模拟收货
|
||||
func (s *SummaryServer) SimulateReceiving(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
func (s *SummaryServer) SimulateReceiving(ctx context.Context, in *pb.OrderIdentRequest) (*pb.OrderStatusReply, error) {
|
||||
return summary.SimulateReceiving(ctx, in)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user