This commit is contained in:
laodaming 2023-10-20 11:12:08 +08:00
parent 4aaf1a1587
commit 6253acf53c

View File

@ -60,6 +60,10 @@ func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRec
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get recommend product list")
}
//超过了截取
if len(recommendProductList) > int(req.Num) {
recommendProductList = recommendProductList[:req.Num]
}
}
//资源id集合
resourceIds := make([]string, 0, 50)