refactor: reorganize modules and add Linux build tooling
This commit is contained in:
53
module/ec/delivery/internal/server/car/car_server.go
Normal file
53
module/ec/delivery/internal/server/car/car_server.go
Normal file
@@ -0,0 +1,53 @@
|
||||
// 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)
|
||||
}
|
||||
Reference in New Issue
Block a user