Files
lone-services/services/order/internal/server/orderServer.go
T
2026-10-08 09:25:41 +08:00

174 lines
6.2 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1
// Source: order.proto
package server
import (
"context"
"lone-services/rpc/order/pb"
"lone-services/services/order/internal/logic"
"lone-services/services/order/internal/svc"
)
type OrderServer struct {
svcCtx *svc.ServiceContext
order.UnimplementedOrderServer
}
func NewOrderServer(svcCtx *svc.ServiceContext) *OrderServer {
return &OrderServer{
svcCtx: svcCtx,
}
}
func (s *OrderServer) Items(ctx context.Context, in *order.OrderItemsRequest) (*order.Response, error) {
l := logic.NewItemsLogic(ctx, s.svcCtx)
return l.Items(in)
}
func (s *OrderServer) AddressItem(ctx context.Context, in *order.AddressItemsRequest) (*order.Response, error) {
l := logic.NewAddressItemLogic(ctx, s.svcCtx)
return l.AddressItem(in)
}
func (s *OrderServer) AddressByStore(ctx context.Context, in *order.AddressByStoreItemsRequest) (*order.Response, error) {
l := logic.NewAddressByStoreLogic(ctx, s.svcCtx)
return l.AddressByStore(in)
}
func (s *OrderServer) OrderAuditingItems(ctx context.Context, in *order.OrderAuditingItemsRequest) (*order.Response, error) {
l := logic.NewOrderAuditingItemsLogic(ctx, s.svcCtx)
return l.OrderAuditingItems(in)
}
func (s *OrderServer) OrderAuditing(ctx context.Context, in *order.OrderAuditingRequest) (*order.Response, error) {
l := logic.NewOrderAuditingLogic(ctx, s.svcCtx)
return l.OrderAuditing(in)
}
func (s *OrderServer) OrderCreate(ctx context.Context, in *order.AdminCreateOrderRequest) (*order.Response, error) {
l := logic.NewOrderCreateLogic(ctx, s.svcCtx)
return l.OrderCreate(in)
}
func (s *OrderServer) OrderDown(ctx context.Context, in *order.OrderItemsRequest) (*order.ExcelExportResponse, error) {
l := logic.NewOrderDownLogic(ctx, s.svcCtx)
return l.OrderDown(in)
}
func (s *OrderServer) OrderInfo(ctx context.Context, in *order.IdRequest) (*order.Response, error) {
l := logic.NewOrderInfoLogic(ctx, s.svcCtx)
return l.OrderInfo(in)
}
func (s *OrderServer) SupplyItems(ctx context.Context, in *order.SupplyItemsRequest) (*order.Response, error) {
l := logic.NewSupplyItemsLogic(ctx, s.svcCtx)
return l.SupplyItems(in)
}
func (s *OrderServer) SupplyStatus(ctx context.Context, in *order.StatusRequest) (*order.Response, error) {
l := logic.NewSupplyStatusLogic(ctx, s.svcCtx)
return l.SupplyStatus(in)
}
func (s *OrderServer) UpdateAddressSaleInfo(ctx context.Context, in *order.UpdateAddressSaleInfoRequest) (*order.UpdateAddressSaleInfoResponse, error) {
l := logic.NewUpdateAddressSaleInfoLogic(ctx, s.svcCtx)
return l.UpdateAddressSaleInfo(in)
}
func (s *OrderServer) UpdateOrderDeliverStatus(ctx context.Context, in *order.UpdateOrderDeliverStatusRequest) (*order.UpdateOrderDeliverStatusResponse, error) {
l := logic.NewUpdateOrderDeliverStatusLogic(ctx, s.svcCtx)
return l.UpdateOrderDeliverStatus(in)
}
// type 1为销售 2为门店 3为个人
func (s *OrderServer) GetOrderInfo(ctx context.Context, in *order.GetOrderInfoRequest) (*order.OrderInfoResponse, error) {
l := logic.NewGetOrderInfoLogic(ctx, s.svcCtx)
return l.GetOrderInfo(in)
}
// status 1 为已支付 4 支付失败,其它的返回错误
func (s *OrderServer) UpdateOrderPayStatus(ctx context.Context, in *order.UpdateOrderPayStatusRequest) (*order.UpdateOrderPayStatusResponse, error) {
l := logic.NewUpdateOrderPayStatusLogic(ctx, s.svcCtx)
return l.UpdateOrderPayStatus(in)
}
// 门店是否存在指定产品的有效/待支付订单(内部)
func (s *OrderServer) ExistByStoreProduct(ctx context.Context, in *order.ExistByStoreProductReq) (*order.ExistByStoreProductResp, error) {
l := logic.NewExistByStoreProductLogic(ctx, s.svcCtx)
return l.ExistByStoreProduct(in)
}
// API
func (s *OrderServer) ApiSupply(ctx context.Context, in *order.ApiSupplyRequest) (*order.Response, error) {
l := logic.NewApiSupplyLogic(ctx, s.svcCtx)
return l.ApiSupply(in)
}
func (s *OrderServer) ApiSupplyInfo(ctx context.Context, in *order.ApiSupplyInfoRequest) (*order.Response, error) {
l := logic.NewApiSupplyInfoLogic(ctx, s.svcCtx)
return l.ApiSupplyInfo(in)
}
func (s *OrderServer) WebCreate(ctx context.Context, in *order.CreateOrderRequest) (*order.Response, error) {
l := logic.NewWebCreateLogic(ctx, s.svcCtx)
return l.WebCreate(in)
}
func (s *OrderServer) WebCreateOne(ctx context.Context, in *order.CreateOrderOneRequest) (*order.Response, error) {
l := logic.NewWebCreateOneLogic(ctx, s.svcCtx)
return l.WebCreateOne(in)
}
func (s *OrderServer) WebAddressCreate(ctx context.Context, in *order.EditAddressRequest) (*order.Response, error) {
l := logic.NewWebAddressCreateLogic(ctx, s.svcCtx)
return l.WebAddressCreate(in)
}
func (s *OrderServer) WebAddressEdit(ctx context.Context, in *order.EditAddressRequest) (*order.Response, error) {
l := logic.NewWebAddressEditLogic(ctx, s.svcCtx)
return l.WebAddressEdit(in)
}
func (s *OrderServer) WebAddressDel(ctx context.Context, in *order.IdAndTypeRequest) (*order.Response, error) {
l := logic.NewWebAddressDelLogic(ctx, s.svcCtx)
return l.WebAddressDel(in)
}
func (s *OrderServer) WebAddressDef(ctx context.Context, in *order.IdAndTypeRequest) (*order.Response, error) {
l := logic.NewWebAddressDefLogic(ctx, s.svcCtx)
return l.WebAddressDef(in)
}
func (s *OrderServer) WebAddressInfo(ctx context.Context, in *order.IdAndTypeRequest) (*order.Response, error) {
l := logic.NewWebAddressInfoLogic(ctx, s.svcCtx)
return l.WebAddressInfo(in)
}
func (s *OrderServer) WebAddressItems(ctx context.Context, in *order.TypeRequest) (*order.Response, error) {
l := logic.NewWebAddressItemsLogic(ctx, s.svcCtx)
return l.WebAddressItems(in)
}
func (s *OrderServer) WebCart(ctx context.Context, in *order.CartRequest) (*order.Response, error) {
l := logic.NewWebCartLogic(ctx, s.svcCtx)
return l.WebCart(in)
}
func (s *OrderServer) WebCartEdit(ctx context.Context, in *order.EditCartRequest) (*order.Response, error) {
l := logic.NewWebCartEditLogic(ctx, s.svcCtx)
return l.WebCartEdit(in)
}
func (s *OrderServer) WebSaleItems(ctx context.Context, in *order.WebSaleItemsRequest) (*order.Response, error) {
l := logic.NewWebSaleItemsLogic(ctx, s.svcCtx)
return l.WebSaleItems(in)
}
func (s *OrderServer) WebStoreItems(ctx context.Context, in *order.WebStoreItemsRequest) (*order.Response, error) {
l := logic.NewWebStoreItemsLogic(ctx, s.svcCtx)
return l.WebStoreItems(in)
}