| | |
| | |
|
| | | List<TLJFreeBuyGoods> list = tljFreeBuyGoodsDao.listByGoodsId(goods.getAuctionId());
|
| | | if (list != null) {
|
| | | |
| | | // 验证是否有券
|
| | | if (goods.getCouponAmount() == null || goods.getCouponAmount().compareTo(new BigDecimal(0)) <= 0) {
|
| | | for (TLJFreeBuyGoods tljGoods : list) {
|
| | | tljFreeBuyGoodsDao.delete(tljGoods.getId());
|
| | | }
|
| | | return;
|
| | | }
|
| | | |
| | | // 计算券后价 1<= n <= 2
|
| | | BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | if (couplePrice.compareTo(new BigDecimal(1.0)) < 0 && couplePrice.compareTo(new BigDecimal(2.0)) > 0) {
|
| | | if (couplePrice.compareTo(new BigDecimal(1.0)) < 0 || couplePrice.compareTo(new BigDecimal(2.0)) > 0) {
|
| | | for (TLJFreeBuyGoods tljGoods : list) {
|
| | | tljFreeBuyGoodsDao.delete(tljGoods.getId());
|
| | | }
|