This commit is contained in:
laodaming
2023-07-20 15:43:55 +08:00
parent 4a1655d6fa
commit 20e32ae078
4 changed files with 23 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ package logic
import (
"errors"
"fusenapi/constants"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"fusenapi/utils/format"
@@ -46,7 +47,7 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get detail product info")
}
//随机取产品列表(不包含详情产品)
recommendList, err := l.svcCtx.AllModels.FsProductRecommend.GetIgnoreRandomRecommendProductList(l.ctx, int(req.Num), []int64{productInfo.Id})
recommendList, err := l.svcCtx.AllModels.FsProductRecommend.GetIgnoreRandomRecommendProductList(l.ctx, int(req.Num), int64(constants.PRODUCT_DETAIL_RECOMMEND_CATEGORY), []int64{productInfo.Id})
if err != nil {
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get random recommend list")