| | |
| | | detail.setTitle(TaoLiJinDetailTypeEnum.add.getDesc());
|
| | | detail.setType(TaoLiJinDetailTypeEnum.add);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRemark("新人红包");
|
| | | userTaoLiJinDetailService.insertSelective(detail);
|
| | |
|
| | |
|
| | |
| | |
|
| | | // 验证是否有券
|
| | | if (goods == null || goods.getCouponAmount() == null ||
|
| | | goods.getCouponAmount().compareTo(new BigDecimal(0)) == 0) {
|
| | | goods.getCouponAmount().compareTo(new BigDecimal(0)) <= 0) {
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | tljFreeBuyGoodsService.deleteByGoodsId(goods.getId());
|
| | | tljFreeBuyGoodsService.deleteByGoodsId(goods.getAuctionId());
|
| | | }
|
| | | });
|
| | | throw new UserTaoLiJinNewbiesException(1, "该商品非免单商品");
|
| | |
| | |
|
| | | // 验证券后价 是否在 1-2元
|
| | | BigDecimal money = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | if (money.compareTo(new BigDecimal(1.0)) < 0 && money.compareTo(new BigDecimal(2.0)) > 0) {
|
| | | if (money.compareTo(new BigDecimal(1.0)) < 0 || money.compareTo(new BigDecimal(2.0)) > 0) {
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | tljFreeBuyGoodsService.deleteByGoodsId(goods.getId());
|
| | | tljFreeBuyGoodsService.deleteByGoodsId(goods.getAuctionId());
|
| | | }
|
| | | });
|
| | | throw new UserTaoLiJinNewbiesException(1, "该商品非免单商品");
|
| | |
| | | detail.setTitle(TaoLiJinDetailTypeEnum.reduce.getDesc());
|
| | | detail.setType(TaoLiJinDetailTypeEnum.reduce);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRemark("新人免单使用红包");
|
| | | userTaoLiJinDetailService.insertSelective(detail);
|
| | |
|
| | | // 创建淘礼金链接
|