yujian
2020-03-31 15269f168b9d2bf559c93ced761f192393e2d928
Merge branch 'div' into div-1
2个文件已修改
32 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -34,6 +34,7 @@
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.dynamic.CommentInfo;
import com.yeshi.fanli.entity.dynamic.CommentInfo.CommentInfoEnum;
import com.yeshi.fanli.entity.dynamic.DynamicInfo;
import com.yeshi.fanli.entity.dynamic.GoodsEvaluate;
import com.yeshi.fanli.entity.dynamic.GoodsEvaluate.EvaluateEnum;
@@ -977,16 +978,20 @@
        }
        String text = "";
        CommentInfo comment = null;
        List<CommentInfo> comments = goodsEvaluate.getComments();
        if (comments != null) {
            for (CommentInfo commentInfo : comments) {
                if (cid.equals(commentInfo.getId())) {
                    text = commentInfo.getContent();
                    comment = commentInfo;
                    break;
                }
            }
        }
        String newText = text;
        String newText = text; // 非通用券需要验证
        if (comment != null && comment.getTypeEnum() != CommentInfoEnum.currencyCoupon) {
        try {
            newText = convertLinkManager.convertLinkFromText(text, uid, true);
        } catch (ConvertLinkExceptionException e) {
@@ -999,6 +1004,8 @@
            out.print(JsonUtil.loadFalseResult("评论生成失败"));
            return;
        }
        }
        // 替换价格
        if (goodsEvaluate.getType() == EvaluateEnum.single) {
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -955,17 +955,15 @@
            throw new GoodsEvaluateException(1, "请填写券截止时间");
        }
        if (!StringUtil.isNullOrEmpty(content) && kind != 3) { // 活动不验证
            try {
                convertLinkManager.convertLinkFromText(content, Constant.LINK_TOKEN_VERIFY_UID, true);
            } catch (ConvertLinkExceptionException e) {
                if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) {
                    throw new GoodsEvaluateException(1, "包含不可转链的口令与链接");
                }
            } catch (Exception e) {
                throw new GoodsEvaluateException(1, "包含不可转链的口令与链接");
            }
        }
         // 均不验证
        /*
         * if (!StringUtil.isNullOrEmpty(content) && kind != 3) { try {
         * convertLinkManager.convertLinkFromText(content,
         * Constant.LINK_TOKEN_VERIFY_UID, true); } catch (ConvertLinkExceptionException
         * e) { if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) { throw new
         * GoodsEvaluateException(1, "包含不可转链的口令与链接"); } } catch (Exception e) { throw
         * new GoodsEvaluateException(1, "包含不可转链的口令与链接"); } }
         */
        GoodsEvaluate resultObj = goodsEvaluateDao.getById(pid);
        if (resultObj == null)
@@ -1574,6 +1572,9 @@
            goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
            
            // 按照发布显示时间段起始时间为准。
            goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
            List<CommentInfo> comments = evaluateNew.getComments();
            if (comments != null && comments.size() > 0) {
                EvaluateEnum typeEnum = evaluateNew.getType();