admin
2019-12-06 cd637932a970e7935b17d41568fe89c92775bccc
fanli/src/main/java/com/yeshi/fanli/service/impl/tlj/UserTaoLiJinNewbiesServiceImpl.java
@@ -217,6 +217,7 @@
      detail.setTitle(TaoLiJinDetailTypeEnum.add.getDesc());
      detail.setType(TaoLiJinDetailTypeEnum.add);
      detail.setCreateTime(new Date());
      detail.setRemark("新人红包");
      userTaoLiJinDetailService.insertSelective(detail);
      
      
@@ -252,11 +253,11 @@
      
      // 验证是否有券
      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, "该商品非免单商品");
@@ -264,11 +265,11 @@
      
      // 验证券后价 是否在 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, "该商品非免单商品");
@@ -309,6 +310,7 @@
      detail.setTitle(TaoLiJinDetailTypeEnum.reduce.getDesc());
      detail.setType(TaoLiJinDetailTypeEnum.reduce);
      detail.setCreateTime(new Date());
      detail.setRemark("新人免单使用红包");
      userTaoLiJinDetailService.insertSelective(detail);
      
      // 创建淘礼金链接