| | |
| | | for (PointsMerchandise merchandise : merchandises) { |
| | | IntegralCommodity integralCommodity = new IntegralCommodity(); |
| | | integralCommodity.setCommodityId(merchandise.getId()); |
| | | String[] split = merchandise.getProductImages().split(","); |
| | | integralCommodity.setCommodityImg(split[0]); |
| | | integralCommodity.setCommodityImg(merchandise.getCover()); |
| | | integralCommodity.setCommodityName(merchandise.getName()); |
| | | integralCommodity.setCommodityPrice(merchandise.getPrice()); |
| | | integralCommodity.setGoodsType(merchandise.getType()); |
| | |
| | | |
| | | list = pmdsService.list(new QueryWrapper<PointsMerchandise>() |
| | | .eq("state", 1) |
| | | .eq("shelves",1)); |
| | | .eq("shelves",1).le("startTime",new Date()).ge("endTime",new Date())); |
| | | if (list.size() > 0 ){ |
| | | Iterator<PointsMerchandise> iterator = list.iterator(); |
| | | while (iterator.hasNext()) { |
| | | PointsMerchandise merchandise = iterator.next(); |
| | | if (merchandise.getUseScope() == 2 && (!Objects.equals(merchandise.getCityCode(), cityCode) && !Objects.equals(merchandise.getProvinceCode(), provinceCode))) { |
| | | if (merchandise.getUseScope() == 2 && (!cityCode.equals(merchandise.getCityCode()) || !provinceCode.equals(merchandise.getProvinceCode()))) { |
| | | iterator.remove(); // 移除符合条件的商品 |
| | | } |
| | | } |
| | |
| | | detailsVo.setGoodId(merchandise.getId()); |
| | | List<String> list2 = new ArrayList<>(); |
| | | String cover = merchandise.getCover(); |
| | | list2.add(cover); |
| | | list2.addAll(Arrays.asList(StrUtils.splitStr2StrArr(merchandise.getProductImages(), ","))); |
| | | detailsVo.setPics(list2); |
| | | Collections.sort(detailsVo.getPics(), (s1, s2) -> { |