admin
2021-04-28 a7454d8a6325566753358b37ffabfae2faa0ca7f
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -556,7 +556,7 @@
                    couponUrl = couponInfo.getLink();
                }
                String materialId = "https://item.jd.com/" + goodsId + ".html";
                String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl,
                String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null,
                        JDApiUtil.POSITION_SHARE + "", "1");
                String template = configService.getValue(ConfigKeyEnum.quickShareJDCommentText.getKey(), system);
                if (jumpLink == null) {
@@ -564,7 +564,8 @@
                }
                commentText = template.replace("[链接]", jumpLink);
            } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
                String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(Long.parseLong(goodsId), PinDuoDuoApiUtil.PID_SHARE + "", "1");
                PDDGoodsDetail goodsDetail = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsId), PinDuoDuoApiUtil.PID_SHARE + "", "1");
                String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsDetail.getGoodsSign(), PinDuoDuoApiUtil.PID_SHARE + "", "1");
                if (jumpLink == null) {
                    throw new GoodsEvaluateException(1, "该商品转链失败");
                }
@@ -624,12 +625,15 @@
                couponUrl = couponInfo.getLink();
            }
            String materialId = "https://item.jd.com/" + goodsDetailVO.getGoodsId() + ".html";
            String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "",
            String jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, null, JDApiUtil.POSITION_SHARE + "",
                    "1");
            String template = configService.getValue(ConfigKeyEnum.quickShareJDCommentText.getKey(), system);
            commentText = template.replace("[链接]", jumpLink);
        } else if (goodsDetailVO.getGoodsType() == Constant.SOURCE_TYPE_PDD) {
            String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(Long.parseLong(goodsDetailVO.getGoodsId()),
            PDDGoodsDetail goodsDetail = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsDetailVO.getGoodsId()),
                    PinDuoDuoApiUtil.PID_SHARE + "", "1");
            String jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsDetail.getGoodsSign(),
                    PinDuoDuoApiUtil.PID_SHARE + "", "1");
            String template = configService.getValue(ConfigKeyEnum.quickSharePDDCommentText.getKey(), system);
            commentText = template.replace("[链接]", jumpLink);
@@ -907,7 +911,7 @@
                }
            } else if (i == 0 && kind == 1) {
                try {
                    convertLinkManager.convertLinkFromText(content, Constant.LINK_TOKEN_VERIFY_UID, true,false);
                    convertLinkManager.convertLinkFromText(content, Constant.LINK_TOKEN_VERIFY_UID, true, false);
                } catch (Exception e) {
                    throw new GoodsEvaluateException(1, "不包含可转链的口令与链接");
                }
@@ -977,7 +981,7 @@
        String content = commentInfo.getContent();
        if (!StringUtil.isNullOrEmpty(content) && commentInfo.getNeedSpin()) {
            try {
                convertLinkManager.convertLinkFromText(content, Constant.LINK_TOKEN_VERIFY_UID, true,false);
                convertLinkManager.convertLinkFromText(content, Constant.LINK_TOKEN_VERIFY_UID, true, false);
            } catch (ConvertLinkExceptionException e) {
                if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) {
                    throw new GoodsEvaluateException(1, "包含不可转链的口令与链接");
@@ -1700,7 +1704,7 @@
                                List<String> activityIdList = convertLinkManager.getTaoBaoOfficialActivityId(content);
                                for (String st : activityIdList)
                                    content = content.replace(st, "");
                                content=content.replace("{relationId}","");
                                content = content.replace("{relationId}", "");
                                commentInfoNew.setContent(content);
                            }
                        }
@@ -1711,7 +1715,7 @@
                        List<String> activityIdList = convertLinkManager.getTaoBaoOfficialActivityId(content);
                        for (String st : activityIdList)
                            content = content.replace(st, "");
                        content=content.replace("{relationId}","");
                        content = content.replace("{relationId}", "");
                        commentInfoNew.setContent(content);
                    }