'提交daim'

dev-discount
199901012 4 years ago
parent 4eeedb29e7
commit 83e3827db4
  1. 15
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java

@ -7,6 +7,7 @@ import com.hai.common.exception.SysCode;
import com.hai.dao.HighCouponHandselMapper; import com.hai.dao.HighCouponHandselMapper;
import com.hai.dao.HighCouponMapper; import com.hai.dao.HighCouponMapper;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.model.HighCouponCodeModel;
import com.hai.model.HighCouponHandselModel; import com.hai.model.HighCouponHandselModel;
import com.hai.model.HighCouponModel; import com.hai.model.HighCouponModel;
import com.hai.service.*; import com.hai.service.*;
@ -248,8 +249,20 @@ public class HighCouponServiceImpl implements HighCouponService {
BeanUtils.copyProperties(highCoupon, model); BeanUtils.copyProperties(highCoupon, model);
// 查询有效库存 // 查询有效库存
model.setSalesCount(highCouponCodeService.getStockCountByCoupon(highCoupon.getId())); model.setSalesCount(highCouponCodeService.getStockCountByCoupon(highCoupon.getId()));
// 查询赠送卡卷列表 // 查询赠送卡卷列表
model.setHandselCouponList(highCouponHandselService.getHandselListByCoupon(highCoupon.getId())); List<HighCouponHandselModel> coupon = highCouponHandselService.getHandselListByCoupon(highCoupon.getId());
model.setHandselCouponList(coupon);
// 组装赠送卡卷id
List<Long> handselCouponId = new ArrayList<>();
if (coupon.size() > 0) {
for (HighCouponHandsel handsel : coupon) {
handselCouponId.add(handsel.getHandselCouponId());
}
}
model.setHandselCouponId(handselCouponId);
return model; return model;
} }

Loading…
Cancel
Save