yujian
2019-07-11 67443feab8afa7171b31b8ccac94440e52b98f98
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/ShareGoodsServiceImpl.java
@@ -667,7 +667,8 @@
   }
   @Override
   public TaoBaoLink getTaoLiJinLinkForBuy(Long uid, String specialId, Long auctionId) throws ShareGoodsException {
   public TaoBaoLink getTaoLiJinLinkForBuy(Long uid, String specialId, Long auctionId, String pid)
         throws ShareGoodsException {
      if (uid == null || uid <= 0) {
         throw new ShareGoodsException(1, "用户ID不能为空");
      }
@@ -685,7 +686,10 @@
      TaoKeAppInfo app = new TaoKeAppInfo();
      app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY);
      app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
      app.setPid(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT);
      if (pid == null)
         app.setPid(TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT);
      else
         app.setPid(pid);
      TaoBaoGoodsBrief goods = TaoKeApiUtil.specialConvertCoupon(auctionId, app);
      if (goods == null) {
         throw new ShareGoodsException(1, "");
@@ -799,7 +803,7 @@
      boolean canBuy = userTLJBuyHistoryService.canBuy(uid, auctionId);
      if (!canBuy) {
         throw new ShareGoodsException(3, "同一商品每日只能领取三次");
         throw new ShareGoodsException(3, "立减红包已抢光,请稍后再试");
      }
      long currentTime = System.currentTimeMillis();
@@ -819,6 +823,7 @@
         taoLiJinDTO = TaoKeApiUtil.createTaoLiJin(auctionId, "自购立减", perface, 1, new Date(currentTime), sendEndTime,
               new Date(currentTime), sendEndTime, app);
      } catch (TaoKeApiException e) {
         LogHelper.errorDetailInfo(e, e.getMessage(), null);
         throw new ShareGoodsException(5, "生成推广链接失败");
      }
      if (taoLiJinDTO == null)