fusenapi/product/internal/logic/getproductlistlogic.go
2023-06-01 15:32:28 +08:00

36 lines
743 B
Go

package logic
import (
"context"
"fusenapi/utils/image"
"fusenapi/product/internal/svc"
"fusenapi/product/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type GetProductListLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewGetProductListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProductListLogic {
return &GetProductListLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
// 获取产品列表
func (l *GetProductListLogic) GetProductList(req *types.GetProductListReq) (resp *types.Response, err error) {
//获取合适尺寸
if req.Size > 0 {
req.Size = image.GetCurrentSize(req.Size)
}
//获取是否存在千人千面
return
}