| | |
| | | for (TCoupon tCoupon : list) { |
| | | couponIds.append(tCoupon.getId()).append(","); |
| | | } |
| | | if (StringUtils.hasLength(couponIds)){ |
| | | // 去除最后一个字符 |
| | | couponIds.deleteCharAt(couponIds.length()-1); |
| | | } |
| | | List<Integer> data = appCouponClient.getCountByCouponIds(couponIds.toString()).getData(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i).setCount(data.get(i)); |
| | | if (!list.isEmpty()){ |
| | | if (StringUtils.hasLength(couponIds)){ |
| | | // 去除最后一个字符 |
| | | couponIds.deleteCharAt(couponIds.length()-1); |
| | | } |
| | | List<Integer> data = appCouponClient.getCountByCouponIds(couponIds.toString()).getData(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | list.get(i).setCount(data.get(i)); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |