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
120 lines
3.7 KiB
Go
120 lines
3.7 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: product.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/protobuf/types/known/emptypb"
|
|
"lone-services/rpc/product/pb"
|
|
"lone-services/services/product/internal/logic"
|
|
"lone-services/services/product/internal/svc"
|
|
)
|
|
|
|
type ProductServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
product.UnimplementedProductServer
|
|
}
|
|
|
|
func NewProductServer(svcCtx *svc.ServiceContext) *ProductServer {
|
|
return &ProductServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (s *ProductServer) Create(ctx context.Context, in *product.CreateReq) (*product.Response, error) {
|
|
l := logic.NewCreateLogic(ctx, s.svcCtx)
|
|
return l.Create(in)
|
|
}
|
|
|
|
func (s *ProductServer) Info(ctx context.Context, in *product.InfoReq) (*product.Response, error) {
|
|
l := logic.NewInfoLogic(ctx, s.svcCtx)
|
|
return l.Info(in)
|
|
}
|
|
|
|
func (s *ProductServer) Items(ctx context.Context, in *product.ItemsReq) (*product.Response, error) {
|
|
l := logic.NewItemsLogic(ctx, s.svcCtx)
|
|
return l.Items(in)
|
|
}
|
|
|
|
func (s *ProductServer) Names(ctx context.Context, in *product.NamesReq) (*product.Response, error) {
|
|
l := logic.NewNamesLogic(ctx, s.svcCtx)
|
|
return l.Names(in)
|
|
}
|
|
|
|
func (s *ProductServer) Status(ctx context.Context, in *product.StatusReq) (*product.Response, error) {
|
|
l := logic.NewStatusLogic(ctx, s.svcCtx)
|
|
return l.Status(in)
|
|
}
|
|
|
|
func (s *ProductServer) Sort(ctx context.Context, in *product.SortReq) (*product.Response, error) {
|
|
l := logic.NewSortLogic(ctx, s.svcCtx)
|
|
return l.Sort(in)
|
|
}
|
|
|
|
// 审核列表: status: 1: 一审, 2: 二审
|
|
func (s *ProductServer) Verify(ctx context.Context, in *product.VerifyReq) (*product.Response, error) {
|
|
l := logic.NewVerifyLogic(ctx, s.svcCtx)
|
|
return l.Verify(in)
|
|
}
|
|
|
|
// 一审通过/驳回
|
|
func (s *ProductServer) VerifyFirst(ctx context.Context, in *product.VerifyStatusReq) (*product.Response, error) {
|
|
l := logic.NewVerifyFirstLogic(ctx, s.svcCtx)
|
|
return l.VerifyFirst(in)
|
|
}
|
|
|
|
// 二审通过/驳回
|
|
func (s *ProductServer) VerifySecond(ctx context.Context, in *product.VerifyStatusReq) (*product.Response, error) {
|
|
l := logic.NewVerifySecondLogic(ctx, s.svcCtx)
|
|
return l.VerifySecond(in)
|
|
}
|
|
|
|
// 编辑申请
|
|
func (s *ProductServer) EditApply(ctx context.Context, in *product.EditApplyReq) (*product.Response, error) {
|
|
l := logic.NewEditApplyLogic(ctx, s.svcCtx)
|
|
return l.EditApply(in)
|
|
}
|
|
|
|
// 编辑基础信息
|
|
func (s *ProductServer) EditBase(ctx context.Context, in *product.EditBaseReq) (*product.Response, error) {
|
|
l := logic.NewEditBaseLogic(ctx, s.svcCtx)
|
|
return l.EditBase(in)
|
|
}
|
|
|
|
// 编辑敏感信息(进入一审)
|
|
func (s *ProductServer) EditSusceptible(ctx context.Context, in *product.EditSusceptibleReq) (*product.Response, error) {
|
|
l := logic.NewEditSusceptibleLogic(ctx, s.svcCtx)
|
|
return l.EditSusceptible(in)
|
|
}
|
|
|
|
// TODO: 临时接口,企微编辑申请审批对接后删除
|
|
func (s *ProductServer) EditApplyPass(ctx context.Context, in *product.EditApplyPassReq) (*product.Response, error) {
|
|
l := logic.NewEditApplyPassLogic(ctx, s.svcCtx)
|
|
return l.EditApplyPass(in)
|
|
}
|
|
|
|
// 增减库存
|
|
func (s *ProductServer) Number(ctx context.Context, in *product.NumberReq) (*emptypb.Empty, error) {
|
|
l := logic.NewNumberLogic(ctx, s.svcCtx)
|
|
return l.Number(in)
|
|
}
|
|
|
|
func (s *ProductServer) InfoById(ctx context.Context, in *product.InfoByIdReq) (*product.Item, error) {
|
|
l := logic.NewInfoByIdLogic(ctx, s.svcCtx)
|
|
return l.InfoById(in)
|
|
}
|
|
|
|
func (s *ProductServer) ItemsByIds(ctx context.Context, in *product.ItemsByIdsReq) (*product.ItemsByIdsData, error) {
|
|
l := logic.NewItemsByIdsLogic(ctx, s.svcCtx)
|
|
return l.ItemsByIds(in)
|
|
}
|
|
|
|
// 增加库存
|
|
func (s *ProductServer) NumberAdd(ctx context.Context, in *product.NumberAddReq) (*product.Response, error) {
|
|
l := logic.NewNumberAddLogic(ctx, s.svcCtx)
|
|
return l.NumberAdd(in)
|
|
}
|