| | |
| | | return; |
| | | } |
| | | |
| | | Long auctionId = record.getGoodsId(); |
| | | String auctionId = record.getGoodsId(); |
| | | String tljLink = record.getSendUrl(); |
| | | BigDecimal tljMoney = record.getPerFace(); |
| | | |
| | |
| | | // 查询是否有分享记录 |
| | | UserShareGoodsHistory shareHistory = null; |
| | | try { |
| | | shareHistory = shareGoodsService.getShareGoodsHistoryDetail(Long.parseLong(uid), Long.parseLong(id)); |
| | | shareHistory = shareGoodsService.getShareGoodsHistoryDetail(Long.parseLong(uid), id); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (ShareGoodsException e) { |
| | |
| | | |
| | | if (shareHistory != null) {// 有分享记录 |
| | | token = shareHistory.getTkCode(); |
| | | goods = redisManager.getTaoBaoGoodsTemp(Long.parseLong(id)); |
| | | goods = redisManager.getTaoBaoGoodsTemp(id); |
| | | if (goods == null) |
| | | try { |
| | | goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id)); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (TaobaoGoodsDownException e) { |
| | |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET); |
| | | |
| | | try { |
| | | goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id), app); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id, app); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (TaobaoGoodsDownException e) { |
| | |
| | | app.setAppSecret(configList.get(0).getAppSecret()); |
| | | app.setPid(pid); |
| | | try { |
| | | goods = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id), app); |
| | | goods = TaoKeApiUtil.searchGoodsDetail(id, app); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (TaobaoGoodsDownException e) { |
| | |
| | | url = goods.getCouponLink(); |
| | | } |
| | | if (!url.contains("uland.taobao.com") && !url.contains("s.click.taobao.com")) { |
| | | TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCoupon(Long.parseLong(id), app, null, null); |
| | | TaoBaoGoodsBrief linkInfo = TaoKeApiUtil.specialConvertCouponV2(id, app, null, null); |
| | | url = linkInfo.getCouponLink(); |
| | | if (StringUtil.isNullOrEmpty(url)) |
| | | url = linkInfo.getAuctionUrl(); |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseRecord(Long.parseLong(tempUid), Long.parseLong(id), 1); |
| | | userShareGoodsGroupService.updateBrowseRecord(Long.parseLong(tempUid), id, 1); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } catch (UserShareGoodsRecordException e) { |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getJDGoodsDetail") |
| | | public void getJDGoodsDetail(final AcceptData acceptData, final Long id, String uid, String callback, |
| | | public void getJDGoodsDetail(final AcceptData acceptData, final String id, String uid, String callback, |
| | | PrintWriter out) { |
| | | if (id == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "请上传id")); |
| | |
| | | } |
| | | |
| | | String materialId = "https://item.jd.com/" + id + ".html"; |
| | | String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null, pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_JD, SystemPIDInfo.PidType.share), |
| | | uid); |
| | | String jumpLink = null; |
| | | try { |
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null, pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_JD, SystemPIDInfo.PidType.share), |
| | | uid); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | int priceType = 1; |
| | | BigDecimal price = jdGoods.getPrice(); |
| | | ; |
| | | JDPingouInfo pinGouInfo = jdGoods.getPinGouInfo(); |
| | | if (pinGouInfo != null) { |
| | | priceType = 2; // 拼购价 |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id, |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id+"", |
| | | Constant.SOURCE_TYPE_JD); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getPDDGoodsDetail") |
| | | public void getPDDGoodsDetail(final AcceptData acceptData, final Long id, String uid, String callback, |
| | | public void getPDDGoodsDetail(final AcceptData acceptData, final String id, String uid, String callback, |
| | | PrintWriter out) { |
| | | if (id == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "请上传id")); |
| | |
| | | public void run() { |
| | | try { |
| | | if (!StringUtil.isNullOrEmpty(tempUid)) |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id, |
| | | userShareGoodsGroupService.updateBrowseNum(Long.parseLong(tempUid), id+"", |
| | | Constant.SOURCE_TYPE_PDD); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |