From c573834c796cc77057455ef0b3d8d0412f9792b9 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 14 二月 2019 14:51:48 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java index 9666c7a..0286b5a 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsController.java @@ -75,6 +75,8 @@ boolean isNative = false; String pid = null; + boolean specialConvert = false; + String specialId = null; // 鏌ヨ鐢ㄦ埛ID鏄惁缁戝畾浜嗕細鍛樿繍钀D UserExtraTaoBaoInfo userInfo = userExtraTaoBaoInfoService.getByUid(uid); @@ -86,6 +88,7 @@ TaoBaoGoodsBrief goods = TaoKeApiUtil.getSimpleGoodsInfo(auctionId); if (goods.getMaterialLibType() != null && goods.getMaterialLibType() == 1) { isNative = true; + specialConvert = true; } else isNative = false; } catch (TaobaoGoodsDownException e) { @@ -99,16 +102,25 @@ 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 = null; - if (!StringUtil.isNullOrEmpty(specialId)) { + if (!StringUtil.isNullOrEmpty(specialId) && specialConvert) { taoBaoLink = shareGoodsService.getTaoBaoLinkForBuyWithSpecial(uid, specialId, auctionId); } else { - taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType); + if (!specialConvert && !isNative) { + if (pidType == PidUser.TYPE_FANLI_ANDROID) + taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId, + tbPidService.getAndroidDefault().getPid()); + else + taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId, + tbPidService.getIOSDefault().getPid()); + } else + taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType); } JSONObject link = new JSONObject(); @@ -133,6 +145,8 @@ tbPid = tbPidService.getTBPid(uid, PidUser.TYPE_FANLI_IOS); } + data.put("native", isNative); + if (tbPid != null) { String siteId = tbPid.getPid().split("_")[2]; String adzoneId = tbPid.getPid().split("_")[3]; @@ -145,7 +159,6 @@ out.print(JsonUtil.loadFalseResult(1, "璇锋眰澶辫触")); } } - data.put("native", isNative); } -- Gitblit v1.8.0