185 lines
8.4 KiB
Go
185 lines
8.4 KiB
Go
|
|
// Code generated by goctl. DO NOT EDIT.
|
||
|
|
// goctl 1.9.2
|
||
|
|
// Source: inventory.proto
|
||
|
|
|
||
|
|
package inventoryservice
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
|
||
|
|
"muyu-apiserver/rpc/inventory/pb"
|
||
|
|
|
||
|
|
"github.com/zeromicro/go-zero/zrpc"
|
||
|
|
"google.golang.org/grpc"
|
||
|
|
)
|
||
|
|
|
||
|
|
type (
|
||
|
|
ApproveStockAdjustReq = pb.ApproveStockAdjustReq
|
||
|
|
ConfirmStockCheckReq = pb.ConfirmStockCheckReq
|
||
|
|
CreateProductReq = pb.CreateProductReq
|
||
|
|
CreateStockAdjustReq = pb.CreateStockAdjustReq
|
||
|
|
CreateStockCheckReq = pb.CreateStockCheckReq
|
||
|
|
DeleteProductReq = pb.DeleteProductReq
|
||
|
|
Empty = pb.Empty
|
||
|
|
GetProductReq = pb.GetProductReq
|
||
|
|
GetStockAdjustReq = pb.GetStockAdjustReq
|
||
|
|
GetStockCheckReq = pb.GetStockCheckReq
|
||
|
|
IdResp = pb.IdResp
|
||
|
|
ImportLogInfo = pb.ImportLogInfo
|
||
|
|
ImportProductReq = pb.ImportProductReq
|
||
|
|
ImportProductResp = pb.ImportProductResp
|
||
|
|
ListImportLogReq = pb.ListImportLogReq
|
||
|
|
ListImportLogResp = pb.ListImportLogResp
|
||
|
|
ListProductReq = pb.ListProductReq
|
||
|
|
ListProductResp = pb.ListProductResp
|
||
|
|
ListStockAdjustReq = pb.ListStockAdjustReq
|
||
|
|
ListStockAdjustResp = pb.ListStockAdjustResp
|
||
|
|
ListStockCheckReq = pb.ListStockCheckReq
|
||
|
|
ListStockCheckResp = pb.ListStockCheckResp
|
||
|
|
ProductInfo = pb.ProductInfo
|
||
|
|
StockAdjustDetailInfo = pb.StockAdjustDetailInfo
|
||
|
|
StockAdjustDetailReq = pb.StockAdjustDetailReq
|
||
|
|
StockAdjustInfo = pb.StockAdjustInfo
|
||
|
|
StockCheckDetailInfo = pb.StockCheckDetailInfo
|
||
|
|
StockCheckDetailReq = pb.StockCheckDetailReq
|
||
|
|
StockCheckInfo = pb.StockCheckInfo
|
||
|
|
StockGroupItem = pb.StockGroupItem
|
||
|
|
StockGroupReq = pb.StockGroupReq
|
||
|
|
StockGroupResp = pb.StockGroupResp
|
||
|
|
StockSummaryReq = pb.StockSummaryReq
|
||
|
|
StockSummaryResp = pb.StockSummaryResp
|
||
|
|
UpdateProductReq = pb.UpdateProductReq
|
||
|
|
UpdateStockCheckReq = pb.UpdateStockCheckReq
|
||
|
|
|
||
|
|
InventoryService interface {
|
||
|
|
// Product
|
||
|
|
CreateProduct(ctx context.Context, in *CreateProductReq, opts ...grpc.CallOption) (*IdResp, error)
|
||
|
|
UpdateProduct(ctx context.Context, in *UpdateProductReq, opts ...grpc.CallOption) (*Empty, error)
|
||
|
|
DeleteProduct(ctx context.Context, in *DeleteProductReq, opts ...grpc.CallOption) (*Empty, error)
|
||
|
|
GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductInfo, error)
|
||
|
|
ListProduct(ctx context.Context, in *ListProductReq, opts ...grpc.CallOption) (*ListProductResp, error)
|
||
|
|
// Import
|
||
|
|
ImportProducts(ctx context.Context, in *ImportProductReq, opts ...grpc.CallOption) (*ImportProductResp, error)
|
||
|
|
ListImportLog(ctx context.Context, in *ListImportLogReq, opts ...grpc.CallOption) (*ListImportLogResp, error)
|
||
|
|
// Stock Statistics
|
||
|
|
GetStockSummary(ctx context.Context, in *StockSummaryReq, opts ...grpc.CallOption) (*StockSummaryResp, error)
|
||
|
|
GetStockGroup(ctx context.Context, in *StockGroupReq, opts ...grpc.CallOption) (*StockGroupResp, error)
|
||
|
|
// Stock Check
|
||
|
|
CreateStockCheck(ctx context.Context, in *CreateStockCheckReq, opts ...grpc.CallOption) (*IdResp, error)
|
||
|
|
UpdateStockCheck(ctx context.Context, in *UpdateStockCheckReq, opts ...grpc.CallOption) (*Empty, error)
|
||
|
|
ConfirmStockCheck(ctx context.Context, in *ConfirmStockCheckReq, opts ...grpc.CallOption) (*Empty, error)
|
||
|
|
GetStockCheck(ctx context.Context, in *GetStockCheckReq, opts ...grpc.CallOption) (*StockCheckInfo, error)
|
||
|
|
ListStockCheck(ctx context.Context, in *ListStockCheckReq, opts ...grpc.CallOption) (*ListStockCheckResp, error)
|
||
|
|
// Stock Adjust
|
||
|
|
CreateStockAdjust(ctx context.Context, in *CreateStockAdjustReq, opts ...grpc.CallOption) (*IdResp, error)
|
||
|
|
ApproveStockAdjust(ctx context.Context, in *ApproveStockAdjustReq, opts ...grpc.CallOption) (*Empty, error)
|
||
|
|
GetStockAdjust(ctx context.Context, in *GetStockAdjustReq, opts ...grpc.CallOption) (*StockAdjustInfo, error)
|
||
|
|
ListStockAdjust(ctx context.Context, in *ListStockAdjustReq, opts ...grpc.CallOption) (*ListStockAdjustResp, error)
|
||
|
|
}
|
||
|
|
|
||
|
|
defaultInventoryService struct {
|
||
|
|
cli zrpc.Client
|
||
|
|
}
|
||
|
|
)
|
||
|
|
|
||
|
|
func NewInventoryService(cli zrpc.Client) InventoryService {
|
||
|
|
return &defaultInventoryService{
|
||
|
|
cli: cli,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// Product
|
||
|
|
func (m *defaultInventoryService) CreateProduct(ctx context.Context, in *CreateProductReq, opts ...grpc.CallOption) (*IdResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.CreateProduct(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) UpdateProduct(ctx context.Context, in *UpdateProductReq, opts ...grpc.CallOption) (*Empty, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.UpdateProduct(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) DeleteProduct(ctx context.Context, in *DeleteProductReq, opts ...grpc.CallOption) (*Empty, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.DeleteProduct(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) GetProduct(ctx context.Context, in *GetProductReq, opts ...grpc.CallOption) (*ProductInfo, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.GetProduct(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ListProduct(ctx context.Context, in *ListProductReq, opts ...grpc.CallOption) (*ListProductResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ListProduct(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Import
|
||
|
|
func (m *defaultInventoryService) ImportProducts(ctx context.Context, in *ImportProductReq, opts ...grpc.CallOption) (*ImportProductResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ImportProducts(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ListImportLog(ctx context.Context, in *ListImportLogReq, opts ...grpc.CallOption) (*ListImportLogResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ListImportLog(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Stock Statistics
|
||
|
|
func (m *defaultInventoryService) GetStockSummary(ctx context.Context, in *StockSummaryReq, opts ...grpc.CallOption) (*StockSummaryResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.GetStockSummary(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) GetStockGroup(ctx context.Context, in *StockGroupReq, opts ...grpc.CallOption) (*StockGroupResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.GetStockGroup(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Stock Check
|
||
|
|
func (m *defaultInventoryService) CreateStockCheck(ctx context.Context, in *CreateStockCheckReq, opts ...grpc.CallOption) (*IdResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.CreateStockCheck(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) UpdateStockCheck(ctx context.Context, in *UpdateStockCheckReq, opts ...grpc.CallOption) (*Empty, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.UpdateStockCheck(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ConfirmStockCheck(ctx context.Context, in *ConfirmStockCheckReq, opts ...grpc.CallOption) (*Empty, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ConfirmStockCheck(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) GetStockCheck(ctx context.Context, in *GetStockCheckReq, opts ...grpc.CallOption) (*StockCheckInfo, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.GetStockCheck(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ListStockCheck(ctx context.Context, in *ListStockCheckReq, opts ...grpc.CallOption) (*ListStockCheckResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ListStockCheck(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
// Stock Adjust
|
||
|
|
func (m *defaultInventoryService) CreateStockAdjust(ctx context.Context, in *CreateStockAdjustReq, opts ...grpc.CallOption) (*IdResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.CreateStockAdjust(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ApproveStockAdjust(ctx context.Context, in *ApproveStockAdjustReq, opts ...grpc.CallOption) (*Empty, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ApproveStockAdjust(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) GetStockAdjust(ctx context.Context, in *GetStockAdjustReq, opts ...grpc.CallOption) (*StockAdjustInfo, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.GetStockAdjust(ctx, in, opts...)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *defaultInventoryService) ListStockAdjust(ctx context.Context, in *ListStockAdjustReq, opts ...grpc.CallOption) (*ListStockAdjustResp, error) {
|
||
|
|
client := pb.NewInventoryServiceClient(m.cli.Conn())
|
||
|
|
return client.ListStockAdjust(ctx, in, opts...)
|
||
|
|
}
|