Commit 6b1dd058 authored by gaoyingwei's avatar gaoyingwei

修改 动态内容审核

parent 3123151a
......@@ -67,12 +67,14 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
String style = articleAudit.get(0).getDictValue();
if ("0".equals(style)) {
//调用百度,自动审核
boolean flag = false;
CensorResult result = contentCensorService.getCommonTextCensorResult(opmArticle.getContent());
flag = result.getIsPass();
boolean flag = true;
List<String> msg = new ArrayList<>();
if (!flag)
msg.addAll(result.getErrorMsg());
if (StringUtils.isNotBlank(opmArticle.getContent())) {
CensorResult result = contentCensorService.getCommonTextCensorResult(opmArticle.getContent());
flag = result.getIsPass();
if (!flag)
msg.addAll(result.getErrorMsg());
}
if (StringUtils.isNotBlank(opmArticle.getPictureId())){
JSONArray ids = JSONUtil.parseObj(opmArticle.getPictureId()).getJSONArray("id");
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