| | |
| | | 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);
|
| | |
| | | } 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());
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | isNative = false;
|
| | | try {
|
| | | monitorService.addClientAPIMonitor(MonitorFactory.createClientAPI(request, 0, 0, "购买淘宝商品转链出错"));
|
| | | } catch (Exception e1) {
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "请求失败"));
|
| | | }
|
| | | }
|
| | | data.put("native", isNative);
|
| | |
|
| | | }
|
| | |
|