yujian
2019-01-29 591b4fc369befea2b0a290cb848d48c71064573c
fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java
@@ -74,12 +74,13 @@
      JSONObject data = new JSONObject();
      boolean isNative = false;
      String pid = null;
      String specialId = null;
      // 查询用户ID是否绑定了会员运营ID
      UserExtraTaoBaoInfo userInfo = userExtraTaoBaoInfoService.getByUid(uid);
      if (userInfo != null && !StringUtil.isNullOrEmpty(userInfo.getSpecialId()) && userInfo.getSpecialValid() != null
            && userInfo.getSpecialValid() == true) {
         specialId = userInfo.getSpecialId();
         // 已经绑定
         try {
            TaoBaoGoodsBrief goods = TaoKeApiUtil.getSimpleGoodsInfo(auctionId);
@@ -97,16 +98,19 @@
      } else {// 尚未绑定
         isNative = true;
      }
      data.put("native", isNative);
      try {
         int pidType = PidUser.TYPE_FANLI_ANDROID;
         if (acceptData.getPlatform().equalsIgnoreCase("ios"))
            pidType = PidUser.TYPE_FANLI_IOS;
         TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType);
         TaoBaoLink taoBaoLink = null;
         if (!StringUtil.isNullOrEmpty(specialId)) {
            taoBaoLink = shareGoodsService.getTaoBaoLinkForBuyWithSpecial(uid, specialId, auctionId);
         } else {
            taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType);
         }
         JSONObject link = new JSONObject();
         link.put("clickUrl", taoBaoLink.getClickUrl());
         link.put("couponUrl", taoBaoLink.getCouponLink());
@@ -115,6 +119,7 @@
         out.print(JsonUtil.loadTrueResult(data));
      } catch (Exception e) {
         isNative = false;
         try {
            monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, 0, 0, "购买淘宝商品转链出错"));
         } catch (Exception e1) {
@@ -140,6 +145,7 @@
            out.print(JsonUtil.loadFalseResult(1, "请求失败"));
         }
      }
      data.put("native", isNative);
   }