122 lines
3.7 KiB
Go
122 lines
3.7 KiB
Go
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
"git.apinb.com/bsm-ec/mall/internal/logic/product"
|
|
pb "git.apinb.com/bsm-ec/mall/pb"
|
|
)
|
|
|
|
type ProductServer struct {
|
|
pb.UnimplementedProductServer
|
|
}
|
|
|
|
func NewProductServer() *ProductServer {
|
|
return &ProductServer{}
|
|
}
|
|
|
|
// 获取产品列表
|
|
func (s *ProductServer) ItemFetch(ctx context.Context, in *pb.FetchRequest) (*pb.ListReply, error) {
|
|
return product.ItemFetch(ctx, in)
|
|
}
|
|
|
|
// 获取产品详情
|
|
func (s *ProductServer) ItemDetail(ctx context.Context, in *pb.IdentRequest) (*pb.ProductItem, error) {
|
|
return product.ItemDetail(ctx, in)
|
|
}
|
|
|
|
// 通过产品序列获取产品详情
|
|
func (s *ProductServer) ItemDetailBySerial(ctx context.Context, in *pb.StoreSerialRequest) (*pb.ListReply, error) {
|
|
return product.ItemDetailBySerial(ctx, in)
|
|
}
|
|
|
|
// 通过规格编号获取产品详情
|
|
func (s *ProductServer) ItemDetailBySpec(ctx context.Context, in *pb.DetailBySpecRequest) (*pb.ListItem, error) {
|
|
return product.ItemDetailBySpec(ctx, in)
|
|
}
|
|
|
|
// 添加产品
|
|
func (s *ProductServer) ItemCreate(ctx context.Context, in *pb.ProductItem) (*pb.StatusReply, error) {
|
|
return product.ItemCreate(ctx, in)
|
|
}
|
|
|
|
// 删除产品
|
|
func (s *ProductServer) ItemDelete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
return product.ItemDelete(ctx, in)
|
|
}
|
|
|
|
// 发布/取消发布 产品
|
|
func (s *ProductServer) ItemModify(ctx context.Context, in *pb.ModifyRequest) (*pb.StatusReply, error) {
|
|
return product.ItemModify(ctx, in)
|
|
}
|
|
|
|
// 批量操作
|
|
func (s *ProductServer) ItemBatchOp(ctx context.Context, in *pb.OpRequest) (*pb.StatusReply, error) {
|
|
return product.ItemBatchOp(ctx, in)
|
|
}
|
|
|
|
// 产品规格列表
|
|
func (s *ProductServer) SpecFetch(ctx context.Context, in *pb.FetchRequest) (*pb.SpecReply, error) {
|
|
return product.SpecFetch(ctx, in)
|
|
}
|
|
|
|
// 添加产品规格
|
|
func (s *ProductServer) SpecCreate(ctx context.Context, in *pb.SpecItem) (*pb.StatusReply, error) {
|
|
return product.SpecCreate(ctx, in)
|
|
}
|
|
|
|
// 修改产品规格
|
|
func (s *ProductServer) SpecModify(ctx context.Context, in *pb.SpecItem) (*pb.StatusReply, error) {
|
|
return product.SpecModify(ctx, in)
|
|
}
|
|
|
|
// 删除产品规格
|
|
func (s *ProductServer) SpecDelete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
return product.SpecDelete(ctx, in)
|
|
}
|
|
|
|
// 产品详情
|
|
func (s *ProductServer) SpecDetail(ctx context.Context, in *pb.IdentRequest) (*pb.SpecItem, error) {
|
|
return product.SpecDetail(ctx, in)
|
|
}
|
|
|
|
// 添加产品图片
|
|
func (s *ProductServer) PhotoCreate(ctx context.Context, in *pb.PhotoItem) (*pb.StatusReply, error) {
|
|
return product.PhotoCreate(ctx, in)
|
|
}
|
|
|
|
// 删除产品图片
|
|
func (s *ProductServer) PhotoDelete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
return product.PhotoDelete(ctx, in)
|
|
}
|
|
|
|
// 产品图片列表
|
|
func (s *ProductServer) PhotoList(ctx context.Context, in *pb.PhotoItem) (*pb.PhotoReply, error) {
|
|
return product.PhotoList(ctx, in)
|
|
}
|
|
|
|
// 产品的评论列表
|
|
func (s *ProductServer) CommentFetch(ctx context.Context, in *pb.FetchRequest) (*pb.CommentListReply, error) {
|
|
return product.CommentFetch(ctx, in)
|
|
}
|
|
|
|
// 评论
|
|
func (s *ProductServer) CommentCreate(ctx context.Context, in *pb.CommentItem) (*pb.StatusReply, error) {
|
|
return product.CommentCreate(ctx, in)
|
|
}
|
|
|
|
// 回复评论
|
|
func (s *ProductServer) CommentRe(ctx context.Context, in *pb.CommentItem) (*pb.StatusReply, error) {
|
|
return product.CommentRe(ctx, in)
|
|
}
|
|
|
|
// 删除评论
|
|
func (s *ProductServer) CommentDelete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
return product.CommentDelete(ctx, in)
|
|
}
|
|
|
|
// 修改评论
|
|
func (s *ProductServer) CommentModify(ctx context.Context, in *pb.CommentItem) (*pb.StatusReply, error) {
|
|
return product.CommentModify(ctx, in)
|
|
}
|