| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.circle.dto.CircleDTO; |
| | |
| | | |
| | | @Override |
| | | public IPage<CircleVO> selectCirclePage(IPage<CircleVO> page, CircleVO circle) { |
| | | // CommonParamSet commonParamSet = new CommonParamSet().invoke(CircleVO.class, circle); |
| | | CommonParamSet commonParamSet = new CommonParamSet().invoke(CircleVO.class, circle); |
| | | List<CircleVO> circleVOS = baseMapper.selectCirclePage(page, circle); |
| | | for (CircleVO circleVO : circleVOS) { |
| | | // 获取circleVO中circleId的点赞数 |
| | |
| | | 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); |