78 lines
2.3 KiB
Go
78 lines
2.3 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.2
|
|
// Source: express.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"lone-services/rpc/express/pb"
|
|
"lone-services/services/express/internal/logic"
|
|
"lone-services/services/express/internal/svc"
|
|
)
|
|
|
|
type ExpressServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
express.UnimplementedExpressServer
|
|
}
|
|
|
|
func NewExpressServer(svcCtx *svc.ServiceContext) *ExpressServer {
|
|
return &ExpressServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (s *ExpressServer) Items(ctx context.Context, in *express.EmtpyRequest) (*express.Response, error) {
|
|
l := logic.NewItemsLogic(ctx, s.svcCtx)
|
|
return l.Items(in)
|
|
}
|
|
|
|
func (s *ExpressServer) Create(ctx context.Context, in *express.CreateRequest) (*express.Response, error) {
|
|
l := logic.NewCreateLogic(ctx, s.svcCtx)
|
|
return l.Create(in)
|
|
}
|
|
|
|
func (s *ExpressServer) Edit(ctx context.Context, in *express.CreateRequest) (*express.Response, error) {
|
|
l := logic.NewEditLogic(ctx, s.svcCtx)
|
|
return l.Edit(in)
|
|
}
|
|
|
|
func (s *ExpressServer) Info(ctx context.Context, in *express.IdRequest) (*express.Response, error) {
|
|
l := logic.NewInfoLogic(ctx, s.svcCtx)
|
|
return l.Info(in)
|
|
}
|
|
|
|
func (s *ExpressServer) Names(ctx context.Context, in *express.EmtpyRequest) (*express.Response, error) {
|
|
l := logic.NewNamesLogic(ctx, s.svcCtx)
|
|
return l.Names(in)
|
|
}
|
|
|
|
func (s *ExpressServer) Status(ctx context.Context, in *express.StatusRequest) (*express.Response, error) {
|
|
l := logic.NewStatusLogic(ctx, s.svcCtx)
|
|
return l.Status(in)
|
|
}
|
|
|
|
func (s *ExpressServer) History(ctx context.Context, in *express.HistoryRequest) (*express.Response, error) {
|
|
l := logic.NewHistoryLogic(ctx, s.svcCtx)
|
|
return l.History(in)
|
|
}
|
|
|
|
// 获取可选的打印公司
|
|
func (s *ExpressServer) ExpressCompany(ctx context.Context, in *express.ExpressCompanyRequest) (*express.Response, error) {
|
|
l := logic.NewExpressCompanyLogic(ctx, s.svcCtx)
|
|
return l.ExpressCompany(in)
|
|
}
|
|
|
|
// 发货
|
|
func (s *ExpressServer) ExpressDelivering(ctx context.Context, in *express.DeliveringRequest) (*express.Response, error) {
|
|
l := logic.NewExpressDeliveringLogic(ctx, s.svcCtx)
|
|
return l.ExpressDelivering(in)
|
|
}
|
|
|
|
// 添加生成订单的发货信息
|
|
func (s *ExpressServer) DeliveryOrderCreate(ctx context.Context, in *express.DeliveryOrderCreateRequest) (*express.IdResponse, error) {
|
|
l := logic.NewDeliveryOrderCreateLogic(ctx, s.svcCtx)
|
|
return l.DeliveryOrderCreate(in)
|
|
}
|