Commit b537c09d44beb416694cfabac9a956dfc4d8f814
1 parent
676a0d35
免审数据查询重写
Showing
6 changed files
with
18 additions
and
10 deletions
src/main/java/com/cnlive/shenhe/entity/ShyVideos.java
| ... | ... | @@ -399,7 +399,8 @@ public class ShyVideos { |
| 399 | 399 | * @return shenhe_type - 审核类型,1:免审,2:机审,3:人工审 |
| 400 | 400 | */ |
| 401 | 401 | public Integer getShenhe_type() { |
| 402 | -// return shenhe_type; | |
| 402 | + if (source!=null) | |
| 403 | + return shenhe_type; | |
| 403 | 404 | return CommonConst.AUDIT_TYPE_USER;//暂时人工审核 |
| 404 | 405 | } |
| 405 | 406 | ... | ... |
src/main/java/com/cnlive/shenhe/job/VideosJob.java
| ... | ... | @@ -31,15 +31,9 @@ public class VideosJob { |
| 31 | 31 | */ |
| 32 | 32 | @Scheduled(fixedRate = 60 * 1000) |
| 33 | 33 | public void updateVideos() { |
| 34 | - ShyVideos shyVideos = new ShyVideos(); | |
| 35 | - // 审核类型为免审 | |
| 36 | - shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_FREE); | |
| 37 | - // 审核状态为未审核 | |
| 38 | - shyVideos.setState(CommonConst.AUDIT_INTT); | |
| 39 | - List<ShyVideos> shyVideosList = videosService.findShyVideo(shyVideos); | |
| 34 | + List<ShyVideos> shyVideosList = videosService.findMSVideo(); | |
| 40 | 35 | if (shyVideosList.size() > 0) { |
| 41 | 36 | for (ShyVideos video : shyVideosList) { |
| 42 | - if (CommonUtils.isEmpty(video.getCategory()))continue; | |
| 43 | 37 | logger.info("当前白名单通过的videos_id:" + video.getId()+"视频sp"+video.getSpid()+"视频source"+video.getSource()); |
| 44 | 38 | video.setUpdater("白名单"); |
| 45 | 39 | // 更新点播和审核的视频状态 |
| ... | ... | @@ -58,7 +52,6 @@ public class VideosJob { |
| 58 | 52 | ShyVideos shyVideos = new ShyVideos(); |
| 59 | 53 | //审核类型为机审 |
| 60 | 54 | shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_MACHANE); |
| 61 | - | |
| 62 | 55 | //待审核状态 |
| 63 | 56 | shyVideos.setState(CommonConst.AUDIT_INTT); |
| 64 | 57 | //抽帧完成 |
| ... | ... | @@ -66,7 +59,6 @@ public class VideosJob { |
| 66 | 59 | List<ShyVideos> shyVideosList = videosService.findShyVideo(shyVideos); |
| 67 | 60 | if (shyVideosList != null && shyVideosList.size() > 0) { |
| 68 | 61 | for (ShyVideos video : shyVideosList) { |
| 69 | - if (CommonUtils.isEmpty(video.getCategory()))continue; | |
| 70 | 62 | logger.info("定时向易盾发送检测视频的videos_id:{}", video.getId()); |
| 71 | 63 | //易盾图片过滤 |
| 72 | 64 | logger.info("审核云定时向易盾发送视频抽帧图片检测:{}", video.getVideo_id()); | ... | ... |
src/main/java/com/cnlive/shenhe/mapper/ShyVideosMapper.java
| ... | ... | @@ -4,7 +4,11 @@ import com.cnlive.shenhe.entity.ShyVideos; |
| 4 | 4 | import org.apache.ibatis.annotations.Param; |
| 5 | 5 | import tk.mybatis.mapper.common.Mapper; |
| 6 | 6 | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 7 | 9 | public interface ShyVideosMapper extends Mapper<ShyVideos> { |
| 8 | 10 | ShyVideos selectBySpId(@Param("id") Integer id, |
| 9 | 11 | @Param("spId") Integer spId); |
| 12 | + | |
| 13 | + List<ShyVideos> findMSVideo(); | |
| 10 | 14 | } |
| 11 | 15 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/service/VideosService.java
src/main/java/com/cnlive/shenhe/service/serviceImpl/VideosServiceImpl.java
| ... | ... | @@ -95,6 +95,11 @@ public class VideosServiceImpl implements VideosService { |
| 95 | 95 | return shyVideosMapper.selectByRowBounds(shyVideos, new RowBounds(0, 100)); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | + @Override | |
| 99 | + public List<ShyVideos> findMSVideo() { | |
| 100 | + return shyVideosMapper.findMSVideo(); | |
| 101 | + } | |
| 102 | + | |
| 98 | 103 | /** |
| 99 | 104 | * 根据主键修改点播 返回布尔类型 |
| 100 | 105 | * | ... | ... |
src/main/resources/mapper/ShyVideosMapper.xml