Files
lone-services/services/product/productClient/product.go
T
zzw 72d55d396d
CI / changes (push) Successful in 36s
CI / docker-bff (push) Successful in 3m8s
CI / docker-product (push) Successful in 3m36s
CI / docker-admin (push) Successful in 3m35s
CI / docker-user (push) Successful in 9s
CI / docker-ad (push) Successful in 29s
CI / docker-chore (push) Failing after 4s
feat: product number
2026-08-26 16:53:50 +08:00

177 lines
7.0 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1
// Source: product.proto
package productClient
import (
"context"
"lone-services/rpc/product/pb"
"google.golang.org/protobuf/types/known/emptypb"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
CreateReq = product.CreateReq
EditApplyPassReq = product.EditApplyPassReq
EditApplyReq = product.EditApplyReq
EditBaseReq = product.EditBaseReq
EditSusceptibleReq = product.EditSusceptibleReq
InfoByIdReq = product.InfoByIdReq
InfoReq = product.InfoReq
Item = product.Item
ItemsByIdsData = product.ItemsByIdsData
ItemsByIdsReq = product.ItemsByIdsReq
ItemsData = product.ItemsData
ItemsReq = product.ItemsReq
NameItem = product.NameItem
NamesReq = product.NamesReq
NumberAddReq = product.NumberAddReq
NumberReq = product.NumberReq
Response = product.Response
SortReq = product.SortReq
StatusReq = product.StatusReq
VerifyItem = product.VerifyItem
VerifyItemsData = product.VerifyItemsData
VerifyParams = product.VerifyParams
VerifyReq = product.VerifyReq
VerifyStatusReq = product.VerifyStatusReq
Product interface {
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error)
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error)
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error)
Names(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*Response, error)
Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error)
Sort(ctx context.Context, in *SortReq, opts ...grpc.CallOption) (*Response, error)
// 审核列表: status: 1: 一审, 2: 二审
Verify(ctx context.Context, in *VerifyReq, opts ...grpc.CallOption) (*Response, error)
// 一审通过/驳回
VerifyFirst(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error)
// 二审通过/驳回
VerifySecond(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error)
// 编辑申请
EditApply(ctx context.Context, in *EditApplyReq, opts ...grpc.CallOption) (*Response, error)
// 编辑基础信息
EditBase(ctx context.Context, in *EditBaseReq, opts ...grpc.CallOption) (*Response, error)
// 编辑敏感信息(进入一审)
EditSusceptible(ctx context.Context, in *EditSusceptibleReq, opts ...grpc.CallOption) (*Response, error)
// TODO: 临时接口,企微编辑申请审批对接后删除
EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error)
// 增减库存
Number(ctx context.Context, in *NumberReq, 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)
// 增加库存
NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error)
}
defaultProduct struct {
cli zrpc.Client
}
)
func NewProduct(cli zrpc.Client) Product {
return &defaultProduct{
cli: cli,
}
}
func (m *defaultProduct) Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Create(ctx, in, opts...)
}
func (m *defaultProduct) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Info(ctx, in, opts...)
}
func (m *defaultProduct) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Items(ctx, in, opts...)
}
func (m *defaultProduct) Names(ctx context.Context, in *NamesReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Names(ctx, in, opts...)
}
func (m *defaultProduct) Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Status(ctx, in, opts...)
}
func (m *defaultProduct) Sort(ctx context.Context, in *SortReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Sort(ctx, in, opts...)
}
// 审核列表: status: 1: 一审, 2: 二审
func (m *defaultProduct) Verify(ctx context.Context, in *VerifyReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Verify(ctx, in, opts...)
}
// 一审通过/驳回
func (m *defaultProduct) VerifyFirst(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.VerifyFirst(ctx, in, opts...)
}
// 二审通过/驳回
func (m *defaultProduct) VerifySecond(ctx context.Context, in *VerifyStatusReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.VerifySecond(ctx, in, opts...)
}
// 编辑申请
func (m *defaultProduct) EditApply(ctx context.Context, in *EditApplyReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.EditApply(ctx, in, opts...)
}
// 编辑基础信息
func (m *defaultProduct) EditBase(ctx context.Context, in *EditBaseReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.EditBase(ctx, in, opts...)
}
// 编辑敏感信息(进入一审)
func (m *defaultProduct) EditSusceptible(ctx context.Context, in *EditSusceptibleReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.EditSusceptible(ctx, in, opts...)
}
// TODO: 临时接口,企微编辑申请审批对接后删除
func (m *defaultProduct) EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.EditApplyPass(ctx, in, opts...)
}
// 增减库存
func (m *defaultProduct) Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*emptypb.Empty, error) {
client := product.NewProductClient(m.cli.Conn())
return client.Number(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...)
}
func (m *defaultProduct) ItemsByIds(ctx context.Context, in *ItemsByIdsReq, opts ...grpc.CallOption) (*ItemsByIdsData, error) {
client := product.NewProductClient(m.cli.Conn())
return client.ItemsByIds(ctx, in, opts...)
}
// 增加库存
func (m *defaultProduct) NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error) {
client := product.NewProductClient(m.cli.Conn())
return client.NumberAdd(ctx, in, opts...)
}