inleft
2022-08-31 aae48957ba971ed0a1bfbfa182701cd22bbe8694
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticlecomment/controller/BlogArticleCommentOutsideController.java
@@ -85,8 +85,8 @@
        //自我认证
        if (MyConstant.myIds.contains(addDto.getVisitorNickName())) {
            if (StrUtil.isEmpty(addDto.getAuthCode()) || !addDto.getAuthCode().equals(ConstantContextHolder.getAuthCode())) {
                throw new BlogException("不要成为我,你就是真的自己");
            if (StrUtil.isEmpty(addDto.getAuthCode()) || !addDto.getAuthCode().equals(ConstantContextHolder.getPushCode())) {
                throw new BlogException("此名称在这里使用需要正确的授权码..");
            }
        }
@@ -131,6 +131,14 @@
            return new SuccessResponseData();
        }
        //发送者是我本体,标记回复该条回复消息已读
        if (MyConstant.myIds.contains(addDto.getVisitorNickName())) {
            commentService.lambdaUpdate()
                    .eq(BlogArticleComment::getId, lastComment.getId())
                    .set(BlogArticleComment::getIsRead, MyConstant.Yes)
                    .update();
        }
        //前一个留言接收邮件回复(如果是给评论者自己的追加可以跳过)
        if (MyConstant.Yes.equals(lastComment.getIsReceiveCallback())
                && StrUtil.isNotEmpty(lastComment.getVisitorEmail())
@@ -138,9 +146,6 @@
//                && !lastComment.getVisitorEmail().equals(MyConstant.email)
                && !lastComment.getVisitorNickName().equals(addDto.getVisitorNickName())
                && !lastComment.getVisitorEmail().equals(addDto.getVisitorEmail())) {
            TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
            Template template = engine.getTemplate("emailReplyModel.ftl");
            String title = MyConstant.msgTitle;
            String address;
@@ -154,6 +159,9 @@
                title = checkArticle.getTitle();
            }
            TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig(MyConstant.ftlModel.path, TemplateConfig.ResourceMode.CLASSPATH));
            Template template = engine.getTemplate(MyConstant.ftlModel.reply);
            Dict dict = Dict.create()
                    .set("lastGuest", lastComment.getVisitorNickName())
                    .set("commentContent", lastComment.getCommentContent())