Commit 1e8a945912ec97f572a1671a3139cdb24c185707
1 parent
15ea612a
修改图文免审改为机审
Showing
1 changed file
with
13 additions
and
13 deletions
src/main/java/com/cnlive/shenhe/serviceImpl/ContentServiceImpl.java
| @@ -65,14 +65,15 @@ public class ContentServiceImpl { | @@ -65,14 +65,15 @@ public class ContentServiceImpl { | ||
| 65 | 65 | ||
| 66 | public List<ShyContent> findShyContentWithWebPage() { | 66 | public List<ShyContent> findShyContentWithWebPage() { |
| 67 | List checkParamList = new ArrayList(); | 67 | List checkParamList = new ArrayList(); |
| 68 | - checkParamList.add("content"); | 68 | + //checkParamList.add("content"); |
| 69 | checkParamList.add("moment"); | 69 | checkParamList.add("moment"); |
| 70 | Example example = new Example(ShyContent.class); | 70 | Example example = new Example(ShyContent.class); |
| 71 | Example.Criteria criteria = example.createCriteria(); | 71 | Example.Criteria criteria = example.createCriteria(); |
| 72 | criteria.andNotIn("content_tag", checkParamList); | 72 | criteria.andNotIn("content_tag", checkParamList); |
| 73 | criteria.andEqualTo("shenhe_type", CommonConst.AUDIT_TYPE_MACHANE); | 73 | criteria.andEqualTo("shenhe_type", CommonConst.AUDIT_TYPE_MACHANE); |
| 74 | criteria.andEqualTo("receive_status", CommonConst.RECEIVE_BEFORE); | 74 | criteria.andEqualTo("receive_status", CommonConst.RECEIVE_BEFORE); |
| 75 | - return shyContentMapper.selectByExampleAndRowBounds(example, new RowBounds(0, 100)); | 75 | + List<ShyContent> ShyContent = shyContentMapper.selectByExampleAndRowBounds(example, new RowBounds(0, 100)); |
| 76 | + return ShyContent; | ||
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | //*************************** | 79 | //*************************** |
| @@ -242,7 +243,6 @@ public class ContentServiceImpl { | @@ -242,7 +243,6 @@ public class ContentServiceImpl { | ||
| 242 | success = false; | 243 | success = false; |
| 243 | return success; | 244 | return success; |
| 244 | } | 245 | } |
| 245 | - | ||
| 246 | //如果当前图文是朋友圈的视频,通知点播云 | 246 | //如果当前图文是朋友圈的视频,通知点播云 |
| 247 | if (CommonUtils.isNotEmpty(content.getContent_tag()) | 247 | if (CommonUtils.isNotEmpty(content.getContent_tag()) |
| 248 | && "moment".equals(content.getContent_tag()) | 248 | && "moment".equals(content.getContent_tag()) |
| @@ -260,7 +260,6 @@ public class ContentServiceImpl { | @@ -260,7 +260,6 @@ public class ContentServiceImpl { | ||
| 260 | } | 260 | } |
| 261 | } | 261 | } |
| 262 | } | 262 | } |
| 263 | - | ||
| 264 | // 设置图文状态为审核后的状态 | 263 | // 设置图文状态为审核后的状态 |
| 265 | content.setContent_status(state); | 264 | content.setContent_status(state); |
| 266 | // 领取状态为已审核 | 265 | // 领取状态为已审核 |
| @@ -281,7 +280,6 @@ public class ContentServiceImpl { | @@ -281,7 +280,6 @@ public class ContentServiceImpl { | ||
| 281 | success = false; | 280 | success = false; |
| 282 | } | 281 | } |
| 283 | } | 282 | } |
| 284 | - | ||
| 285 | return success; | 283 | return success; |
| 286 | } | 284 | } |
| 287 | 285 | ||
| @@ -358,22 +356,16 @@ public class ContentServiceImpl { | @@ -358,22 +356,16 @@ public class ContentServiceImpl { | ||
| 358 | //获取图文免审sp | 356 | //获取图文免审sp |
| 359 | List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_CONTENT); | 357 | List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_CONTENT); |
| 360 | //初始化一个审核状态 | 358 | //初始化一个审核状态 |
| 361 | - //审核类型,1:免审,2:机审,3:人工审 | 359 | + //审核类型,1:免审,2:机审,3:人工审 默认人工审 |
| 362 | Integer shenheType = CommonConst.AUDIT_TYPE_USER; | 360 | Integer shenheType = CommonConst.AUDIT_TYPE_USER; |
| 363 | //如果当前sp是免审sp | 361 | //如果当前sp是免审sp |
| 364 | if (sites.contains(spId)) { | 362 | if (sites.contains(spId)) { |
| 365 | //免审 | 363 | //免审 |
| 366 | shenheType = CommonConst.AUDIT_TYPE_FREE; | 364 | shenheType = CommonConst.AUDIT_TYPE_FREE; |
| 367 | } else { | 365 | } else { |
| 368 | - if ("content".equals(ContentTag)) { | ||
| 369 | - //免审 | ||
| 370 | - shenheType = CommonConst.AUDIT_TYPE_FREE; | ||
| 371 | - } else if (ContentTag.startsWith("cms_") || ContentTag.startsWith("edu_")) { | 366 | + if ("content".equals(ContentTag) || ContentTag.startsWith("cms_") || ContentTag.startsWith("edu_")) { |
| 372 | //机审 | 367 | //机审 |
| 373 | shenheType = CommonConst.AUDIT_TYPE_MACHANE; | 368 | shenheType = CommonConst.AUDIT_TYPE_MACHANE; |
| 374 | - } else { | ||
| 375 | - //人工审 | ||
| 376 | - shenheType = CommonConst.AUDIT_TYPE_USER; | ||
| 377 | } | 369 | } |
| 378 | } | 370 | } |
| 379 | return shenheType; | 371 | return shenheType; |
| @@ -382,6 +374,7 @@ public class ContentServiceImpl { | @@ -382,6 +374,7 @@ public class ContentServiceImpl { | ||
| 382 | /** | 374 | /** |
| 383 | * 易盾网站过滤 | 375 | * 易盾网站过滤 |
| 384 | * 送审类型:1:文本 2:图片 3.网页 4:点播音频 | 376 | * 送审类型:1:文本 2:图片 3.网页 4:点播音频 |
| 377 | + * | ||
| 385 | * @param shyContent | 378 | * @param shyContent |
| 386 | * @return | 379 | * @return |
| 387 | */ | 380 | */ |
| @@ -391,7 +384,14 @@ public class ContentServiceImpl { | @@ -391,7 +384,14 @@ public class ContentServiceImpl { | ||
| 391 | logger.info("审核云向易盾网站检测接口提交的url:{}", contentUrl); | 384 | logger.info("审核云向易盾网站检测接口提交的url:{}", contentUrl); |
| 392 | //调用易盾网站检测接口 | 385 | //调用易盾网站检测接口 |
| 393 | JSONObject jsonObject = YiDunAntiFraudUtil.submitYiDunUrl(contentUrl); | 386 | JSONObject jsonObject = YiDunAntiFraudUtil.submitYiDunUrl(contentUrl); |
| 387 | + | ||
| 394 | if (jsonObject != null) { | 388 | if (jsonObject != null) { |
| 389 | + Integer code = jsonObject.getInteger("code"); | ||
| 390 | + String msg = jsonObject.getString("msg"); | ||
| 391 | + if (code != 200) { | ||
| 392 | + // |0待发布 |1已发布 |2已下线 | ||
| 393 | + boolean flag = callback(shyContent.getContent_id(), msg, CommonConst.AUDIT_REFUSE, shyContent.getAuditor_id(), shyContent.getUpdater()); | ||
| 394 | + } | ||
| 395 | JSONObject result = jsonObject.getJSONObject("result"); | 395 | JSONObject result = jsonObject.getJSONObject("result"); |
| 396 | String dataId = result.getString("dataId"); | 396 | String dataId = result.getString("dataId"); |
| 397 | String taskId = result.getString("taskId"); | 397 | String taskId = result.getString("taskId"); |