Commit 636f40244b27755d1ee5b88a07984bf1acbfdee0
1 parent
b537c09d
定时任务数据查询重写
Showing
9 changed files
with
34 additions
and
18 deletions
src/main/java/com/cnlive/shenhe/api/ContentControllerApi.java
| @@ -55,8 +55,12 @@ public class ContentControllerApi { | @@ -55,8 +55,12 @@ public class ContentControllerApi { | ||
| 55 | shyContent.setContent_id(contentId); | 55 | shyContent.setContent_id(contentId); |
| 56 | shyContent.setContent_tag(newContentTag); | 56 | shyContent.setContent_tag(newContentTag); |
| 57 | //获取审核类型 | 57 | //获取审核类型 |
| 58 | -// Integer shenheType = contentService.getShenheType(json.getInteger("spId"), newContentTag); | 58 | + Integer spId = json.getInteger("spId"); |
| 59 | Integer shenheType = CommonConst.AUDIT_TYPE_USER;//暂时人工审核 | 59 | Integer shenheType = CommonConst.AUDIT_TYPE_USER;//暂时人工审核 |
| 60 | + if (spId!=null&&spId.intValue()==1607){ | ||
| 61 | + shenheType = contentService.getShenheType(json.getInteger("spId"), newContentTag); | ||
| 62 | + } | ||
| 63 | + | ||
| 60 | List<ShyContent> contentList = contentService.findShyContent(shyContent); | 64 | List<ShyContent> contentList = contentService.findShyContent(shyContent); |
| 61 | if (contentList.size() > 0) { | 65 | if (contentList.size() > 0) { |
| 62 | ShyContent shyContent1 = contentList.get(0); | 66 | ShyContent shyContent1 = contentList.get(0); |
src/main/java/com/cnlive/shenhe/job/VideosJob.java
| @@ -49,14 +49,10 @@ public class VideosJob { | @@ -49,14 +49,10 @@ public class VideosJob { | ||
| 49 | */ | 49 | */ |
| 50 | @Scheduled(cron = "0 0/3 8-23 * * ? ") | 50 | @Scheduled(cron = "0 0/3 8-23 * * ? ") |
| 51 | public void videoFilter() { | 51 | public void videoFilter() { |
| 52 | - ShyVideos shyVideos = new ShyVideos(); | ||
| 53 | //审核类型为机审 | 52 | //审核类型为机审 |
| 54 | - shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_MACHANE); | ||
| 55 | //待审核状态 | 53 | //待审核状态 |
| 56 | - shyVideos.setState(CommonConst.AUDIT_INTT); | ||
| 57 | //抽帧完成 | 54 | //抽帧完成 |
| 58 | - shyVideos.setAvsample(CommonConst.AVSAMPLE_SUCCESS); | ||
| 59 | - List<ShyVideos> shyVideosList = videosService.findShyVideo(shyVideos); | 55 | + List<ShyVideos> shyVideosList = videosService.findJSVideo(); |
| 60 | if (shyVideosList != null && shyVideosList.size() > 0) { | 56 | if (shyVideosList != null && shyVideosList.size() > 0) { |
| 61 | for (ShyVideos video : shyVideosList) { | 57 | for (ShyVideos video : shyVideosList) { |
| 62 | logger.info("定时向易盾发送检测视频的videos_id:{}", video.getId()); | 58 | logger.info("定时向易盾发送检测视频的videos_id:{}", video.getId()); |
src/main/java/com/cnlive/shenhe/mapper/ShyVideosMapper.java
| @@ -11,4 +11,6 @@ public interface ShyVideosMapper extends Mapper<ShyVideos> { | @@ -11,4 +11,6 @@ public interface ShyVideosMapper extends Mapper<ShyVideos> { | ||
| 11 | @Param("spId") Integer spId); | 11 | @Param("spId") Integer spId); |
| 12 | 12 | ||
| 13 | List<ShyVideos> findMSVideo(); | 13 | List<ShyVideos> findMSVideo(); |
| 14 | + | ||
| 15 | + List<ShyVideos> findJSVideo(); | ||
| 14 | } | 16 | } |
| 15 | \ No newline at end of file | 17 | \ 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
| @@ -100,6 +100,11 @@ public class VideosServiceImpl implements VideosService { | @@ -100,6 +100,11 @@ public class VideosServiceImpl implements VideosService { | ||
| 100 | return shyVideosMapper.findMSVideo(); | 100 | return shyVideosMapper.findMSVideo(); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | + @Override | ||
| 104 | + public List<ShyVideos> findJSVideo() { | ||
| 105 | + return shyVideosMapper.findJSVideo(); | ||
| 106 | + } | ||
| 107 | + | ||
| 103 | /** | 108 | /** |
| 104 | * 根据主键修改点播 返回布尔类型 | 109 | * 根据主键修改点播 返回布尔类型 |
| 105 | * | 110 | * |
src/main/resources/mapper/ShyVideosMapper.xml
| @@ -57,4 +57,8 @@ | @@ -57,4 +57,8 @@ | ||
| 57 | <select id="findMSVideo" resultType="com.cnlive.shenhe.entity.ShyVideos"> | 57 | <select id="findMSVideo" resultType="com.cnlive.shenhe.entity.ShyVideos"> |
| 58 | select * from shy_videos where shenhe_type=1 AND state =0 | 58 | select * from shy_videos where shenhe_type=1 AND state =0 |
| 59 | </select> | 59 | </select> |
| 60 | + | ||
| 61 | + <select id="findJSVideo" resultType="com.cnlive.shenhe.entity.ShyVideos"> | ||
| 62 | + select * from shy_videos where shenhe_type=2 AND state =0 AND avsample =2 | ||
| 63 | + </select> | ||
| 60 | </mapper> | 64 | </mapper> |
| 61 | \ No newline at end of file | 65 | \ No newline at end of file |
src/main/resources/templates/page/channel.html
| @@ -254,9 +254,10 @@ | @@ -254,9 +254,10 @@ | ||
| 254 | alt="频道封面图"></div> | 254 | alt="频道封面图"></div> |
| 255 | </td> | 255 | </td> |
| 256 | <td style="text-align: center; vertical-align:middle; width: 3%;"> | 256 | <td style="text-align: center; vertical-align:middle; width: 3%;"> |
| 257 | - <span th:if="${channel.shenhe_type==1}">免审</span> | ||
| 258 | - <span th:if="${channel.shenhe_type==2}">机审</span> | ||
| 259 | - <span th:if="${channel.shenhe_type==3}">人工审</span> | 257 | + <span th:if="${channel.shenhe_type!=0}">编审</span> |
| 258 | + <!--<span th:if="${channel.shenhe_type==1}">免审</span>--> | ||
| 259 | + <!--<span th:if="${channel.shenhe_type==2}">机审</span>--> | ||
| 260 | + <!--<span th:if="${channel.shenhe_type==3}">人工审</span>--> | ||
| 260 | </td> | 261 | </td> |
| 261 | <td style="text-align: center; vertical-align:middle; width: 3%;"> | 262 | <td style="text-align: center; vertical-align:middle; width: 3%;"> |
| 262 | <span class="btn btn-sm btn-warning" | 263 | <span class="btn btn-sm btn-warning" |
| @@ -267,7 +268,7 @@ | @@ -267,7 +268,7 @@ | ||
| 267 | th:if="${channel.shenhe_status==2}">已拒绝</span> | 268 | th:if="${channel.shenhe_status==2}">已拒绝</span> |
| 268 | </td> | 269 | </td> |
| 269 | <td style="text-align: center; vertical-align:middle; width: 4%;" | 270 | <td style="text-align: center; vertical-align:middle; width: 4%;" |
| 270 | - th:text="${channel.updater}"> | 271 | + th:text="${channel.updater!=null?'总编室':''}"> |
| 271 | openadmin9@cnlive.com | 272 | openadmin9@cnlive.com |
| 272 | </td> | 273 | </td> |
| 273 | <td style="text-align: center; vertical-align:middle; width: 10%;" | 274 | <td style="text-align: center; vertical-align:middle; width: 10%;" |
src/main/resources/templates/page/content.html
| @@ -295,12 +295,13 @@ | @@ -295,12 +295,13 @@ | ||
| 295 | <span th:if="${content.receive_status==2}">已审核</span> | 295 | <span th:if="${content.receive_status==2}">已审核</span> |
| 296 | <span th:if="${content.receive_status==3}">已拒绝</span> | 296 | <span th:if="${content.receive_status==3}">已拒绝</span> |
| 297 | </td> | 297 | </td> |
| 298 | - <td style="text-align: center; width: 6%;" th:text="${content.updater}">审核员 | 298 | + <td style="text-align: center; width: 6%;" th:text="${content.updater!=null?'总编室':''}">审核员 |
| 299 | </td> | 299 | </td> |
| 300 | <td style="text-align: center; width: 3%;"> | 300 | <td style="text-align: center; width: 3%;"> |
| 301 | - <span th:if="${content.shenhe_type==1}">免审</span> | ||
| 302 | - <span th:if="${content.shenhe_type==2}">机审</span> | ||
| 303 | - <span th:if="${content.shenhe_type==3}">人工审</span> | 301 | + <span th:if="${content.shenhe_type!=0}">编审</span> |
| 302 | + <!--<span th:if="${content.shenhe_type==1}">免审</span>--> | ||
| 303 | + <!--<span th:if="${content.shenhe_type==2}">机审</span>--> | ||
| 304 | + <!--<span th:if="${content.shenhe_type==3}">人工审</span>--> | ||
| 304 | </td> | 305 | </td> |
| 305 | <td style="text-align: center; width: 10%;" | 306 | <td style="text-align: center; width: 10%;" |
| 306 | th:text="${#dates.format(content.create_date, 'yyyy-MM-dd HH:mm:ss')}"> | 307 | th:text="${#dates.format(content.create_date, 'yyyy-MM-dd HH:mm:ss')}"> |
src/main/resources/templates/page/video.html
| @@ -274,7 +274,7 @@ | @@ -274,7 +274,7 @@ | ||
| 274 | <!--<td style="text-align: center; width: 10%;">--> | 274 | <!--<td style="text-align: center; width: 10%;">--> |
| 275 | <!--<div width="160px" height="90px"><img th:src="@{${video.video_poster}}" width="160px" alt="封面图"></div>--> | 275 | <!--<div width="160px" height="90px"><img th:src="@{${video.video_poster}}" width="160px" alt="封面图"></div>--> |
| 276 | <!--</td>--> | 276 | <!--</td>--> |
| 277 | - <td style="text-align: center; width: 6%;" th:text="${video.updater}">审核员 | 277 | + <td style="text-align: center; width: 6%;" th:text="${video.updater!=null?'总编室':''}">审核员 |
| 278 | </td> | 278 | </td> |
| 279 | <td style="text-align: center; width: 3%;" | 279 | <td style="text-align: center; width: 3%;" |
| 280 | th:text="${video.video_priority=='1'?'是':'否'}">是 | 280 | th:text="${video.video_priority=='1'?'是':'否'}">是 |
| @@ -286,9 +286,10 @@ | @@ -286,9 +286,10 @@ | ||
| 286 | <!-- <span class="btn btn-sm btn-danger" th:if="${video.state==3}">自动审核失败</span> --> | 286 | <!-- <span class="btn btn-sm btn-danger" th:if="${video.state==3}">自动审核失败</span> --> |
| 287 | </td> | 287 | </td> |
| 288 | <td style="text-align: center; width: 3%;"> | 288 | <td style="text-align: center; width: 3%;"> |
| 289 | - <span th:if="${video.shenhe_type==1}">免审</span> | ||
| 290 | - <span th:if="${video.shenhe_type==2}">机审</span> | ||
| 291 | - <span th:if="${video.shenhe_type==3}">人工审</span> | 289 | + <span th:if="${video.shenhe_type!=0}">编审</span> |
| 290 | + <!--<span th:if="${video.shenhe_type==1}">免审</span>--> | ||
| 291 | + <!--<span th:if="${video.shenhe_type==2}">机审</span>--> | ||
| 292 | + <!--<span th:if="${video.shenhe_type==3}">人工审</span>--> | ||
| 292 | </td> | 293 | </td> |
| 293 | <td style="text-align: center; width: 10%;" | 294 | <td style="text-align: center; width: 10%;" |
| 294 | th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}"> | 295 | th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}"> |