yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -3,6 +3,7 @@
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
@@ -412,7 +413,7 @@
      // 推广红包
      if (from != null && from.equals("taolijin")) {
         // 计算推广红包
         String warningRate = configTaoLiJinService.getValueByKey("warning_value");
         String warningRate = configTaoLiJinService.getValueByKey("warning_value", new Date());
         BigDecimal spreadMoney = TaoLiJinUtil.getSpreadMoney(warningRate, goods);
         // 推广红包 不能小于1
@@ -421,8 +422,8 @@
            return;
         }
         // 是否为新用户
         boolean isNewUser = userInfoExtraService.isNewUser(uid);
         // 取消新用户自购
         boolean isNewUser = false;// userInfoExtraService.isNewUser(uid);
         if (isNewUser) {
            // 判定为老用户: 新人只要使用了新人红包,也就是那1块钱,那么,他看到的分享爆款中的商品-就只能分享。
            long countRecord = userTaoLiJinRecordService.countRecordByUid(uid);
@@ -466,6 +467,11 @@
         otherInfo.setSpreadHongBao(spreadHongBao);
         goodsDetail.setOtherInfo(otherInfo);
         goodsDetail.getMoneyInfo().setFanliMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods,
               hongBaoManageService.getTLJShareRate(System.currentTimeMillis())));
         goodsDetail.getMoneyInfo().setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods,
               hongBaoManageService.getTLJShareRate(System.currentTimeMillis())));
         // 用户淘礼金
         UserMoneyExtra userMoneyExtra = userMoneyExtraService.selectByPrimaryKey(uid);
         if (userMoneyExtra == null || userMoneyExtra.getTlj() == null) {
@@ -473,7 +479,7 @@
         } else {
            extraVO.setUserTLJ(userMoneyExtra.getTlj().setScale(2).toString());
         }
         helpLink = configTaoLiJinService.getValueByKey("share_goods_help_link");
         helpLink = configTaoLiJinService.getValueByKey("share_goods_help_link", new Date());
      } else if (from != null && from.equals("taolijin_buy")) {
         // 查询分享库
@@ -720,7 +726,7 @@
      if (couponInfo != null) {
         convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_COUPON + "", null);
         if (convertUrl != null)
            couponInfo.setLink(convertUrl.getShortUrl());
            couponInfo.setLink(convertUrl.getUrl());
      }
      ShopInfoVO shopInfo = goodsDetail.getShopInfo();
@@ -808,7 +814,7 @@
      extraVO.setShare(shareInfoVO);
      if (convertUrl != null) {
         extraVO.setCouponJumpLink(convertUrl.getShortUrl());
         extraVO.setCouponJumpLink(convertUrl.getUrl());
         extraVO.setNativeCouponJumpLink(PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
      }
@@ -937,9 +943,7 @@
         try {
            goodsList = TaoKeApiUtil.getBatchGoodsInfo(ids);
         } catch (TaoKeApiException e1) {
            e1.printStackTrace();
         } catch (TaobaoGoodsDownException e1) {
            e1.printStackTrace();
         }
         if (goodsList != null && goodsList.size() > 0) {
@@ -1081,7 +1085,7 @@
      PDDPromotionUrl convertUrl = PinDuoDuoApiUtil.convert(id, PinDuoDuoApiUtil.PID_FANLI + "", uid + "");
      JSONObject data = new JSONObject();
      data.put("native", true);
      data.put("jumpLink", convertUrl.getShortUrl());
      data.put("jumpLink", convertUrl.getUrl());
      data.put("nativeJumpLink", PinDuoDuoUtil.getAndroidNativeURI(convertUrl.getUrl()));
      out.print(JsonUtil.loadTrueResult(data));
   }