// Code generated by goctl. DO NOT EDIT. // goctl 1.9.2 // Source: inventory.proto package server import ( "context" "muyu-apiserver/rpc/inventory/internal/logic" "muyu-apiserver/rpc/inventory/internal/svc" "muyu-apiserver/rpc/inventory/pb" ) type InventoryServiceServer struct { svcCtx *svc.ServiceContext pb.UnimplementedInventoryServiceServer } func NewInventoryServiceServer(svcCtx *svc.ServiceContext) *InventoryServiceServer { return &InventoryServiceServer{ svcCtx: svcCtx, } } // Product CRUD func (s *InventoryServiceServer) CreateProduct(ctx context.Context, in *pb.CreateProductReq) (*pb.IdResp, error) { l := logic.NewCreateProductLogic(ctx, s.svcCtx) return l.CreateProduct(in) } func (s *InventoryServiceServer) UpdateProduct(ctx context.Context, in *pb.UpdateProductReq) (*pb.Empty, error) { l := logic.NewUpdateProductLogic(ctx, s.svcCtx) return l.UpdateProduct(in) } func (s *InventoryServiceServer) DeleteProduct(ctx context.Context, in *pb.DeleteProductReq) (*pb.Empty, error) { l := logic.NewDeleteProductLogic(ctx, s.svcCtx) return l.DeleteProduct(in) } func (s *InventoryServiceServer) GetProduct(ctx context.Context, in *pb.GetProductReq) (*pb.ProductInfo, error) { l := logic.NewGetProductLogic(ctx, s.svcCtx) return l.GetProduct(in) } func (s *InventoryServiceServer) ListProduct(ctx context.Context, in *pb.ListProductReq) (*pb.ListProductResp, error) { l := logic.NewListProductLogic(ctx, s.svcCtx) return l.ListProduct(in) } // Product Tree (panel 3) func (s *InventoryServiceServer) GetProductTree(ctx context.Context, in *pb.GetProductReq) (*pb.ProductTreeResp, error) { l := logic.NewGetProductTreeLogic(ctx, s.svcCtx) return l.GetProductTree(in) } // Product Summary (panel 1) func (s *InventoryServiceServer) ListProductSummary(ctx context.Context, in *pb.ListProductSummaryReq) (*pb.ListProductSummaryResp, error) { l := logic.NewListProductSummaryLogic(ctx, s.svcCtx) return l.ListProductSummary(in) } // Color Detail (panel 2) func (s *InventoryServiceServer) ListColorDetail(ctx context.Context, in *pb.ListColorDetailReq) (*pb.ListColorDetailResp, error) { l := logic.NewListColorDetailLogic(ctx, s.svcCtx) return l.ListColorDetail(in) } // Yarn CRUD func (s *InventoryServiceServer) CreateYarn(ctx context.Context, in *pb.CreateYarnReq) (*pb.IdResp, error) { l := logic.NewCreateYarnLogic(ctx, s.svcCtx) return l.CreateYarn(in) } func (s *InventoryServiceServer) UpdateYarn(ctx context.Context, in *pb.UpdateYarnReq) (*pb.Empty, error) { l := logic.NewUpdateYarnLogic(ctx, s.svcCtx) return l.UpdateYarn(in) } func (s *InventoryServiceServer) DeleteYarn(ctx context.Context, in *pb.DeleteYarnReq) (*pb.Empty, error) { l := logic.NewDeleteYarnLogic(ctx, s.svcCtx) return l.DeleteYarn(in) } func (s *InventoryServiceServer) GetYarn(ctx context.Context, in *pb.GetYarnReq) (*pb.YarnInfo, error) { l := logic.NewGetYarnLogic(ctx, s.svcCtx) return l.GetYarn(in) } func (s *InventoryServiceServer) ListYarn(ctx context.Context, in *pb.ListYarnReq) (*pb.ListYarnResp, error) { l := logic.NewListYarnLogic(ctx, s.svcCtx) return l.ListYarn(in) } // Product Batch CRUD func (s *InventoryServiceServer) CreateProductBatch(ctx context.Context, in *pb.CreateProductBatchReq) (*pb.IdResp, error) { l := logic.NewCreateProductBatchLogic(ctx, s.svcCtx) return l.CreateProductBatch(in) } func (s *InventoryServiceServer) UpdateProductBatch(ctx context.Context, in *pb.UpdateProductBatchReq) (*pb.Empty, error) { l := logic.NewUpdateProductBatchLogic(ctx, s.svcCtx) return l.UpdateProductBatch(in) } func (s *InventoryServiceServer) DeleteProductBatch(ctx context.Context, in *pb.DeleteProductBatchReq) (*pb.Empty, error) { l := logic.NewDeleteProductBatchLogic(ctx, s.svcCtx) return l.DeleteProductBatch(in) } func (s *InventoryServiceServer) ListProductBatch(ctx context.Context, in *pb.ListProductBatchReq) (*pb.ListProductBatchResp, error) { l := logic.NewListProductBatchLogic(ctx, s.svcCtx) return l.ListProductBatch(in) } // Pan / Bolt list views func (s *InventoryServiceServer) ListPanView(ctx context.Context, in *pb.ListPanViewReq) (*pb.ListPanViewResp, error) { l := logic.NewListPanViewLogic(ctx, s.svcCtx) return l.ListPanView(in) } func (s *InventoryServiceServer) ListBoltView(ctx context.Context, in *pb.ListBoltViewReq) (*pb.ListBoltViewResp, error) { l := logic.NewListBoltViewLogic(ctx, s.svcCtx) return l.ListBoltView(in) } // Pan CRUD func (s *InventoryServiceServer) ListPans(ctx context.Context, in *pb.ListPanReq) (*pb.ListPanResp, error) { l := logic.NewListPansLogic(ctx, s.svcCtx) return l.ListPans(in) } func (s *InventoryServiceServer) SavePans(ctx context.Context, in *pb.SavePansReq) (*pb.Empty, error) { l := logic.NewSavePansLogic(ctx, s.svcCtx) return l.SavePans(in) } // Bolt CRUD func (s *InventoryServiceServer) ListBolts(ctx context.Context, in *pb.ListBoltReq) (*pb.ListBoltResp, error) { l := logic.NewListBoltsLogic(ctx, s.svcCtx) return l.ListBolts(in) } func (s *InventoryServiceServer) SaveBolts(ctx context.Context, in *pb.SaveBoltsReq) (*pb.Empty, error) { l := logic.NewSaveBoltsLogic(ctx, s.svcCtx) return l.SaveBolts(in) } // Import func (s *InventoryServiceServer) ImportProducts(ctx context.Context, in *pb.ImportProductReq) (*pb.ImportProductResp, error) { l := logic.NewImportProductsLogic(ctx, s.svcCtx) return l.ImportProducts(in) } func (s *InventoryServiceServer) ListImportLog(ctx context.Context, in *pb.ListImportLogReq) (*pb.ListImportLogResp, error) { l := logic.NewListImportLogLogic(ctx, s.svcCtx) return l.ListImportLog(in) } // Stock Statistics func (s *InventoryServiceServer) GetStockSummary(ctx context.Context, in *pb.StockSummaryReq) (*pb.StockSummaryResp, error) { l := logic.NewGetStockSummaryLogic(ctx, s.svcCtx) return l.GetStockSummary(in) } func (s *InventoryServiceServer) GetStockGroup(ctx context.Context, in *pb.StockGroupReq) (*pb.StockGroupResp, error) { l := logic.NewGetStockGroupLogic(ctx, s.svcCtx) return l.GetStockGroup(in) } // Stock Check func (s *InventoryServiceServer) CreateStockCheck(ctx context.Context, in *pb.CreateStockCheckReq) (*pb.IdResp, error) { l := logic.NewCreateStockCheckLogic(ctx, s.svcCtx) return l.CreateStockCheck(in) } func (s *InventoryServiceServer) UpdateStockCheck(ctx context.Context, in *pb.UpdateStockCheckReq) (*pb.Empty, error) { l := logic.NewUpdateStockCheckLogic(ctx, s.svcCtx) return l.UpdateStockCheck(in) } func (s *InventoryServiceServer) ConfirmStockCheck(ctx context.Context, in *pb.ConfirmStockCheckReq) (*pb.Empty, error) { l := logic.NewConfirmStockCheckLogic(ctx, s.svcCtx) return l.ConfirmStockCheck(in) } func (s *InventoryServiceServer) GetStockCheck(ctx context.Context, in *pb.GetStockCheckReq) (*pb.StockCheckInfo, error) { l := logic.NewGetStockCheckLogic(ctx, s.svcCtx) return l.GetStockCheck(in) } func (s *InventoryServiceServer) ListStockCheck(ctx context.Context, in *pb.ListStockCheckReq) (*pb.ListStockCheckResp, error) { l := logic.NewListStockCheckLogic(ctx, s.svcCtx) return l.ListStockCheck(in) } // Stock Adjust func (s *InventoryServiceServer) CreateStockAdjust(ctx context.Context, in *pb.CreateStockAdjustReq) (*pb.IdResp, error) { l := logic.NewCreateStockAdjustLogic(ctx, s.svcCtx) return l.CreateStockAdjust(in) } func (s *InventoryServiceServer) ApproveStockAdjust(ctx context.Context, in *pb.ApproveStockAdjustReq) (*pb.Empty, error) { l := logic.NewApproveStockAdjustLogic(ctx, s.svcCtx) return l.ApproveStockAdjust(in) } func (s *InventoryServiceServer) GetStockAdjust(ctx context.Context, in *pb.GetStockAdjustReq) (*pb.StockAdjustInfo, error) { l := logic.NewGetStockAdjustLogic(ctx, s.svcCtx) return l.GetStockAdjust(in) } func (s *InventoryServiceServer) ListStockAdjust(ctx context.Context, in *pb.ListStockAdjustReq) (*pb.ListStockAdjustResp, error) { l := logic.NewListStockAdjustLogic(ctx, s.svcCtx) return l.ListStockAdjust(in) }