fix: 热销分组内容为空报错修复
This commit is contained in:
@@ -257,7 +257,12 @@ public class ProductService {
|
||||
//热销
|
||||
TbProductGroup hot = new TbProductGroup();
|
||||
hot.setName("热销");
|
||||
List<TbProduct> hots = tbProductMapper.selectHot(shopId,proSets);
|
||||
List<TbProduct> hots = null;
|
||||
if (proSets.isEmpty()) {
|
||||
hots = new ArrayList<>();
|
||||
}else {
|
||||
hots = tbProductMapper.selectHot(shopId,proSets);
|
||||
}
|
||||
hot.setProducts(handleDate(hots,true,1,false, shopInfo));
|
||||
groupList.add(0, hot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user