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