| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.fasterxml.jackson.core.util.VersionUtil;
|
| | | import com.yeshi.fanli.controller.client.v2.ShareControllerV2;
|
| | | import com.yeshi.fanli.dto.share.ShareGoodsRecordDTO;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | |
| | | }
|
| | | TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, auctionId, relationId);
|
| | | TaoBaoGoodsBrief goods = taoBaoLink.getGoods();
|
| | | |
| | | data.put("clickUrl", ShareControllerV2.getERCodeContent(goods, taoBaoLink.getTaoToken()));
|
| | | if (!com.yeshi.fanli.util.VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(),
|
| | | acceptData.getVersion()))
|
| | | data.put("clickUrl", ShareControllerV2.getERCodeContent(goods, taoBaoLink.getTaoToken()));
|
| | |
|
| | | data.put("token", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | | |
| | | String inviteCode=null;
|
| | | UserInfoExtra extra= userInfoExtraService.getUserInfoExtra(uid);
|
| | | if(extra!=null)
|
| | | inviteCode=extra.getInviteCode();
|
| | | // 测试
|
| | | List<String> commentTexts = new ArrayList<>();
|
| | | String commentTextStr= configService.get("share_single_goods_comment_text");
|
| | | if(!StringUtil.isNullOrEmpty(commentTextStr))
|
| | | {
|
| | | JSONArray arr= JSONArray.fromObject(commentTextStr);
|
| | | for(int i=0;i<arr.size();i++)
|
| | | {
|
| | | if(StringUtil.isNullOrEmpty(inviteCode))
|
| | | {
|
| | | if(arr.optString(i).contains("[邀请码]"))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | if(StringUtil.isNullOrEmpty(inviteCode))
|
| | | commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[淘口令]", data.optString("token")));
|
| | | else
|
| | | commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", data.optString("token")));
|
| | | }
|
| | | }
|
| | | data.put("commentTexts", commentTexts);
|
| | | data.put("wxErCode", ShareControllerV2.getERCodeContent(goods, taoBaoLink.getTaoToken()));
|
| | | }
|
| | |
|
| | | } else if (cid == 4) { // 邀请分享
|
| | |
| | | }
|
| | | }
|
| | | title = title.replace("【邀请码】", inviteCode);
|
| | | title = title.replace("【邀请链接】", UserUtil.getInviteShortLink(uid));
|
| | | title = title.replace("【邀请链接】", Constant.YINGYONGBAO_LINK);
|
| | | data.put("title", title);
|
| | |
|
| | | } else { // 有图分享
|