Commit 9486142ef4a83a024d0d3f596357108a3f7a044f

Authored by 徐近程
1 parent 8d48f783

点播审核优化

src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
... ... @@ -400,45 +400,52 @@ public class VideosServiceImpl {
400 400 return 0;
401 401 }
402 402  
403   - /**
404   - * 根据sp、栏目、用户id来判断审核类型
405   - * @param spid
406   - * @param category
407   - * @param sid
408   - * @return
409   - */
410   - public void getShenheType(ShyVideos shyVideo){
411   -
412   - //获取点播免审sp
  403 +
  404 + /**
  405 + * 根据sp、栏目、用户id来判断审核类型
  406 + *
  407 + * @param shyVideo
  408 + */
  409 + public void getShenheType(ShyVideos shyVideo) {
  410 + //获取点播免审sp
413 411 List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_VIDEO);
414   - logger.info("sites"+sites.toString());
  412 + logger.info("sites" + sites.toString());
415 413 //初始化一个审核状态
416   - Integer shenheType=3;//审核类型,1:免审,2:机审,3:人工审
  414 + //审核类型,1:免审,2:机审,3:人工审
  415 + Integer shenheType = 3;
417 416 //如果当前sp是免审sp
418   - if(sites.contains(shyVideo.getSpid())){
419   - shenheType=1;//免审
420   - }
421   -// //如果栏目是“目击者”
422   -// if(CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_WITNESS)){
423   -// //如果用户id存在
424   -// if(CommonUtils.isNotEmpty(shyVideo.getVideo_user_id())){
425   -// ShyUsersfree shyUserfree=usersfreeServiceImpl.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());
426   -// //如果存在免审用户
427   -// if(CommonUtils.isNotNull(shyUserfree)){
428   -// shenheType=1;//免审
429   -// }else{//用户不免审
430   -// shenheType=2;//机审
431   -// }
432   -// }else{//如果用户id不存在
433   -// shenheType=2;//机审
434   -// }
435   -// }
436   - //如果栏目是朋友圈
437   - if(CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_MOMENT)){
438   - shenheType=1;//免审
  417 + if (sites.contains(shyVideo.getSpid())) {
  418 + //免审
  419 + shenheType = 1;
  420 + } else {
  421 + //如果栏目是“目击者”
  422 + if (CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_WITNESS)) {
  423 + //如果用户id存在
  424 + if (CommonUtils.isNotEmpty(shyVideo.getVideo_user_id())) {
  425 + ShyUsersfree shyUserfree = usersfreeServiceImpl.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());
  426 + //如果存在免审用户
  427 + if (CommonUtils.isNotNull(shyUserfree)) {
  428 + //免审
  429 + shenheType = 1;
  430 + } else {
  431 + //用户不免审
  432 + //机审
  433 + shenheType = 2;
  434 + }
  435 + } else {
  436 + //如果用户id不存在
  437 + //机审
  438 + shenheType = 2;
  439 + }
  440 + }
  441 + //如果栏目是朋友圈
  442 + if (CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_MOMENT)) {
  443 + //免审
  444 + shenheType = 1;
  445 + }
439 446 }
440 447 shyVideo.setShenhe_type(shenheType);
441   - }
  448 + }
442 449  
443 450  
444 451 public String repulse(String shyVideoId,String msg,String userId){
... ...