linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
src/main/java/org/springblade/modules/circle/service/impl/CircleServiceImpl.java
@@ -110,21 +110,21 @@
         circle.setCommunityCode(communityCode);
      }
      // 校验事件是否分享过
      if (circle.getCircleType() != null && circle.getEventId() != null) {
         long count = count(Wrappers.<CircleEntity>lambdaQuery().
            eq(CircleEntity::getCircleType, circle.getCircleType()).
            eq(CircleEntity::getEventId, circle.getEventId()));
         if (count > 0) {
            return "当前发布的内容已经分享过,请勿重复发布!";
         }
      }
//      if (circle.getCircleType() != null && circle.getEventId() != null) {
//         long count = count(Wrappers.<CircleEntity>lambdaQuery().
//            eq(CircleEntity::getCircleType, circle.getCircleType()).
//            eq(CircleEntity::getEventId, circle.getEventId()));
//         if (count > 0) {
//            return "当前发布的内容已经分享过,请勿重复发布!";
//         }
//      }
      String iswords = "false";
      if (circle.getCircleType() == null && circle.getEventId() == null) {
         // 先进行敏感词过滤
         Map<String, Object> map = worksService.interceptWords(circle.getCircleText());
         // 获取敏感词校验结果
         iswords = map.get("iswords").toString();
      }
//      if (circle.getCircleType() == null && circle.getEventId() == null) {
      // 先进行敏感词过滤
      Map<String, Object> map = worksService.interceptWords(circle.getCircleText());
      // 获取敏感词校验结果
      iswords = map.get("iswords").toString();
//      }
      if (iswords.equals("false")) {
         // 审核通过
         boolean flag = save(circle);