fix
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/format"
|
||||
"fusenapi/utils/image"
|
||||
"fusenapi/utils/s3url_to_s3id"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
@@ -39,10 +38,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
|
||||
if req.Num > 100 || req.Num < 0 {
|
||||
req.Num = 4
|
||||
}
|
||||
if req.Size > 0 {
|
||||
req.Size = int32(image.GetCurrentSize(uint32(req.Size)))
|
||||
}
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOneBySn(l.ctx, req.Sn)
|
||||
productInfo, err := l.svcCtx.AllModels.FsProduct.FindOne(l.ctx, req.ProductId)
|
||||
if err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "detail`s product is not found")
|
||||
|
||||
Reference in New Issue
Block a user