admin
2019-08-05 34e65d72e73acab040b68d01ef6b4764b4408624
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -657,7 +657,7 @@
//            Constant.systemCommonConfig.getShareGoodsPagePathPDD(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY),
//            goodsId + "");
      String jumpLink = PinDuoDuoApiUtil.convert(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + "");
      String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + "");
      
      ShareInfoVO shareInfo = new ShareInfoVO();
      shareInfo.setClickUrl(jumpLink);
@@ -712,7 +712,7 @@
      try {
         ShareGoodsRecordDTO shareRecord = userShareGoodsRecordService.addRecordGoodsDetail(uid, goodsId,
               Constant.SOURCE_TYPE_JD);
               Constant.SOURCE_TYPE_PDD);
         shareInfo.setShareId(shareRecord.getRedisKey());
      } catch (Exception e) {
         try {
@@ -732,7 +732,7 @@
            history.setUser(new UserInfo(uid));
            history.setHongbao(shareMoney);
            history.setCreateTime(new Date());
            history.setGoodsType(Constant.SOURCE_TYPE_JD);
            history.setGoodsType(Constant.SOURCE_TYPE_PDD);
            history.setTkCode(null);
            history.setLink(null);
            history.setQuanLink(null);
@@ -940,10 +940,13 @@
         }
      }
      String url = String.format("http://%s%s?uid=%s&id=%s", configService.getH5Host(),
            Constant.systemCommonConfig.getShareGoodsPagePathJD(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY),
            goodsId + "");
      String shortLink = HttpUtil.getShortLink(url);
      String couponUrl = null;
      JDCouponInfo couponInfo = goods.getCouponInfo();
      if (couponInfo != null) {
         couponUrl = couponInfo.getLink();
      }
      String materialId = "https://item.jd.com/" + goodsId + ".html";
      String shortLink = JDApiUtil.convertShortLink(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "", uid+ "");
      String content = shareGoodsTextTemplateService.createContentByTemplateJD(template, uid, goods, shortLink,
            hasCoupon);
@@ -953,7 +956,7 @@
   }
   /**
    * 创建京东分享模板
    * 创建拼多多分享模板
    * 
    * @param uid
    * @param template
@@ -995,11 +998,13 @@
         }
      }
      // 创建h5连接
      String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
            Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY),
            goodsId + "");
      String shortLink = HttpUtil.getShortLink(url);
//      // 创建h5连接
//      String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(),
//            Constant.systemCommonConfig.getShareGoodsPagePath(), AESUtil.encrypt(uid + "", Constant.UIDAESKEY),
//            goodsId + "");
//      String shortLink = HttpUtil.getShortLink(url);
      String shortLink = PinDuoDuoApiUtil.getPromotionUrl(goodsId, PinDuoDuoApiUtil.PID_SHARE + "", uid + "");
      // 创建口令
      String token = PinDuoDuoApiUtil.createGenerate(goodsId);