| | |
| | | boolean isNative = false;
|
| | | String pid = null;
|
| | |
|
| | | boolean specialConvert = false;
|
| | |
|
| | | String specialId = null;
|
| | | // 查询用户ID是否绑定了会员运营ID
|
| | | UserExtraTaoBaoInfo userInfo = userExtraTaoBaoInfoService.getByUid(uid);
|
| | |
| | | TaoBaoGoodsBrief goods = TaoKeApiUtil.getSimpleGoodsInfo(auctionId);
|
| | | if (goods.getMaterialLibType() != null && goods.getMaterialLibType() == 1) {
|
| | | isNative = true;
|
| | | specialConvert = true;
|
| | | } else
|
| | | isNative = false;
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | |
| | | 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();
|
| | |
| | | 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];
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "请求失败"));
|
| | | }
|
| | | }
|
| | | data.put("native", isNative);
|
| | |
|
| | | }
|
| | |
|