54 lines
1.4 KiB
Go
54 lines
1.4 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: delivery.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"bsm/full/module/ec/delivery/external/pb/delivery"
|
|
carlogic "bsm/full/module/ec/delivery/internal/logic/car"
|
|
"bsm/full/module/ec/delivery/internal/svc"
|
|
)
|
|
|
|
type CarServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
delivery.UnimplementedCarServer
|
|
}
|
|
|
|
func NewCarServer(svcCtx *svc.ServiceContext) *CarServer {
|
|
return &CarServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// 配送车辆列表
|
|
func (s *CarServer) CarList(ctx context.Context, in *delivery.FetchRequest) (*delivery.CarListReply, error) {
|
|
l := carlogic.NewCarListLogic(ctx, s.svcCtx)
|
|
return l.CarList(in)
|
|
}
|
|
|
|
// 添加配送车辆信息
|
|
func (s *CarServer) CarAdd(ctx context.Context, in *delivery.CarItem) (*delivery.StatusReply, error) {
|
|
l := carlogic.NewCarAddLogic(ctx, s.svcCtx)
|
|
return l.CarAdd(in)
|
|
}
|
|
|
|
// 获取配送车辆信息
|
|
func (s *CarServer) CarGet(ctx context.Context, in *delivery.IdentRequest) (*delivery.CarItem, error) {
|
|
l := carlogic.NewCarGetLogic(ctx, s.svcCtx)
|
|
return l.CarGet(in)
|
|
}
|
|
|
|
// 修改配送车辆信息
|
|
func (s *CarServer) CarSet(ctx context.Context, in *delivery.CarItem) (*delivery.StatusReply, error) {
|
|
l := carlogic.NewCarSetLogic(ctx, s.svcCtx)
|
|
return l.CarSet(in)
|
|
}
|
|
|
|
// 删除配送车辆信息
|
|
func (s *CarServer) CarDel(ctx context.Context, in *delivery.IdentRequest) (*delivery.StatusReply, error) {
|
|
l := carlogic.NewCarDelLogic(ctx, s.svcCtx)
|
|
return l.CarDel(in)
|
|
}
|