Commit 6b1dd058 authored by gaoyingwei's avatar gaoyingwei

修改 动态内容审核

parent 3123151a
...@@ -67,12 +67,14 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm ...@@ -67,12 +67,14 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
String style = articleAudit.get(0).getDictValue(); String style = articleAudit.get(0).getDictValue();
if ("0".equals(style)) { if ("0".equals(style)) {
//调用百度,自动审核 //调用百度,自动审核
boolean flag = false; boolean flag = true;
CensorResult result = contentCensorService.getCommonTextCensorResult(opmArticle.getContent());
flag = result.getIsPass();
List<String> msg = new ArrayList<>(); List<String> msg = new ArrayList<>();
if (!flag) if (StringUtils.isNotBlank(opmArticle.getContent())) {
msg.addAll(result.getErrorMsg()); CensorResult result = contentCensorService.getCommonTextCensorResult(opmArticle.getContent());
flag = result.getIsPass();
if (!flag)
msg.addAll(result.getErrorMsg());
}
if (StringUtils.isNotBlank(opmArticle.getPictureId())){ if (StringUtils.isNotBlank(opmArticle.getPictureId())){
JSONArray ids = JSONUtil.parseObj(opmArticle.getPictureId()).getJSONArray("id"); JSONArray ids = JSONUtil.parseObj(opmArticle.getPictureId()).getJSONArray("id");
for (Object id : ids) { for (Object id : ids) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment