| | |
| | | HttpServletRequest request, PrintWriter out) {
|
| | | UserExtraTaoBaoInfo extraInfo = userExtraTaoBaoInfoService.getByUid(uid);
|
| | | UserInfoExtra userExtraInfo = userInfoExtraService.getUserInfoExtra(uid);
|
| | | String inviteCode=null;
|
| | | if(userExtraInfo!=null)
|
| | | inviteCode=userExtraInfo.getInviteCode();
|
| | | |
| | | String inviteCode = null;
|
| | | if (userExtraInfo != null)
|
| | | inviteCode = userExtraInfo.getInviteCode();
|
| | |
|
| | | String relationId = null;
|
| | | if (extraInfo != null && extraInfo.getRelationId() != null && extraInfo.getRelationValid() != null
|
| | | && extraInfo.getRelationValid() == true)
|
| | |
| | |
|
| | | try {
|
| | | ShareInfoVO shareInfo = new ShareInfoVO();
|
| | | |
| | | |
| | | |
| | |
|
| | | // 测试
|
| | | |
| | | |
| | |
|
| | | TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, goodsId, relationId);
|
| | |
|
| | |
| | | shareInfo.setToken(TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | | shareInfo.setRule(configService.get("share_single_goods_rule"));
|
| | | shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500));
|
| | | |
| | | String commentTextStr= configService.get("share_single_goods_comment_text");
|
| | |
|
| | | String commentTextStr = configService.get("share_single_goods_comment_text");
|
| | | List<String> commentTexts = new ArrayList<>();
|
| | | if(!StringUtil.isNullOrEmpty(commentTextStr))
|
| | | {
|
| | | JSONArray array= JSONArray.fromObject(commentTextStr);
|
| | | for(int i=0;i<array.size();i++)
|
| | | {
|
| | | if(StringUtil.isNullOrEmpty(inviteCode))
|
| | | {
|
| | | if(array.optString(i).contains("[邀请码]"))
|
| | | {
|
| | | if (!StringUtil.isNullOrEmpty(commentTextStr)) {
|
| | | JSONArray array = JSONArray.fromObject(commentTextStr);
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | if (array.optString(i).contains("[邀请码]")) {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", shareInfo.getToken()));
|
| | | if (StringUtil.isNullOrEmpty(inviteCode))
|
| | | commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK)
|
| | | .replace("[淘口令]", shareInfo.getToken()));
|
| | | else
|
| | | commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK)
|
| | | .replace("[邀请码]", inviteCode).replace("[淘口令]", shareInfo.getToken()));
|
| | | }
|
| | | }
|
| | | shareInfo.setCommentTexts(commentTexts);
|
| | | |
| | | |
| | |
|
| | | String shareText = "";
|
| | | // 无券
|
| | |
| | | // goodsId + "");
|
| | |
|
| | | String couponUrl = null;
|
| | | JDCouponInfo couponInfo = jdGoods.getCouponInfo();
|
| | | JDCouponInfo couponInfo = JDUtil.getShowCouponInfo(jdGoods);
|
| | | if (couponInfo != null) {
|
| | | couponUrl = couponInfo.getLink();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | String couponUrl = null;
|
| | | JDCouponInfo couponInfo = goods.getCouponInfo();
|
| | | JDCouponInfo couponInfo = JDUtil.getShowCouponInfo(goods);
|
| | | if (couponInfo != null) {
|
| | | couponUrl = couponInfo.getLink();
|
| | | }
|