热门状态过滤

This commit is contained in:
donqi 2022-06-30 23:22:05 +08:00
parent 3a5fd299fe
commit cfcdd24c8d
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Controller @Controller
@RequestMapping("/goods/goods") @RequestMapping("/goods/goods")
@ -75,6 +76,7 @@ public class GoodsController extends BaseController {
startPage(); startPage();
List<Goods> list = goodsService.selectByCategoryIds(ids); List<Goods> list = goodsService.selectByCategoryIds(ids);
list = list.stream().filter(x -> x.getStatus() == 0).collect(Collectors.toList());
list.forEach(one -> { list.forEach(one -> {
// 补全商品图片信息 // 补全商品图片信息
List<GoodsImgs> goodsImgs = goodsImgsService.selectByGoodsId(one.getGoodsId()); List<GoodsImgs> goodsImgs = goodsImgsService.selectByGoodsId(one.getGoodsId());