170 lines
6.0 KiB
Go
170 lines
6.0 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) ExpressAdminCancel(ctx context.Context, in *express.IdRequest) (*express.Response, error) {
|
|
l := logic.NewExpressAdminCancelLogic(ctx, s.svcCtx)
|
|
return l.ExpressAdminCancel(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressAdminQuery(ctx context.Context, in *express.IdRequest) (*express.Response, error) {
|
|
l := logic.NewExpressAdminQueryLogic(ctx, s.svcCtx)
|
|
return l.ExpressAdminQuery(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressAdminEstimated(ctx context.Context, in *express.IdRequest) (*express.Response, error) {
|
|
l := logic.NewExpressAdminEstimatedLogic(ctx, s.svcCtx)
|
|
return l.ExpressAdminEstimated(in)
|
|
}
|
|
|
|
// API
|
|
func (s *ExpressServer) ExpressSfBack(ctx context.Context, in *express.EmtpyRequest) (*express.SfResponse, error) {
|
|
l := logic.NewExpressSfBackLogic(ctx, s.svcCtx)
|
|
return l.ExpressSfBack(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressJdBack(ctx context.Context, in *express.JdRequest) (*express.SfResponse, error) {
|
|
l := logic.NewExpressJdBackLogic(ctx, s.svcCtx)
|
|
return l.ExpressJdBack(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressApiQuery(ctx context.Context, in *express.IdApiRequest) (*express.Response, error) {
|
|
l := logic.NewExpressApiQueryLogic(ctx, s.svcCtx)
|
|
return l.ExpressApiQuery(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressApiEstimated(ctx context.Context, in *express.IdApiRequest) (*express.Response, error) {
|
|
l := logic.NewExpressApiEstimatedLogic(ctx, s.svcCtx)
|
|
return l.ExpressApiEstimated(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ExpressApiCancel(ctx context.Context, in *express.IdApiRequest) (*express.Response, error) {
|
|
l := logic.NewExpressApiCancelLogic(ctx, s.svcCtx)
|
|
return l.ExpressApiCancel(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintBarCode(ctx context.Context, in *express.ApiPrintBarCodeRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintBarCodeLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintBarCode(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintBarCodePrint(ctx context.Context, in *express.ApiPrintBarCodePrintRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintBarCodePrintLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintBarCodePrint(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintExpress(ctx context.Context, in *express.ApiPrintExpressRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintExpressLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintExpress(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintExpressTransit(ctx context.Context, in *express.ApiPrintExpressTransitRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintExpressTransitLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintExpressTransit(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintExpressPrint(ctx context.Context, in *express.ApiPrintExpressPrintRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintExpressPrintLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintExpressPrint(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiPrintProduct(ctx context.Context, in *express.EmtpyRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintProductLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintProduct(in)
|
|
}
|
|
|
|
func (s *ExpressServer) ApiLogin(ctx context.Context, in *express.ApiLoginRequest) (*express.Response, error) {
|
|
l := logic.NewApiLoginLogic(ctx, s.svcCtx)
|
|
return l.ApiLogin(in)
|
|
}
|
|
|
|
// 不需要登录
|
|
func (s *ExpressServer) ApiPrintBind(ctx context.Context, in *express.ApiPrintBindRequest) (*express.Response, error) {
|
|
l := logic.NewApiPrintBindLogic(ctx, s.svcCtx)
|
|
return l.ApiPrintBind(in)
|
|
}
|
|
|
|
// 添加生成订单的发货信息
|
|
func (s *ExpressServer) DeliveryOrderCreate(ctx context.Context, in *express.DeliveryOrderCreateRequest) (*express.IdResponse, error) {
|
|
l := logic.NewDeliveryOrderCreateLogic(ctx, s.svcCtx)
|
|
return l.DeliveryOrderCreate(in)
|
|
}
|
|
|
|
func (s *ExpressServer) GetDeliveryByOrderId(ctx context.Context, in *express.IdRequest) (*express.DeliveryInfoResponse, error) {
|
|
l := logic.NewGetDeliveryByOrderIdLogic(ctx, s.svcCtx)
|
|
return l.GetDeliveryByOrderId(in)
|
|
}
|
|
|
|
func (s *ExpressServer) GetDeliveryBySupplyId(ctx context.Context, in *express.IdRequest) (*express.DeliveryInfoResponse, error) {
|
|
l := logic.NewGetDeliveryBySupplyIdLogic(ctx, s.svcCtx)
|
|
return l.GetDeliveryBySupplyId(in)
|
|
}
|