Merge branch 'dev_vedio' into test6.9.0
Showing
4 changed files
with
30 additions
and
0 deletions
@@ -22,4 +22,6 @@ public interface QiniuLiveRecordMapper { | @@ -22,4 +22,6 @@ public interface QiniuLiveRecordMapper { | ||
22 | int insertInitRecord(QiniuLiveRecord record); | 22 | int insertInitRecord(QiniuLiveRecord record); |
23 | 23 | ||
24 | int updateVideoUrl(@Param("id")Integer id, @Param("vedioUrl")String vedioUrl, @Param("updateTime")Integer updateTime); | 24 | int updateVideoUrl(@Param("id")Integer id, @Param("vedioUrl")String vedioUrl, @Param("updateTime")Integer updateTime); |
25 | + | ||
26 | + List<QiniuLiveRecord> selectByTime(@Param("startTime")Integer startTime, @Param("endTime")Integer endTime); | ||
25 | } | 27 | } |
@@ -101,4 +101,9 @@ | @@ -101,4 +101,9 @@ | ||
101 | set video_url = #{vedioUrl,jdbcType=VARCHAR}, update_time =#{updateTime, jdbcType=INTEGER} | 101 | set video_url = #{vedioUrl,jdbcType=VARCHAR}, update_time =#{updateTime, jdbcType=INTEGER} |
102 | where id = #{id, jdbcType=INTEGER} | 102 | where id = #{id, jdbcType=INTEGER} |
103 | </update> | 103 | </update> |
104 | + | ||
105 | + <select id="selectByTime"> | ||
106 | + select id, order_code, start_time, end_time, camera_code from qiniu_live_record | ||
107 | + where create_time >= #{startTime, jdbcType=INTEGER} and create_time < #{endTime, jdbcType=INTEGER} and show_flag = 1 | ||
108 | + </select> | ||
104 | </mapper> | 109 | </mapper> |
1 | package com.yoho.ufo.order.controller; | 1 | package com.yoho.ufo.order.controller; |
2 | 2 | ||
3 | import com.yoho.order.model.BuyerOrderReq; | 3 | import com.yoho.order.model.BuyerOrderReq; |
4 | +import com.yoho.order.model.QiniuLiveRecord; | ||
4 | import com.yoho.ufo.exception.PlatformException; | 5 | import com.yoho.ufo.exception.PlatformException; |
5 | import com.yoho.ufo.order.service.impl.AsynVideoLiveService; | 6 | import com.yoho.ufo.order.service.impl.AsynVideoLiveService; |
6 | import com.yoho.ufo.order.service.impl.UfoLiveService; | 7 | import com.yoho.ufo.order.service.impl.UfoLiveService; |
@@ -141,4 +142,22 @@ public class UfoLiveController { | @@ -141,4 +142,22 @@ public class UfoLiveController { | ||
141 | 142 | ||
142 | return new ApiResponse.ApiResponseBuilder().code(result > 0 ? 200 : 400).message(result > 0 ? "更新成功" : "更新失败").build(); | 143 | return new ApiResponse.ApiResponseBuilder().code(result > 0 ? 200 : 400).message(result > 0 ? "更新成功" : "更新失败").build(); |
143 | } | 144 | } |
145 | + | ||
146 | + /** | ||
147 | + * 薛超使用的查询系统中当前时间段的录制视频的任务 | ||
148 | + * 包含StartTime 不含EndTime | ||
149 | + * @param req | ||
150 | + * @return | ||
151 | + */ | ||
152 | + @RequestMapping(value = "/queryVideoInfo") | ||
153 | + public ApiResponse queryVideoInfo(QNliveReq req) { | ||
154 | + LOGGER.info("queryVideoInfo method in. req is {}", req); | ||
155 | + | ||
156 | + if (null == req.getStartTime() || null == req.getEndTime() || req.getEndTime() - req.getStartTime() > 86400) { | ||
157 | + return new ApiResponse.ApiResponseBuilder().code(500).message("时间格式不对").build(); | ||
158 | + } | ||
159 | + | ||
160 | + List<QiniuLiveRecord> result = ufoLiveService.queryVideoInfo(req.getStartTime(), req.getEndTime()); | ||
161 | + return new ApiResponse.ApiResponseBuilder().code(200).data(result).build(); | ||
162 | + } | ||
144 | } | 163 | } |
@@ -266,4 +266,8 @@ public class UfoLiveService { | @@ -266,4 +266,8 @@ public class UfoLiveService { | ||
266 | public int updateVideoUrl(Integer id, String vedioUrl) { | 266 | public int updateVideoUrl(Integer id, String vedioUrl) { |
267 | return qiniuLiveRecordMapper.updateVideoUrl(id, vedioUrl, DateUtil.getCurrentTimeSeconds()); | 267 | return qiniuLiveRecordMapper.updateVideoUrl(id, vedioUrl, DateUtil.getCurrentTimeSeconds()); |
268 | } | 268 | } |
269 | + | ||
270 | + public List<QiniuLiveRecord> queryVideoInfo(Integer startTime, Integer endTime) { | ||
271 | + return qiniuLiveRecordMapper.selectByTime(startTime, endTime); | ||
272 | + } | ||
269 | } | 273 | } |
-
Please register or login to post a comment