feat: sale manager
This commit is contained in:
@@ -31,6 +31,8 @@ type (
|
||||
NameItem = product.NameItem
|
||||
NamesReq = product.NamesReq
|
||||
NumberAddReq = product.NumberAddReq
|
||||
NumberItem = product.NumberItem
|
||||
NumberItemsReq = product.NumberItemsReq
|
||||
NumberReq = product.NumberReq
|
||||
Response = product.Response
|
||||
SortReq = product.SortReq
|
||||
@@ -64,6 +66,8 @@ type (
|
||||
EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 增减库存
|
||||
Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 批量增减库存(服务内按 id 排序后在同一事务中执行,防死锁)
|
||||
NumberItems(ctx context.Context, in *NumberItemsReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error)
|
||||
ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error)
|
||||
// 增加库存
|
||||
@@ -159,6 +163,12 @@ func (m *defaultProduct) Number(ctx context.Context, in *NumberReq, opts ...grpc
|
||||
return client.Number(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 批量增减库存(服务内按 id 排序后在同一事务中执行,防死锁)
|
||||
func (m *defaultProduct) NumberItems(ctx context.Context, in *NumberItemsReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
client := product.NewProductClient(m.cli.Conn())
|
||||
return client.NumberItems(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultProduct) InfoById(ctx context.Context, in *InfoByIdReq, opts ...grpc.CallOption) (*Item, error) {
|
||||
client := product.NewProductClient(m.cli.Conn())
|
||||
return client.InfoById(ctx, in, opts...)
|
||||
|
||||
Reference in New Issue
Block a user