'提交diam'

dev-discount
199901012 4 years ago
parent d7be7eebe5
commit 85b1139eca
  1. 6
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java

@ -289,7 +289,11 @@ public class HighCouponServiceImpl implements HighCouponService {
List<HighCoupon> coupons = highCouponMapper.selectByExample(example); List<HighCoupon> coupons = highCouponMapper.selectByExample(example);
if (coupons != null && coupons.size() > 0) { if (coupons != null && coupons.size() > 0) {
return JSON.parseArray(JSON.toJSONString(coupons), HighCouponModel.class); List<HighCouponModel> models = JSON.parseArray(JSON.toJSONString(coupons), HighCouponModel.class);
for (HighCouponModel highCouponModel : models) {
highCouponModel.setStockCount(highCouponCodeService.getStockCountByCoupon(highCouponModel.getId()));
}
return models;
} }
return new ArrayList<>(); return new ArrayList<>();
} }

Loading…
Cancel
Save