| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "gettaobaosharelink") |
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, Long auctionId, String source, Integer totalNum, |
| | | public void getTaobaoShareLink(AcceptData acceptData, Long uid, String auctionId, String source, Integer totalNum, |
| | | HttpServletRequest request, PrintWriter out) { |
| | | |
| | | if (uid == null || uid <= 0) { |
| | |
| | | return; |
| | | } |
| | | |
| | | if (auctionId == null || auctionId <= 0) { |
| | | if (StringUtil.isNullOrEmpty( auctionId)) { |
| | | out.print(JsonUtil.loadFalseResult(2, "商品ID不能为空")); |
| | | return; |
| | | } |
| | |
| | | * @param request |
| | | * @param out |
| | | */ |
| | | public void createTaoLijin(Long uid, Long auctionId, int totalNum, String relationId, SystemEnum system, HttpServletRequest request, |
| | | public void createTaoLijin(Long uid, String auctionId, int totalNum, String relationId, SystemEnum system, HttpServletRequest request, |
| | | PrintWriter out) { |
| | | try { |
| | | TaoBaoLink taoBaoLink = taoBaoLinkManager.getTaoLiJinLinkForShare(system, uid, auctionId, relationId, null); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "sharedetail", method = RequestMethod.POST) |
| | | public void shareDetail(AcceptData acceptData, Long uid, Long auctionId, String type, PrintWriter out) { |
| | | public void shareDetail(AcceptData acceptData, Long uid, String auctionId, String type, PrintWriter out) { |
| | | try { |
| | | userShareGoodsRecordService.saveSingleShareRecord(uid, auctionId, Constant.SOURCE_TYPE_TAOBAO); |
| | | out.print(JsonUtil.loadTrueResult("分享成功")); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "viewShareTextTemplate", method = RequestMethod.POST) |
| | | public void preViewShareTextTemplate(AcceptData acceptData, Long uid, String template, Long goodsId, Long tljId, |
| | | public void preViewShareTextTemplate(AcceptData acceptData, Long uid, String template, String goodsId, Long tljId, |
| | | Boolean hasCoupon, PrintWriter out) { |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | |
| | | app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET); |
| | | app.setPid(pidManager.getPidCache(acceptData.getSystem(), Constant.SOURCE_TYPE_TAOBAO, SystemPIDInfo.PidType.share)); |
| | | app.setAdzoneId(app.getPid().split("_")[3]); |
| | | TaoBaoGoodsBrief goodsLink = TaoKeApiUtil.specialConvertCoupon(goods.getAuctionId(), app, null, null); |
| | | TaoBaoGoodsBrief goodsLink = TaoKeApiUtil.specialConvertCouponV2(goods.getAuctionId(), app, null, null); |
| | | if (goodsLink != null) |
| | | token = TaoKeApiUtil.getTKToken(goods.getPictUrl(), goods.getTitle(), |
| | | StringUtil.isNullOrEmpty(goodsLink.getCouponLink()) ? goodsLink.getAuctionUrl() |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "resetShareTextTemplate", method = RequestMethod.POST) |
| | | public void resetShareTextTemplate(AcceptData acceptData, Long uid, Long goodsId, Long tljId, Boolean hasCoupon, |
| | | public void resetShareTextTemplate(AcceptData acceptData, Long uid, String goodsId, Long tljId, Boolean hasCoupon, |
| | | PrintWriter out) { |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | |
| | | dynamicInfo.getListGoodsBrief()); |
| | | data.put("shareId", shareRecord.getRedisKey()); |
| | | |
| | | Long auctionId = dynamicInfo.getImgs().get(0).getGoods().getAuctionId(); |
| | | String auctionId = dynamicInfo.getImgs().get(0).getGoods().getAuctionId(); |
| | | // 商品分享链接 |
| | | String url = String.format("http://%s%s?uid=%s&id=%s&appType=flq", configService.getH5Host(acceptData.getSystem()), |
| | | Constant.systemCommonConfig.getShareGoodsPagePath(), |