Commit 849fc78a8cb503d4baaf749cd1ea5b9a75ca7fa7
1 parent
1a917a08
直播审核
Showing
8 changed files
with
917 additions
and
333 deletions
src/main/java/com/cnlive/shenhe/api/LiveControllerApi.java
| ... | ... | @@ -86,6 +86,7 @@ public class LiveControllerApi { |
| 86 | 86 | shylive1.setSp_id(spId);//设置spid |
| 87 | 87 | shyLive.setActivity_name(activityName);//设置直播活动名称 |
| 88 | 88 | shyLive.setActivity_status(activityStatus);//设置直播活动状态 |
| 89 | + shyLive.setIs_hot(2);//是否是热点: 1:不是 ,2: 是 | |
| 89 | 90 | if(activityStatus==3){//发布直播 |
| 90 | 91 | shyLive.setActivity_start_time(timestamp_start); |
| 91 | 92 | shyLive.setActivity_end_time(timestamp_end); |
| ... | ... | @@ -94,18 +95,19 @@ public class LiveControllerApi { |
| 94 | 95 | }else if(activityStatus==2){//停止直播 |
| 95 | 96 | shyLive.setActivity_end_time(CommonUtils.getCurrentTime()); |
| 96 | 97 | shyLive.setPlayback_url(playbackUrl);//回放地址 |
| 97 | - shyLive.setShenhe_state(3);//状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 98 | + shyLive.setShenhe_state(2);//状态 0:未认领 1.已领未审,2:已审 | |
| 99 | + shyLive.setIs_hot(1);//是否是热点: 1:不是 ,2: 是 | |
| 98 | 100 | } |
| 99 | 101 | shyLive.setActivity_intro(activityIntro);//直播活动简介 |
| 100 | 102 | shyLive.setM3u8_url(hlsUrl);//m3u8直播流 |
| 101 | 103 | shyLive.setRtmp_url(mp4Url);//rtmp直播流 |
| 102 | 104 | shyLive.setCallback(callback);//回调地址 |
| 103 | 105 | shyLive.setCover_img_url(coverImgUrl);//封面 |
| 104 | - shyLive.setIs_hot(is_hot);//是否热点(优先级) | |
| 105 | 106 | shyLive.setShenhe_type(3);//审核类型,1:免审,2:机审,3:人工审 |
| 106 | 107 | shyLive.setAvsample_state(1);//抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败 |
| 107 | 108 | if(activityStatus==0){//直播撤销 |
| 108 | 109 | shyLive.setIs_show(0);//是否显示 0:不显示 1:显示 |
| 110 | + shyLive.setIs_hot(1);//是否是热点: 1:不是 ,2: 是 | |
| 109 | 111 | }else{ |
| 110 | 112 | shyLive.setIs_show(1); |
| 111 | 113 | } |
| ... | ... | @@ -119,7 +121,8 @@ public class LiveControllerApi { |
| 119 | 121 | shylive1.setActivity_status(activityStatus);//设置直播活动状态 |
| 120 | 122 | shylive1.setChannel_id(channelId);//设置直播频道 |
| 121 | 123 | shylive1.setSp_id(spId);//设置spid |
| 122 | - shylive1.setShenhe_state(1);//状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 124 | + shylive1.setShenhe_state(0); //状态 0:未认领 1.已领未审,2:已审 | |
| 125 | + shylive1.setIs_hot(2);//是否是热点: 1:不是 ,2: 是 | |
| 123 | 126 | if(activityStatus==3){//发布直播 |
| 124 | 127 | shylive1.setActivity_start_time(timestamp_start); |
| 125 | 128 | shylive1.setActivity_end_time(timestamp_end); |
| ... | ... | @@ -130,18 +133,19 @@ public class LiveControllerApi { |
| 130 | 133 | shylive1.setActivity_start_time(timestamp_start); |
| 131 | 134 | shylive1.setActivity_end_time(CommonUtils.getCurrentTime()); |
| 132 | 135 | shylive1.setPlayback_url(playbackUrl);//回放地址 |
| 133 | - shylive1.setShenhe_state(3);//状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 136 | + shylive1.setShenhe_state(2); //状态 0:未认领 1.已领未审,2:已审 | |
| 137 | + shylive1.setIs_hot(1);//是否是热点: 1:不是 ,2: 是 | |
| 134 | 138 | } |
| 135 | 139 | shylive1.setActivity_intro(activityIntro);//直播活动简介 |
| 136 | 140 | shylive1.setM3u8_url(hlsUrl);//m3u8直播流 |
| 137 | 141 | shylive1.setRtmp_url(mp4Url);//rtmp直播流 |
| 138 | 142 | shylive1.setCallback(callback);//回调地址 |
| 139 | 143 | shylive1.setCover_img_url(coverImgUrl);//封面 |
| 140 | - shylive1.setIs_hot(is_hot);//是否热点(优先级) | |
| 141 | 144 | shylive1.setShenhe_type(3);//审核类型,1:免审,2:机审,3:人工审 |
| 142 | 145 | shylive1.setAvsample_state(1);//抽帧状态 1:不抽帧 2:待抽帧 3:抽帧中 4:抽帧完成 5:抽帧失败 |
| 143 | 146 | if(activityStatus==0){//直播撤销 |
| 144 | 147 | shylive1.setIs_show(0);//是否显示 0:不显示 1:显示 |
| 148 | + shylive1.setIs_hot(1);//是否是热点: 1:不是 ,2: 是 | |
| 145 | 149 | }else{ |
| 146 | 150 | shylive1.setIs_show(1); |
| 147 | 151 | } | ... | ... |
src/main/java/com/cnlive/shenhe/controller/LiveController.java
| ... | ... | @@ -116,13 +116,41 @@ public class LiveController { |
| 116 | 116 | * @return |
| 117 | 117 | */ |
| 118 | 118 | @GetMapping("/page") |
| 119 | - public Object getListVideos(Model model, String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, HttpSession session) { | |
| 119 | + public Object getListVideos(Model model,String activity_id,String start_date,String end_date, | |
| 120 | + String activity_name, Integer activity_status, Integer page,Integer pageSize, | |
| 121 | + Integer shenhe_state, String orderByClause, String sp_desc, HttpSession session) { | |
| 120 | 122 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 121 | 123 | if(CommonUtils.isNull(sessionUser)){ |
| 122 | 124 | return "redirect:/users/login"; |
| 123 | 125 | } |
| 124 | - | |
| 125 | - return "page/videoStream.html"; | |
| 126 | + Integer spid = sessionUser.getSpid(); | |
| 127 | + String userId = sessionUser.getUserId(); | |
| 128 | + if (CommonUtils.isNull(page)) page = 1; | |
| 129 | + if (CommonUtils.isNull(pageSize)) pageSize = 60; | |
| 130 | + if (CommonUtils.isNotEmpty(sp_desc) && spid == 0) { | |
| 131 | + ShySites shySite=sitesService.findspidBySpdesc(sp_desc); | |
| 132 | + if(CommonUtils.isNotNull(shySite)){ | |
| 133 | + spid = shySite.getSpid(); | |
| 134 | + }else{ | |
| 135 | + return "page/sitesError.html"; | |
| 136 | + } | |
| 137 | + } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) { | |
| 138 | + spid = null; | |
| 139 | + } | |
| 140 | + PageInfo<ShyLive> livePage = liveService.getListContent(activity_name, start_date,end_date, | |
| 141 | + activity_id, activity_status, page, pageSize, shenhe_state, orderByClause, spid, userId); | |
| 142 | + List<ShyLive> list = livePage.getList(); | |
| 143 | + if (!list.isEmpty()) { | |
| 144 | + for (ShyLive live : list) { | |
| 145 | + //显示spid简称 | |
| 146 | + ShySites shySites = sitesService.findspidDescByspid(live.getSp_id()); | |
| 147 | + if (CommonUtils.isNotNull(shySites)) { | |
| 148 | + live.setSpid_desc(shySites.getName()); | |
| 149 | + } | |
| 150 | + } | |
| 151 | + } | |
| 152 | + model.addAttribute("livePage", livePage); | |
| 153 | + return "page/live.html"; | |
| 126 | 154 | } |
| 127 | 155 | |
| 128 | 156 | /** |
| ... | ... | @@ -170,9 +198,9 @@ public class LiveController { |
| 170 | 198 | if (CommonUtils.isNotEmpty(ids)) { |
| 171 | 199 | String[] cids = ids.split(","); |
| 172 | 200 | for (String cid : cids) { |
| 173 | - ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 174 | - if (CommonUtils.isNotNull(shyVideos)) { | |
| 175 | - if (shyVideos.getState() != CommonConst.AUDIT_INTT || shyVideos.getReceive()==CommonConst.RECEIVE_AFTER) { | |
| 201 | + ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 202 | + if (CommonUtils.isNotNull(shyLive)) { | |
| 203 | + if (shyLive.getShenhe_state() != CommonConst.RECEIVE_BEFORE ) { | |
| 176 | 204 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); |
| 177 | 205 | } |
| 178 | 206 | } else { |
| ... | ... | @@ -181,7 +209,7 @@ public class LiveController { |
| 181 | 209 | } |
| 182 | 210 | } |
| 183 | 211 | } |
| 184 | - Integer n = videosService.receive(ids, num, userId, spid); | |
| 212 | + Integer n = liveService.receive(ids, num, userId, spid); | |
| 185 | 213 | return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "认领到" + n + "条内容"); |
| 186 | 214 | } |
| 187 | 215 | |
| ... | ... | @@ -200,174 +228,12 @@ public class LiveController { |
| 200 | 228 | //在退领操作前先判断是否包含已退领或者已经审核的数据,有则退回检查并重新退领 |
| 201 | 229 | String[] cids = ids.split(","); |
| 202 | 230 | for (String cid : cids) { |
| 203 | - ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 204 | - if (shyVideos.getState() != CommonConst.AUDIT_INTT || shyVideos.getReceive()==CommonConst.RECEIVE_BEFORE || !shyVideos.getReceive_user_id().equals(userId)) { | |
| 231 | + ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 232 | + if (shyLive.getShenhe_state() != CommonConst.RECEIVE_AFTER || !shyLive.getAuditor().equals(userId)) { | |
| 205 | 233 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); |
| 206 | 234 | } |
| 207 | 235 | } |
| 208 | - return videosService.retReceive(ids, userId); | |
| 209 | - } | |
| 210 | - | |
| 211 | - /** | |
| 212 | - * 根据条件导出excel | |
| 213 | - * | |
| 214 | - * @param video_title | |
| 215 | - * @param start_date | |
| 216 | - * @param end_date | |
| 217 | - * @param state | |
| 218 | - * @param receive | |
| 219 | - * @param video_priority | |
| 220 | - * @param orderByClause | |
| 221 | - * @param session | |
| 222 | - * @param response | |
| 223 | - */ | |
| 224 | - @GetMapping("excel") | |
| 225 | - public void getExcel(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, HttpSession session, HttpServletResponse response) { | |
| 226 | - SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 227 | - Integer spid = sessionUser.getSpid(); | |
| 228 | - String userId = sessionUser.getUserId(); | |
| 229 | - if (spid == 0) spid = null; | |
| 230 | - List<ShyVideos> shyVideosList = videosService.findByCondition(video_title, start_date, end_date, state, receive, video_priority, orderByClause, spid, userId); | |
| 231 | - String fileName = "点播数据"; | |
| 232 | - String updater = "";//审核员名字 | |
| 233 | - String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核 | |
| 234 | - XSSFWorkbook wb = new XSSFWorkbook(); | |
| 235 | - ServletOutputStream out = null; | |
| 236 | - BufferedInputStream bis = null; | |
| 237 | - BufferedOutputStream bos = null; | |
| 238 | - try { | |
| 239 | - XSSFSheet sheetlist = wb.createSheet(fileName); | |
| 240 | - XSSFRow row = sheetlist.createRow(0);//行 | |
| 241 | - XSSFCell cell = row.createCell(0);//列 | |
| 242 | - cell.setCellValue("id"); | |
| 243 | - cell = row.createCell(1);//列 | |
| 244 | - cell.setCellValue("标题"); | |
| 245 | - cell = row.createCell(2);//列 | |
| 246 | - cell.setCellValue("视频地址"); | |
| 247 | - cell = row.createCell(3);//列 | |
| 248 | - cell.setCellValue("标题图"); | |
| 249 | - cell = row.createCell(4);//列 | |
| 250 | - cell.setCellValue("视频标签"); | |
| 251 | - cell = row.createCell(5);//列 | |
| 252 | - cell.setCellValue("审核员"); | |
| 253 | - cell = row.createCell(6);//增加一列 | |
| 254 | - cell.setCellValue("常用审核意见"); | |
| 255 | - cell = row.createCell(7);//列 | |
| 256 | - cell.setCellValue("审核意见"); | |
| 257 | - cell = row.createCell(8);//列 | |
| 258 | - cell.setCellValue("状态"); | |
| 259 | - cell = row.createCell(9);//列 | |
| 260 | - cell.setCellValue("视频关键字"); | |
| 261 | - cell = row.createCell(10);//列 | |
| 262 | - cell.setCellValue("视频简介"); | |
| 263 | - cell = row.createCell(11);//列 | |
| 264 | - cell.setCellValue("视频id"); | |
| 265 | - cell = row.createCell(12);//列 | |
| 266 | - cell.setCellValue("创建时间"); | |
| 267 | - cell = row.createCell(13);//列 | |
| 268 | - cell.setCellValue("视频上传时间"); | |
| 269 | - cell = row.createCell(14);//列 | |
| 270 | - cell.setCellValue("视频时长(秒)"); | |
| 271 | - cell = row.createCell(15);//列 | |
| 272 | - cell.setCellValue("spid"); | |
| 273 | - cell = row.createCell(16);//列 | |
| 274 | - cell.setCellValue("sp简称"); | |
| 275 | - | |
| 276 | - for (int i = 0; i < shyVideosList.size(); i++) { | |
| 277 | - row = sheetlist.createRow((short) (i + 1));//行 | |
| 278 | - cell = row.createCell(0);//列 | |
| 279 | - cell.setCellValue(shyVideosList.get(i).getId()); | |
| 280 | - cell = row.createCell(1);//列 | |
| 281 | - cell.setCellValue(shyVideosList.get(i).getVideo_title()); | |
| 282 | - cell = row.createCell(2);//列 | |
| 283 | - cell.setCellValue(shyVideosList.get(i).getVideo_url()); | |
| 284 | - cell = row.createCell(3);//列 | |
| 285 | - cell.setCellValue(shyVideosList.get(i).getVideo_poster()); | |
| 286 | - cell = row.createCell(4);//列 | |
| 287 | - cell.setCellValue(shyVideosList.get(i).getVideo_tags()); | |
| 288 | - cell = row.createCell(5);//列 | |
| 289 | - /* 审核员需要做处理*/ | |
| 290 | - if (shyVideosList.get(i).getState() != CommonConst.AUDIT_INTT) { | |
| 291 | - updater = CommonUtils.isEmpty(shyVideosList.get(i).getUpdater()) || "null".equals(shyVideosList.get(i).getUpdater())? "白名单":shyVideosList.get(i).getUpdater(); | |
| 292 | - String auditor_id = shyVideosList.get(i).getAuditor_id(); | |
| 293 | - if (CommonUtils.isNotEmpty(auditor_id)) { | |
| 294 | - ShyUsers user = new ShyUsers(); | |
| 295 | - user.setUser_id(auditor_id); | |
| 296 | - user = usersService.select(user); | |
| 297 | - if (CommonUtils.isNotNull(user)) { | |
| 298 | - String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail(); | |
| 299 | - String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername(); | |
| 300 | - updater = userName ; | |
| 301 | - } | |
| 302 | - } | |
| 303 | - } | |
| 304 | - cell.setCellValue(updater); | |
| 305 | - cell = row.createCell(6);//列、增加一列 | |
| 306 | - cell.setCellValue(shyVideosList.get(i).getAttr_tags()); | |
| 307 | - cell = row.createCell(7);//列 | |
| 308 | - cell.setCellValue(shyVideosList.get(i).getMsg()); | |
| 309 | - cell = row.createCell(8);//列 | |
| 310 | - /*状态需要处理成用户可读*/ | |
| 311 | - if (shyVideosList.get(i).getState() == 0) { | |
| 312 | - state1 = "未审核"; | |
| 313 | - } else if (shyVideosList.get(i).getState() == 1) { | |
| 314 | - state1 = "已审核"; | |
| 315 | - } else { | |
| 316 | - state1 = "审核拒绝"; | |
| 317 | - } | |
| 318 | - cell.setCellValue(state1); | |
| 319 | - cell = row.createCell(9);//列 | |
| 320 | - cell.setCellValue(shyVideosList.get(i).getVideo_keyword()); | |
| 321 | - cell = row.createCell(10);//列 | |
| 322 | - cell.setCellValue(shyVideosList.get(i).getVideo_desc()); | |
| 323 | - cell = row.createCell(11);//列 | |
| 324 | - cell.setCellValue(shyVideosList.get(i).getVideo_id()); | |
| 325 | - cell = row.createCell(12);//列 | |
| 326 | - cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getCreated_at(), "yyyy-MM-dd HH:mm:ss")); | |
| 327 | - cell = row.createCell(13);//列 | |
| 328 | - cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getVideo_upload_time(), "yyyy-MM-dd HH:mm:ss")); | |
| 329 | - cell = row.createCell(14);//列 | |
| 330 | - cell.setCellValue(shyVideosList.get(i).getDuration()); | |
| 331 | - cell = row.createCell(15);//列 | |
| 332 | - cell.setCellValue(shyVideosList.get(i).getSpid()); | |
| 333 | - cell = row.createCell(16);//列 | |
| 334 | - cell.setCellValue(sitesService.findspidDescByspid(shyVideosList.get(i).getSpid()).getName()); | |
| 335 | - } | |
| 336 | - | |
| 337 | - ByteArrayOutputStream os = new ByteArrayOutputStream(); | |
| 338 | - wb.write(os); | |
| 339 | - byte[] content = os.toByteArray(); | |
| 340 | - InputStream is = new ByteArrayInputStream(content); | |
| 341 | - response.setContentType("application/vnd.ms-excel;charset=utf-8"); | |
| 342 | - response.setHeader("Content-Disposition", "attachment;filename=" + new String((fileName + ".xlsx").getBytes(), "iso-8859-1")); | |
| 343 | - out = response.getOutputStream(); | |
| 344 | - bis = new BufferedInputStream(is); | |
| 345 | - bos = new BufferedOutputStream(out); | |
| 346 | - byte[] buff = new byte[2048]; | |
| 347 | - int bytesRead; | |
| 348 | - while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) { | |
| 349 | - bos.write(buff, 0, bytesRead); | |
| 350 | - } | |
| 351 | - } catch (final Exception e) { | |
| 352 | - e.printStackTrace(); | |
| 353 | - try { | |
| 354 | - if (bis != null) | |
| 355 | - bis.close(); | |
| 356 | - if (bos != null) | |
| 357 | - bos.close(); | |
| 358 | - } catch (Exception e1) { | |
| 359 | - e1.printStackTrace(); | |
| 360 | - } | |
| 361 | - } finally { | |
| 362 | - try { | |
| 363 | - if (bis != null) | |
| 364 | - bis.close(); | |
| 365 | - if (bos != null) | |
| 366 | - bos.close(); | |
| 367 | - } catch (Exception e2) { | |
| 368 | - e2.printStackTrace(); | |
| 369 | - } | |
| 370 | - } | |
| 236 | + return liveService.retReceive(ids, userId); | |
| 371 | 237 | } |
| 372 | 238 | |
| 373 | 239 | /** |
| ... | ... | @@ -388,26 +254,26 @@ public class LiveController { |
| 388 | 254 | String showMsg = ""; |
| 389 | 255 | for (String shyLiveId : shyLiveIds) { |
| 390 | 256 | ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(shyLiveId)); |
| 391 | - JSONObject result = null; | |
| 392 | - try { | |
| 393 | - result = Pass.auditPass(shyLive.getActivity_id(), 6, msg, msg, shyLive.getCallback()); | |
| 394 | - } catch (Exception e) { | |
| 395 | - logger.error("直播视频审核失败,id==" + shyLiveId, e); | |
| 396 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 397 | - break; | |
| 398 | - } | |
| 399 | - if (result == null) { | |
| 400 | - logger.error("直播视频审核失败且接口错误没有返回信息,id==" + shyLiveId); | |
| 401 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 402 | - break; | |
| 403 | - } | |
| 404 | - Integer code = result.getInteger("code"); | |
| 405 | - if (code != 0) { | |
| 406 | - logger.error("直播视频审核失败,id:{},code:{}", shyLiveId, code); | |
| 407 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " " + result.getString("msg"); | |
| 408 | - break; | |
| 409 | - } | |
| 410 | - int i = liveService.updateLive(Integer.parseInt(shyLiveId), userId,null,"", 4, msg); | |
| 257 | +// JSONObject result = null; | |
| 258 | +// try { | |
| 259 | +// result = Pass.auditPass(shyLive.getActivity_id(), 6, msg, msg, shyLive.getCallback()); | |
| 260 | +// } catch (Exception e) { | |
| 261 | +// logger.error("直播视频审核失败,id==" + shyLiveId, e); | |
| 262 | +// showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 263 | +// break; | |
| 264 | +// } | |
| 265 | +// if (result == null) { | |
| 266 | +// logger.error("直播视频审核失败且接口错误没有返回信息,id==" + shyLiveId); | |
| 267 | +// showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 268 | +// break; | |
| 269 | +// } | |
| 270 | +// Integer code = result.getInteger("code"); | |
| 271 | +// if (code != 0) { | |
| 272 | +// logger.error("直播视频审核失败,id:{},code:{}", shyLiveId, code); | |
| 273 | +// showMsg = showMsg + "," + shyLive.getActivity_id() + " " + result.getString("msg"); | |
| 274 | +// break; | |
| 275 | +// } | |
| 276 | + int i = liveService.updateLive(Integer.parseInt(shyLiveId), userId,"", 4, msg); | |
| 411 | 277 | if (i == 0) { |
| 412 | 278 | showMsg = showMsg + "," + shyLive.getActivity_id() + " 更新失败"; |
| 413 | 279 | break; | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShyLive.java
| ... | ... | @@ -29,7 +29,7 @@ public class ShyLive { |
| 29 | 29 | private String activity_name; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销 | |
| 32 | + * 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制) | |
| 33 | 33 | */ |
| 34 | 34 | private Integer activity_status; |
| 35 | 35 | |
| ... | ... | @@ -84,7 +84,7 @@ public class ShyLive { |
| 84 | 84 | private Integer shenhe_type; |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | - * 状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 87 | + * 状态 0:未认领 1.已认领,2:已审核 | |
| 88 | 88 | */ |
| 89 | 89 | private Integer shenhe_state; |
| 90 | 90 | |
| ... | ... | @@ -136,6 +136,9 @@ public class ShyLive { |
| 136 | 136 | * 抽帧返回信息(主要找问题时使用) |
| 137 | 137 | */ |
| 138 | 138 | private String avsample_msg; |
| 139 | + | |
| 140 | + @Transient | |
| 141 | + private String spid_desc; | |
| 139 | 142 | |
| 140 | 143 | /** |
| 141 | 144 | * @return id |
| ... | ... | @@ -224,18 +227,18 @@ public class ShyLive { |
| 224 | 227 | } |
| 225 | 228 | |
| 226 | 229 | /** |
| 227 | - * 获取直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销 | |
| 230 | + * 获取直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制) | |
| 228 | 231 | * |
| 229 | - * @return activity_status - 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销 | |
| 232 | + * @return activity_status - 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制) | |
| 230 | 233 | */ |
| 231 | 234 | public Integer getActivity_status() { |
| 232 | 235 | return activity_status; |
| 233 | 236 | } |
| 234 | 237 | |
| 235 | 238 | /** |
| 236 | - * 设置直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销 | |
| 239 | + * 设置直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制) | |
| 237 | 240 | * |
| 238 | - * @param activity_status 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销 | |
| 241 | + * @param activity_status 直播活动状态,1:直播中,2:直播完成,3:待直播,0:直播撤销(手动),4:直播下线(强制) | |
| 239 | 242 | */ |
| 240 | 243 | public void setActivity_status(Integer activity_status) { |
| 241 | 244 | this.activity_status = activity_status; |
| ... | ... | @@ -422,18 +425,18 @@ public class ShyLive { |
| 422 | 425 | } |
| 423 | 426 | |
| 424 | 427 | /** |
| 425 | - * 获取状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 428 | + * 获取状态 1:未认领 2.已认领,3:已审核 | |
| 426 | 429 | * |
| 427 | - * @return shenhe_state - 状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 430 | + * @return shenhe_state - 状态 1:未认领 2.已认领,3:已审核 | |
| 428 | 431 | */ |
| 429 | 432 | public Integer getShenhe_state() { |
| 430 | 433 | return shenhe_state; |
| 431 | 434 | } |
| 432 | 435 | |
| 433 | 436 | /** |
| 434 | - * 设置状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 437 | + * 设置状态 1:未认领 2.已认领,3:已审核 | |
| 435 | 438 | * |
| 436 | - * @param shenhe_state 状态 1:未认领 2.已领未审,3:已审通过,4:已审拒绝 | |
| 439 | + * @param shenhe_state 状态 1:未认领 2.已认领,3:已审核 | |
| 437 | 440 | */ |
| 438 | 441 | public void setShenhe_state(Integer shenhe_state) { |
| 439 | 442 | this.shenhe_state = shenhe_state; |
| ... | ... | @@ -628,4 +631,13 @@ public class ShyLive { |
| 628 | 631 | public void setAvsample_msg(String avsample_msg) { |
| 629 | 632 | this.avsample_msg = avsample_msg; |
| 630 | 633 | } |
| 634 | + | |
| 635 | + public String getSpid_desc() { | |
| 636 | + return spid_desc; | |
| 637 | + } | |
| 638 | + | |
| 639 | + public void setSpid_desc(String spid_desc) { | |
| 640 | + this.spid_desc = spid_desc; | |
| 641 | + } | |
| 642 | + | |
| 631 | 643 | } |
| 632 | 644 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/LiveServiceImpl.java
| ... | ... | @@ -108,71 +108,76 @@ public class LiveServiceImpl { |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | //============== |
| 111 | - public int updateLive(Integer id, String auditor_id,String updater,String attr_tags, Integer state, String msg) { | |
| 111 | + public int updateLive(Integer id, String auditor_id,String updater, Integer activity_status, String msg) { | |
| 112 | 112 | ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id); |
| 113 | 113 | shyLive.setAuditor(auditor_id); |
| 114 | - shyLive.setShenhe_state(state); | |
| 114 | + shyLive.setShenhe_state(CommonConst.RECEIVE_AUDIT); | |
| 115 | + shyLive.setActivity_status(activity_status); | |
| 115 | 116 | shyLive.setShenhe_msg(msg); |
| 116 | 117 | shyLive.setUpdater(updater); |
| 117 | 118 | return shyLiveMapper.updateByPrimaryKey(shyLive); |
| 118 | 119 | } |
| 119 | 120 | |
| 120 | - public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId) { | |
| 121 | - Example example = new Example(ShyVideos.class); | |
| 121 | + //=============== | |
| 122 | + public PageInfo<ShyLive> getListContent(String activity_name, String start_date, String end_date, | |
| 123 | + String activity_id, Integer activity_status, Integer page, Integer pageSize, | |
| 124 | + Integer shenhe_state, String orderByClause, Integer spid, String userId) { | |
| 125 | + Example example = new Example(ShyLive.class); | |
| 122 | 126 | Example.Criteria criteria = example.createCriteria(); |
| 123 | - Example.Criteria criteria2 = example.createCriteria(); | |
| 127 | +// Example.Criteria criteria2 = example.createCriteria(); | |
| 124 | 128 | if (CommonUtils.isNotEmpty(orderByClause)) { |
| 125 | 129 | example.setOrderByClause(orderByClause); |
| 126 | 130 | } |
| 127 | - if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) { | |
| 131 | + if (CommonUtils.isNotEmpty(start_date)) { | |
| 128 | 132 | Timestamp startdate = null; |
| 129 | - Timestamp enddate = null; | |
| 130 | 133 | try { |
| 131 | -// startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd HH:mm:ss"); | |
| 132 | -// enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd HH:mm:ss"); | |
| 133 | - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd"); | |
| 134 | - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); | |
| 134 | + startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd HH:mm"); | |
| 135 | 135 | } catch (ParseException e) { |
| 136 | 136 | e.printStackTrace(); |
| 137 | 137 | } |
| 138 | - criteria.andGreaterThanOrEqualTo("created_at", startdate); | |
| 139 | - criteria2.andGreaterThanOrEqualTo("created_at", startdate); | |
| 140 | - criteria.andLessThanOrEqualTo("created_at", enddate); | |
| 141 | - criteria2.andLessThanOrEqualTo("created_at", enddate); | |
| 138 | + criteria.andGreaterThanOrEqualTo("activity_start_time", startdate); | |
| 139 | +// criteria2.andGreaterThanOrEqualTo("activity_start_time", startdate); | |
| 142 | 140 | } |
| 143 | - if (CommonUtils.isNotEmpty(video_title)) { | |
| 144 | - criteria.andLike("video_title", "%" + video_title + "%"); | |
| 145 | - criteria2.andLike("video_title", "%" + video_title + "%"); | |
| 141 | + if ( CommonUtils.isNotEmpty(end_date)) { | |
| 142 | + Timestamp enddate = null; | |
| 143 | + try { | |
| 144 | + enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd HH:mm"); | |
| 145 | + } catch (ParseException e) { | |
| 146 | + e.printStackTrace(); | |
| 147 | + } | |
| 148 | + criteria.andLessThanOrEqualTo("activity_end_time", enddate); | |
| 149 | +// criteria2.andLessThanOrEqualTo("activity_end_time", enddate); | |
| 150 | + } | |
| 151 | + if (CommonUtils.isNotEmpty(activity_name)) { | |
| 152 | + criteria.andLike("activity_name", "%" + activity_name + "%"); | |
| 153 | +// criteria2.andLike("activity_name", "%" + activity_name + "%"); | |
| 146 | 154 | } |
| 147 | 155 | |
| 148 | - if (CommonUtils.isNotEmpty(video_priority)) { | |
| 149 | - criteria.andEqualTo("video_priority", video_priority); | |
| 150 | - criteria2.andEqualTo("video_priority", video_priority); | |
| 156 | + if (CommonUtils.isNotEmpty(activity_id)) { | |
| 157 | + criteria.andEqualTo("activity_id", activity_id); | |
| 158 | +// criteria2.andEqualTo("activity_id", activity_id); | |
| 151 | 159 | } |
| 152 | 160 | if (CommonUtils.isNotNull(spid)) { |
| 153 | 161 | criteria.andEqualTo("spid", spid); |
| 154 | - criteria2.andEqualTo("spid", spid); | |
| 162 | +// criteria2.andEqualTo("spid", spid); | |
| 155 | 163 | } |
| 156 | - if (CommonUtils.isNotNull(receive)) { | |
| 157 | - criteria.andEqualTo("receive", receive); | |
| 158 | - criteria2.andEqualTo("receive", receive); | |
| 159 | - if (receive == CommonConst.RECEIVE_AFTER) { | |
| 160 | - criteria.andEqualTo("receive_user_id", userId); | |
| 161 | - criteria2.andEqualTo("receive_user_id", userId); | |
| 164 | + if (CommonUtils.isNotNull(shenhe_state)) { | |
| 165 | + criteria.andEqualTo("shenhe_state", shenhe_state); | |
| 166 | +// criteria2.andEqualTo("shenhe_state", shenhe_state); | |
| 167 | + if (shenhe_state != CommonConst.RECEIVE_BEFORE) { | |
| 168 | + criteria.andEqualTo("auditor", userId); | |
| 169 | +// criteria2.andEqualTo("auditor", userId); | |
| 162 | 170 | } |
| 163 | 171 | } |
| 164 | - if (CommonUtils.isNotNull(state) && state == 0) { | |
| 165 | - criteria.andEqualTo("state", state); | |
| 166 | - } else if (CommonUtils.isNotNull(state) && state == 1) { | |
| 167 | - criteria.andEqualTo("state", state); | |
| 168 | - criteria2.andEqualTo("state", 2); | |
| 169 | - example.or(criteria2); | |
| 170 | - } | |
| 171 | - //默认按上传时间倒序排序 | |
| 172 | - example.setOrderByClause("created_at desc"); | |
| 172 | + if (CommonUtils.isNotNull(activity_status) ) { | |
| 173 | + criteria.andEqualTo("activity_status", activity_status); | |
| 174 | + } | |
| 175 | + criteria.andEqualTo("is_show", 1); | |
| 176 | + //排序 | |
| 177 | + example.setOrderByClause("is_hot desc, activity_start_time asc"); | |
| 173 | 178 | PageHelper.startPage(page, pageSize, true); |
| 174 | - List<ShyVideos> shyVideosList = shyVideosMapper.selectByExample(example); | |
| 175 | - PageInfo<ShyVideos> pageInfo = new PageInfo<>(shyVideosList); | |
| 179 | + List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example); | |
| 180 | + PageInfo<ShyLive> pageInfo = new PageInfo<>(shyLiveList); | |
| 176 | 181 | return pageInfo; |
| 177 | 182 | } |
| 178 | 183 | |
| ... | ... | @@ -194,31 +199,31 @@ public class LiveServiceImpl { |
| 194 | 199 | return shyVideos; |
| 195 | 200 | } |
| 196 | 201 | |
| 202 | + //==================== | |
| 197 | 203 | public Integer receive(String ids, Integer num, String userId, Integer spid) { |
| 198 | 204 | Integer n = 0; |
| 199 | 205 | if (CommonUtils.isNotEmpty(ids)) { |
| 200 | 206 | String[] cids = ids.split(","); |
| 201 | 207 | for (String cid : cids) { |
| 202 | - ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 203 | - if (CommonUtils.isNotNull(shyVideos) && shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive()==CommonConst.RECEIVE_BEFORE) { | |
| 204 | - shyVideos.setReceive_user_id(userId); | |
| 205 | - shyVideos.setReceive(CommonConst.RECEIVE_AFTER); | |
| 206 | - shyVideosMapper.updateByPrimaryKeySelective(shyVideos); | |
| 208 | + ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 209 | + if (CommonUtils.isNotNull(shyLive) && shyLive.getShenhe_state() == CommonConst.RECEIVE_BEFORE ) { | |
| 210 | + shyLive.setAuditor(userId);; | |
| 211 | + shyLive.setShenhe_state(CommonConst.RECEIVE_AFTER); | |
| 212 | + shyLiveMapper.updateByPrimaryKeySelective(shyLive); | |
| 207 | 213 | n++; |
| 208 | 214 | } |
| 209 | 215 | } |
| 210 | 216 | } else if (CommonUtils.isNotNull(num) && num > 0) { |
| 211 | - Example example = new Example(ShyVideos.class); | |
| 212 | - example.setOrderByClause("created_at desc"); | |
| 213 | - example.and().andEqualTo("state", CommonConst.AUDIT_INTT); | |
| 214 | - example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); | |
| 217 | + Example example = new Example(ShyLive.class); | |
| 218 | + example.setOrderByClause("is_hot desc, activity_start_time asc"); | |
| 219 | + example.and().andEqualTo("shenhe_state", CommonConst.RECEIVE_BEFORE); | |
| 215 | 220 | if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); |
| 216 | - List<ShyVideos> shyCommentsList = shyVideosMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); | |
| 217 | - if (!shyCommentsList.isEmpty()) { | |
| 218 | - for (ShyVideos shyComments : shyCommentsList) { | |
| 219 | - shyComments.setReceive_user_id(userId); | |
| 220 | - shyComments.setReceive(CommonConst.RECEIVE_AFTER); | |
| 221 | - shyVideosMapper.updateByPrimaryKeySelective(shyComments); | |
| 221 | + List<ShyLive> shyLiveList = shyLiveMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); | |
| 222 | + if (!shyLiveList.isEmpty()) { | |
| 223 | + for (ShyLive shyLive : shyLiveList) { | |
| 224 | + shyLive.setAuditor(userId); | |
| 225 | + shyLive.setShenhe_state(CommonConst.RECEIVE_AFTER); | |
| 226 | + shyLiveMapper.updateByPrimaryKeySelective(shyLive); | |
| 222 | 227 | n++; |
| 223 | 228 | } |
| 224 | 229 | } |
| ... | ... | @@ -226,15 +231,15 @@ public class LiveServiceImpl { |
| 226 | 231 | return n; |
| 227 | 232 | } |
| 228 | 233 | |
| 234 | + //================ | |
| 229 | 235 | public ResponseBean retReceive(String ids, String userId) { |
| 230 | - boolean result = true; | |
| 231 | 236 | String[] cids = ids.split(","); |
| 232 | 237 | for (String cid : cids) { |
| 233 | - ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 234 | - if (shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive()==CommonConst.RECEIVE_AFTER && shyVideos.getReceive_user_id().equals(userId)) { | |
| 235 | - shyVideos.setReceive(CommonConst.RECEIVE_BEFORE); | |
| 236 | - shyVideos.setReceive_user_id(null); | |
| 237 | - int i = shyVideosMapper.updateByPrimaryKey(shyVideos); | |
| 238 | + ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 239 | + if (shyLive.getShenhe_state() == CommonConst.RECEIVE_AFTER && shyLive.getAuditor().equals(userId)) { | |
| 240 | + shyLive.setShenhe_state(CommonConst.RECEIVE_BEFORE); | |
| 241 | + shyLive.setAuditor(null); | |
| 242 | + int i = shyLiveMapper.updateByPrimaryKey(shyLive); | |
| 238 | 243 | if (i != 1) { |
| 239 | 244 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,请重试"); |
| 240 | 245 | } | ... | ... |
src/main/resources/templates/common/frame.html
| ... | ... | @@ -60,10 +60,10 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 60 | 60 | <span class="menu-item-top">审核云</span> |
| 61 | 61 | </a> |
| 62 | 62 | <ul class="treeview-menu"> |
| 63 | - <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page"></i> 点播审核</a></li> | |
| 64 | - <li><a href="/live/page?receive_status=0" id="/live/page"> 直播审核</a></li> | |
| 63 | + <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> | |
| 64 | + <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> | |
| 65 | 65 | <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> |
| 66 | -<!-- <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> --> | |
| 66 | + <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> | |
| 67 | 67 | </ul> |
| 68 | 68 | </li> |
| 69 | 69 | <li class="treeview" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> | ... | ... |
src/main/resources/templates/page/live.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 3 | + | |
| 4 | +<head th:replace="../templates/common/head::head"> | |
| 5 | +<!-- 最新版本的 Bootstrap 核心 CSS 文件 --> | |
| 6 | +<!-- <link rel="stylesheet" --> | |
| 7 | +<!-- href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" --> | |
| 8 | +<!-- integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" --> | |
| 9 | +<!-- crossorigin="anonymous"> --> | |
| 10 | +</head> | |
| 11 | + | |
| 12 | +<body class="hold-transition skin-blue sidebar-mini"> | |
| 13 | + | |
| 14 | + <div class="wrapper"> | |
| 15 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 16 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 17 | + <section class="content-header"> | |
| 18 | + <h1>直播审核</h1> | |
| 19 | + <ol class="breadcrumb"> | |
| 20 | + <li><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 21 | + <li class="active"><a href="/live/page?activity_status=1">直播审核</a></li> | |
| 22 | + </ol> | |
| 23 | + </section> | |
| 24 | + <section class="content"> | |
| 25 | + <div class="row"> | |
| 26 | + <div class="col-md-12"> | |
| 27 | + <div class="box box-info"> | |
| 28 | + <div class="box-body"> | |
| 29 | + <div class="modal fade" id="modal" tabindex="-1" role="dialog" | |
| 30 | + aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 31 | + <div class="modal-dialog"> | |
| 32 | + <div class="modal-content"> | |
| 33 | + <div class="modal-header"> | |
| 34 | + <button type="button" class="close" data-dismiss="modal" | |
| 35 | + aria-hidden="true">×</button> | |
| 36 | + <h4 class="modal-title">温馨提示</h4> | |
| 37 | + </div> | |
| 38 | + <div class="modal-body" id="msg">您确认认领该条信息吗?</div> | |
| 39 | + <div class="modal-footer"> | |
| 40 | + <button type="button" class="btn btn-default" | |
| 41 | + data-dismiss="modal">取消</button> | |
| 42 | + <button type="button" class="btn btn-primary" | |
| 43 | + id="modal_remove">确认</button> | |
| 44 | + </div> | |
| 45 | + </div> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + <div class="clearfix"> | |
| 49 | + <div class="btn-group margin-bottom" id="hide_select_area_2"> | |
| 50 | + <div class="cb-toolbar"> | |
| 51 | + <input type="checkbox" id="select_all">全选 | |
| 52 | + </div> | |
| 53 | + <div class="btn-group margin-bottom pull-left" style=> | |
| 54 | + <input type="hidden" name="state" id="state" value="" /> | |
| 55 | + | |
| 56 | + <button type="button" | |
| 57 | + class="btn btn-success btn-sm margin-r-5 action claim" | |
| 58 | + value="2" data="claim" id="claim" data-toggle="modal" | |
| 59 | + data-target="#modal" onclick="receive(0);">认领</button> | |
| 60 | + <button type="button" | |
| 61 | + class="btn btn-success btn-sm margin-r-5 action claim" | |
| 62 | + value="2" data="claim10" id="claim10" data-toggle="modal" | |
| 63 | + data-target="#modal" onclick="receive(10);">认领10条</button> | |
| 64 | + <button type="button" | |
| 65 | + class="btn btn-success btn-sm margin-r-5 action claim" | |
| 66 | + value="2" data="claim100" id="claim100" | |
| 67 | + data-toggle="modal" data-target="#modal" onclick="receive(100);">认领100条</button> | |
| 68 | + </div> | |
| 69 | + </div> | |
| 70 | + | |
| 71 | + <div class="btn-group margin-bottom pull-right"> | |
| 72 | + <button type="button" class="btn btn-sm margin-r-5 filter >" | |
| 73 | + value="0" th:onclick="'javascript:quanbu()'" id="quanbu">全部</button> | |
| 74 | + <button type="button" | |
| 75 | + class="btn btn-sm margin-r-5 filter " id="daishen" value="0">全部待领 | |
| 76 | + </button> | |
| 77 | + <button type="button" | |
| 78 | + class="btn btn-sm margin-r-5 filter " id="Mydaishen" value="0">我的待审 | |
| 79 | + </button> | |
| 80 | + <button type="button" | |
| 81 | + class="btn btn-sm margin-r-5 filter " id="yishen" value="1">我的已审 | |
| 82 | + </button> | |
| 83 | + <button type="button" | |
| 84 | + class="btn btn-primary btn-sm margin-r-5" id="query" | |
| 85 | + onclick="openOrClose('forms')"> | |
| 86 | + 查询 <span id="a_up">▼</span><span id="a_down">▲</span> | |
| 87 | + </button> | |
| 88 | + </div> | |
| 89 | + | |
| 90 | + </div> | |
| 91 | + | |
| 92 | + <div class="clearfix"> | |
| 93 | + <div class="form-horizontal form-group-sm" id="forms" | |
| 94 | + style="display: none;"> | |
| 95 | + <div class="btn-group margin-bottom col-md-7" | |
| 96 | + style="padding: 0;"> | |
| 97 | + <div class="col-md-3" style="padding: 0"> | |
| 98 | + <label for="activity_id" class="control-label cb-toolbar">直播id:</label> | |
| 99 | + <div class="col-sm-7" style="padding: 0;"> | |
| 100 | + <input class="form-control" name="activity_id" type="text" | |
| 101 | + id="activity_id"> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + <div class="col-md-3" style="padding: 0"> | |
| 105 | + <label for="activity_name" class="control-label cb-toolbar">直播名称:</label> | |
| 106 | + <div class="col-sm-7" style="padding: 0;"> | |
| 107 | + <input class="form-control col-sm-2" name="activity_name" | |
| 108 | + type="text" id="activity_name"> | |
| 109 | + </div> | |
| 110 | + </div> | |
| 111 | + | |
| 112 | +<!-- <div class="col-md-3" style="padding: 0"> --> | |
| 113 | +<!-- <label for="is_hot" class="control-label cb-toolbar">是否热点:</label> --> | |
| 114 | +<!-- <div class="col-sm-6" style="padding: 0;"> --> | |
| 115 | +<!-- <select class="form-control" id="is_hot" name="is_hot"><option --> | |
| 116 | +<!-- value="0">全部</option> --> | |
| 117 | +<!-- <option value="2">是</option> --> | |
| 118 | +<!-- <option value="1">否</option></select> --> | |
| 119 | +<!-- </div> --> | |
| 120 | +<!-- </div> --> | |
| 121 | + | |
| 122 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | |
| 123 | + <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label> | |
| 124 | + <div class="col-sm-8" style="padding: 0;"> | |
| 125 | + <input class="form-control" type="text" value="" id="sp_desc"> | |
| 126 | + </div> | |
| 127 | + </div> | |
| 128 | + <div class="col-md-3" style="padding: 0"> | |
| 129 | + <label for="activity_status" | |
| 130 | + class="control-label cb-toolbar">直播状态:</label> | |
| 131 | + <div class="col-sm-6" style="padding: 0;"> | |
| 132 | + <select class="form-control col-sm-2" id="activity_status" | |
| 133 | + name="activity_status"><option value="">全部</option> | |
| 134 | + <option value="3">等待直播</option> | |
| 135 | + <option value="1">正在直播</option> | |
| 136 | + <option value="2">直播结束</option> | |
| 137 | + <option value="0">直播撤销</option> | |
| 138 | + <option value="4">直播下线</option></select> | |
| 139 | + </div> | |
| 140 | + </div> | |
| 141 | + | |
| 142 | + </div> | |
| 143 | + | |
| 144 | + <div class="btn-group margin-bottom col-md-5 pull-right" | |
| 145 | + style="padding: 0"> | |
| 146 | + <div class="col-md-11" style="width: 88%; padding: 0;"> | |
| 147 | + <div class="col-md-5" style="padding: 0"> | |
| 148 | + <label for="start_date" class="control-label cb-toolbar">时间:</label> | |
| 149 | + <div class='input-group col-md-9 date'> | |
| 150 | + <input class="form-control date" name="start_date" | |
| 151 | + type="text" id="start_date"> <span | |
| 152 | + class="input-group-addon"> <span | |
| 153 | + class="glyphicon glyphicon-calendar"></span> | |
| 154 | + </span> | |
| 155 | + </div> | |
| 156 | + </div> | |
| 157 | + <div class="col-md-5" style="padding: 0"> | |
| 158 | + <label for="start_date" class="control-label cb-toolbar">至</label> | |
| 159 | + <div class='input-group col-md-9 date'> | |
| 160 | + <input class="form-control date" name="end_date" | |
| 161 | + type="text" id="end_date"> <span class="input-group-addon"> | |
| 162 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 163 | + </span> | |
| 164 | + </div> | |
| 165 | + </div> | |
| 166 | + </div> | |
| 167 | + | |
| 168 | +<!-- <div class="col-md-1 text-center" --> | |
| 169 | +<!-- style="width: 12%; padding: 0"> --> | |
| 170 | +<!-- <button type="button" class="btn btn-primary btn-sm" --> | |
| 171 | +<!-- id="live_query" onclick="query()">查 询</button> --> | |
| 172 | +<!-- </div> --> | |
| 173 | + | |
| 174 | + </div> | |
| 175 | + | |
| 176 | + <div class="btn-group margin-bottom col-md-6" | |
| 177 | + style="padding: 0;"></div> | |
| 178 | + </div> | |
| 179 | + </div> | |
| 180 | + | |
| 181 | + <div class="modal fade common" id="modal_remove" tabindex="-1" | |
| 182 | + role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 183 | + <div class="modal-dialog"> | |
| 184 | + <div class="modal-content"> | |
| 185 | + <div class="modal-header"> | |
| 186 | + <button type="button" class="close" data-dismiss="modal" | |
| 187 | + aria-hidden="true">×</button> | |
| 188 | + <h4 class="modal-title" id="modal_title"></h4> | |
| 189 | + </div> | |
| 190 | + <div class="modal-body"> | |
| 191 | + <div class="alert alert-danger" id="window_msg" | |
| 192 | + style="display: none;"> | |
| 193 | + <p></p> | |
| 194 | + </div> | |
| 195 | + <div id="contents"></div> | |
| 196 | + </div> | |
| 197 | + </div> | |
| 198 | + </div> | |
| 199 | + </div> | |
| 200 | + | |
| 201 | + <table id="table"> | |
| 202 | + <div> | |
| 203 | + <div class="col-xs-2 col-lg-2 margin-bottom action" th:each="live : ${livePage.list}"> | |
| 204 | + <a href="#" class="thumbnail margin-bottom" | |
| 205 | + th:onclick="@{'preview(\''+${live.rtmp_url}+'\')'}"> | |
| 206 | + <div style="text-align: center"> | |
| 207 | + <img th:src='@{${live.cover_img_url}}' | |
| 208 | + alt="封面图" width="134px" height="100px"> | |
| 209 | + </div> | |
| 210 | + | |
| 211 | + </a> | |
| 212 | + <div> | |
| 213 | + <p style="line-height: 0"> | |
| 214 | + <span class="text-success" th:text="${live.shenhe_state==2?'已审':'待审'}">待审</span> | |
| 215 | + <span class="text-primary pull-right" | |
| 216 | + th:text="${#dates.format(live.activity_start_time, 'yyyy-MM-dd HH:mm:ss')}">2019-06-26 14:56:33</span> | |
| 217 | + </p> | |
| 218 | + <p class="info-box-text"> | |
| 219 | + <input type="checkbox" class="check" th:value="${live.id}" name="btSelectItem"> | |
| 220 | + <span th:text="${live.activity_name}">国新办举行新时代人民满意公务员代表中外记者见面会</span> | |
| 221 | + </p> | |
| 222 | + <p class="info-box-text"> | |
| 223 | + <span style="float: left;">id:<span th:text="${live.id}">10225</span></span> | |
| 224 | + <span style="float: right;"> <span style="margin-left: 40px;"> | |
| 225 | + <span th:if="${live.activity_status==0}">直播撤销</span> | |
| 226 | + <span th:if="${live.activity_status==1}">正在直播</span> | |
| 227 | + <span th:if="${live.activity_status==2}">直播完成</span> | |
| 228 | + <span th:if="${live.activity_status==3}">等待直播</span> | |
| 229 | + <span th:if="${live.activity_status==4}">直播下线</span> | |
| 230 | + </span><span></span> | |
| 231 | + </span> | |
| 232 | + </p> | |
| 233 | + <p class="info-box-text"> | |
| 234 | + <span style="float: left;"> <span>SP简称:</span> | |
| 235 | + </span> <span style="float: right;"> <span th:text="${live.spid_desc}">国新客户端</span> | |
| 236 | + </span> | |
| 237 | + </p> | |
| 238 | + | |
| 239 | + </div> | |
| 240 | + <div class="width-10p pull-left padding-r-5" | |
| 241 | + th:if="${live.activity_status==1 and live.shenhe_state==0}"> | |
| 242 | + <button class="btn btn-primary btn-xs btn-block" title="认领" | |
| 243 | + th:onclick="'applyReceive('+${live.id}+')'" data-field="action" | |
| 244 | + data-formatter="actionFormatter" data-events="actionEvents" | |
| 245 | + data-toggle="tooltip" data-placement="top" value="2" | |
| 246 | + th:id="'claim_'+${live.id}"> | |
| 247 | + <i class="fa fa-hand-pointer-o"></i> | |
| 248 | + </button> | |
| 249 | + </div> | |
| 250 | + | |
| 251 | + <div class="width-10p pull-left padding-r-5"> | |
| 252 | + <button class="btn btn-success btn-xs btn-block " | |
| 253 | + title="查看" th:href="@{'/live/details/?id='+${live.id}}" | |
| 254 | + data-toggle="tooltip" data-placement="top"> | |
| 255 | + <i class="fa fa-eye"></i> | |
| 256 | + </button> | |
| 257 | + </div> | |
| 258 | + <div class="width-10p pull-left padding-r-5" | |
| 259 | + th:if="${live.activity_status==1 and live.shenhe_state==1 and session.sessionUser.userId==live.auditor}"> | |
| 260 | + <button class="btn btn-danger btn-xs btn-block" | |
| 261 | + title="退领" th:onclick="'applyRetReceive('+${live.id}+')'" | |
| 262 | + data-toggle="tooltip" data-placement="top"> | |
| 263 | + <i class="fa fa-mail-reply"></i> | |
| 264 | + </button> | |
| 265 | + </div> | |
| 266 | + | |
| 267 | +<!-- <div class="width-10p pull-right padding-r-5"> --> | |
| 268 | +<!-- <button class="btn btn-primary btn-xs btn-block" --> | |
| 269 | +<!-- disabled="disabled" title="日志" --> | |
| 270 | +<!-- onclick="reject('38_09471046aa7f4835a734f1d6208249fc')"> --> | |
| 271 | +<!-- <i class="fa fa-bullseye"></i> --> | |
| 272 | +<!-- </button> --> | |
| 273 | +<!-- </div> --> | |
| 274 | + | |
| 275 | + <div class="width-10p pull-right padding-r-5"> | |
| 276 | + <button class="btn btn-danger btn-xs btn-block" title="下线直播" | |
| 277 | + th:onclick="'offline_live('+${live.id}+')'" data-toggle="tooltip" | |
| 278 | + data-placement="top" | |
| 279 | + data-target="#modal"> | |
| 280 | + <i class="fa fa-arrow-down"></i> | |
| 281 | + </button> | |
| 282 | + </div> | |
| 283 | + | |
| 284 | + <div class="width-10p pull-right padding-r-5"> | |
| 285 | + <button class="btn btn-danger btn-xs btn-block" title="下线主播" | |
| 286 | + th:onclick="'offline_anchor('+${live.id}+')'" data-toggle="tooltip" | |
| 287 | + data-placement="top"> | |
| 288 | + <i class="glyphicon glyphicon-user"></i> | |
| 289 | + </button> | |
| 290 | + </div> | |
| 291 | + </div> | |
| 292 | + | |
| 293 | + </div> | |
| 294 | + </table> | |
| 295 | + | |
| 296 | + </div> | |
| 297 | + </div> | |
| 298 | + </div> | |
| 299 | + </div> | |
| 300 | + </section> | |
| 301 | + <!-- /.content --> | |
| 302 | +<!-- <div class="box-footer"> --> | |
| 303 | +<!-- <div class="pull-right"></div> --> | |
| 304 | +<!-- </div> --> | |
| 305 | + </div> | |
| 306 | + <!-- /.content-wrapper --> | |
| 307 | + | |
| 308 | + <!-- 预览对话框 --> | |
| 309 | + <div class="modal fade" id="preview" role="dialog" aria-hidden="true"> | |
| 310 | + <div class="modal-dialog" style="width: 670px;"> | |
| 311 | + <div class="modal-content"> | |
| 312 | + <div class="modal-header"> | |
| 313 | + <button type="button" class="close" data-dismiss="modal" | |
| 314 | + aria-hidden="true">×</button> | |
| 315 | + <h5 class="modal-title" id="myModalLabel">视频预览</h5> | |
| 316 | + </div> | |
| 317 | + <div class="modal-body"> | |
| 318 | + <embed name="cnlive" width="640" height="450" id="cnlive" volume="0" | |
| 319 | + src="http://data.cnlive.com/export/UuidPlayerMain.swf" | |
| 320 | + flashVars="" type="application/x-shockwave-flash" wmode="window" | |
| 321 | + quility="high" allowscriptaccess="always" allowfullscreen="true"> | |
| 322 | + </div> | |
| 323 | + </div> | |
| 324 | + <!-- /.modal-content --> | |
| 325 | + </div> | |
| 326 | + <!-- /.modal --> | |
| 327 | + </div> | |
| 328 | + | |
| 329 | + <!-- 确认直播下线,直播下线 --> | |
| 330 | + <div class="modal" id="action_note" role="dialog" | |
| 331 | + aria-labelledby="myModalLabel"> | |
| 332 | + <div class="modal-dialog"> | |
| 333 | + <div class="modal-content"> | |
| 334 | + <div class="modal-header"> | |
| 335 | + <h4 class="modal-title">温馨提示</h4> | |
| 336 | + </div> | |
| 337 | + <div class="modal-body" id="msg2"></div> | |
| 338 | + | |
| 339 | + <div class="modal-footer"> | |
| 340 | + <button type="button" class="btn btn-default " | |
| 341 | + data-dismiss="modal" id="action_note_no">取消</button> | |
| 342 | + <button type="button" class="btn btn-primary" id="action_note_yes">确认</button> | |
| 343 | + <input type="hidden" name="action_note_type" id="action_note_type" | |
| 344 | + value="" /> <input type="hidden" name="action_note_id" | |
| 345 | + id="action_note_id" value="" /> | |
| 346 | + </div> | |
| 347 | + </div> | |
| 348 | + </div> | |
| 349 | + </div> | |
| 350 | + <!-- 模态框(Modal) --> | |
| 351 | + <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 352 | + <div class="modal-dialog"> | |
| 353 | + <div class="modal-content" style="margin-top: 30%;"> | |
| 354 | + <div class="modal-header"> | |
| 355 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| 356 | + <h4 class="modal-title" id="myModalLabel">审核意见</h4> | |
| 357 | + </div> | |
| 358 | + <div class="modal-body"> | |
| 359 | + <div class="form-group" style="margin-bottom: 0;"> | |
| 360 | + <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea> | |
| 361 | + </div> | |
| 362 | + <div class="form-group"> | |
| 363 | + </div> | |
| 364 | + </div> | |
| 365 | + <div class="modal-footer"> | |
| 366 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 367 | + <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button> | |
| 368 | + </div> | |
| 369 | + </div><!-- /.modal-content --> | |
| 370 | + </div><!-- /.modal-dialog --> | |
| 371 | + </div> | |
| 372 | + <!-- /.modal --> | |
| 373 | + | |
| 374 | + | |
| 375 | + <script th:inline="javascript"> | |
| 376 | + | |
| 377 | + var activity_id ="";//直播id | |
| 378 | + var activity_name = "";//直播名称 | |
| 379 | + var is_hot ="";//是否热点 | |
| 380 | + var activity_status ="";//直播状态 | |
| 381 | + var start_date ="";//开始时间 | |
| 382 | + var end_date = "";//结束时间 | |
| 383 | + var sp_desc = ""; | |
| 384 | + var count = ""; | |
| 385 | + var shenhe_state ="";//审核状态 | |
| 386 | + | |
| 387 | + function query(){ | |
| 388 | + activity_id = $("#activity_id").val(); | |
| 389 | + activity_name = $("#activity_name").val(); | |
| 390 | + activity_status = $("#activity_status").val(); | |
| 391 | + start_date = $("#start_date").val(); | |
| 392 | + end_date = $("#end_date").val(); | |
| 393 | + var spId=[[${session.sessionUser.spid}]]; | |
| 394 | + if(spId==0){ | |
| 395 | + sp_desc = $("#sp_desc").val(); | |
| 396 | + } | |
| 397 | + window.location.href = "/live/page?activity_status="+activity_status+"&activity_id=" + activity_id + "&start_date=" + start_date + "&end_date=" + end_date + "&activity_name=" + activity_name + "&sp_desc=" + sp_desc+"&pageSize="+count+"&shenhe_state="+shenhe_state; | |
| 398 | + } | |
| 399 | + | |
| 400 | + //全部 | |
| 401 | + function quanbu() { | |
| 402 | + query(); | |
| 403 | + } | |
| 404 | + | |
| 405 | + //全部待领 | |
| 406 | + $('#daishen').click(function () { | |
| 407 | + shenhe_state=0; | |
| 408 | + query(); | |
| 409 | + }); | |
| 410 | + //我的待审核 | |
| 411 | + $('#Mydaishen').click(function () { | |
| 412 | + shenhe_state=1; | |
| 413 | + query(); | |
| 414 | + }); | |
| 415 | + //我的已审核 | |
| 416 | + $('#yishen').click(function () { | |
| 417 | + shenhe_state=2; | |
| 418 | + query(); | |
| 419 | + }); | |
| 420 | + | |
| 421 | + | |
| 422 | + /*全选的操作*/ | |
| 423 | + $('#select_all').click(function () { | |
| 424 | + if ($("[name=btSelectItem]:checkbox:not(:checked)").length > 0) { | |
| 425 | + $("#select_all").prop('checked', true); | |
| 426 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 427 | + $(this).prop('checked', true); | |
| 428 | + }); | |
| 429 | + } else { | |
| 430 | + $("#select_all").prop('checked', false); | |
| 431 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 432 | + $(this).prop('checked', false); | |
| 433 | + }); | |
| 434 | + } | |
| 435 | + }); | |
| 436 | + | |
| 437 | + /** | |
| 438 | + * 认领 | |
| 439 | + */ | |
| 440 | + function receive(n) { | |
| 441 | + if (n > 0) { | |
| 442 | + applyReceiveNum(n); | |
| 443 | + } else { | |
| 444 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 445 | + if (rows.length > 0) { | |
| 446 | + var ids = ""; | |
| 447 | + rows.each(function (i, e) { | |
| 448 | + ids = ids + "," + e.value; | |
| 449 | + }) | |
| 450 | + ids = ids.substring(1); | |
| 451 | + applyReceive(ids); | |
| 452 | + } else { | |
| 453 | + alert("请选择要认领的内容!"); | |
| 454 | + } | |
| 455 | + } | |
| 456 | + } | |
| 457 | + | |
| 458 | + //认领选中请求 | |
| 459 | + function applyReceive(ids) { | |
| 460 | + $.post("/live/receive?ids=" + ids, function (data) { | |
| 461 | + if (data.errorCode == 0) { | |
| 462 | + alert(data.errorMessage); | |
| 463 | + location.href = location.href; | |
| 464 | + } else { | |
| 465 | + alert(data.errorMessage); | |
| 466 | + } | |
| 467 | + }) | |
| 468 | + } | |
| 469 | + | |
| 470 | + //认领多条请求 | |
| 471 | + function applyReceiveNum(num) { | |
| 472 | + $.post("/live/receive?num=" + num, function (data) { | |
| 473 | + if (data.errorCode == 0) { | |
| 474 | + alert(data.errorMessage); | |
| 475 | + location.href = location.href; | |
| 476 | + } else { | |
| 477 | + alert(data.errorMessage); | |
| 478 | + } | |
| 479 | + }) | |
| 480 | + } | |
| 481 | + | |
| 482 | + //退领选中内容 | |
| 483 | + function retReceive() { | |
| 484 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 485 | + if (rows.length > 0) { | |
| 486 | + var r = confirm("您确定退领选中的" + rows.length + "条内容吗?"); | |
| 487 | + if (r == true) { | |
| 488 | + var ids = ""; | |
| 489 | + rows.each(function (i, e) { | |
| 490 | + ids = ids + "," + e.value; | |
| 491 | + }) | |
| 492 | + ids = ids.substring(1); | |
| 493 | + applyRetReceive(ids); | |
| 494 | + } | |
| 495 | + } else { | |
| 496 | + alert("没有选中的数据!"); | |
| 497 | + } | |
| 498 | + } | |
| 499 | + | |
| 500 | + //退领 | |
| 501 | + function applyRetReceive(ids) { | |
| 502 | + $.post("/live/retReceive?ids=" + ids, function (data) { | |
| 503 | + if (data.errorCode == 0) { | |
| 504 | + alert(data.errorMessage); | |
| 505 | + location.href = location.href; | |
| 506 | + } else { | |
| 507 | + alert(data.errorMessage); | |
| 508 | + } | |
| 509 | + }) | |
| 510 | + } | |
| 511 | + | |
| 512 | + /*下线主播*/ | |
| 513 | + function offline_anchor(id) { | |
| 514 | + $('#msg2').html('您确认下线该主播吗?'); | |
| 515 | + $('#action_note').show(); | |
| 516 | + $("#action_note_type").val('offline_anchor'); | |
| 517 | + $("#action_note_id").val(id); | |
| 518 | + } | |
| 519 | + | |
| 520 | + /*下线直播*/ | |
| 521 | + function offline_live(id) { | |
| 522 | + | |
| 523 | + $('#msg2').html('您确认下线该直播吗?'); | |
| 524 | + $('#action_note').show(); | |
| 525 | + $("#action_note_type").val('offline_live'); | |
| 526 | + $("#action_note_id").val(id); | |
| 527 | + $('#modal_remove').attr('claim', 'claim'); | |
| 528 | + } | |
| 529 | + | |
| 530 | + $("#action_note_no").click(function() { | |
| 531 | + $("#action_note").hide(); | |
| 532 | + }); | |
| 533 | + | |
| 534 | + $("#action_note_yes").click(function() { | |
| 535 | + $("#action_note").hide(); | |
| 536 | + $('#msgModal').modal('show'); | |
| 537 | + }) | |
| 538 | + | |
| 539 | + //提交打回 | |
| 540 | + function repulseSubmit() { | |
| 541 | + var action_note_type = $("#action_note_type").val(); | |
| 542 | + var ids = $("#action_note_id").val(); | |
| 543 | + var msg = $("#reviewMsg").val(); | |
| 544 | + if (action_note_type == 'offline_live') { | |
| 545 | + $.post("/live/repulse?ids=" + ids + "&msg=" + msg, function (data) { | |
| 546 | + if (data.errorCode == 0) { | |
| 547 | + alert(data.errorMessage); | |
| 548 | + location.href = location.href; | |
| 549 | + } else { | |
| 550 | + alert(data.errorMessage); | |
| 551 | + } | |
| 552 | + }) | |
| 553 | + } else if (action_note_type == 'offline_anchor') { | |
| 554 | + $.post("/anchor/repulse?ids=" + ids + "&msg=" + msg, function (data) { | |
| 555 | + if (data.errorCode == 0) { | |
| 556 | + alert(data.errorMessage); | |
| 557 | + location.href = location.href; | |
| 558 | + } else { | |
| 559 | + alert(data.errorMessage); | |
| 560 | + } | |
| 561 | + }) | |
| 562 | + } else if (action_note_type = 'reject') { | |
| 563 | + | |
| 564 | + } | |
| 565 | + } | |
| 566 | + | |
| 567 | + | |
| 568 | + /*时间插件*/ | |
| 569 | + $('.date').datetimepicker({ | |
| 570 | + format : 'YYYY-MM-DD HH:mm', | |
| 571 | + locale : "zh-CN", | |
| 572 | + toolbarPlacement : 'bottom', | |
| 573 | + showClear : true, | |
| 574 | + }); | |
| 575 | + | |
| 576 | + | |
| 577 | + $('#a_down').hide(); | |
| 578 | + | |
| 579 | + /*查询样式*/ | |
| 580 | + function openOrClose(id_name_str) { | |
| 581 | + var id_name = '#' + id_name_str; | |
| 582 | + if ($(id_name).css('display') == 'block') { | |
| 583 | + $(id_name).slideUp(350); | |
| 584 | + $('#a_up').show(); | |
| 585 | + $('#a_down').hide(); | |
| 586 | + } else { | |
| 587 | + $(id_name).slideDown(350); | |
| 588 | + $('#a_up').hide(); | |
| 589 | + $('#a_down').show(); | |
| 590 | + } | |
| 591 | + } | |
| 592 | + | |
| 593 | + | |
| 594 | + $(function () { | |
| 595 | + //按钮颜色设置 | |
| 596 | + var shenhe_state = [[${param.shenhe_state}]] ? [[${param.shenhe_state}]][0] : null; | |
| 597 | + var stateIsNull = $.trim(shenhe_state) == ""; | |
| 598 | + if (stateIsNull ) { | |
| 599 | + $("#quanbu").addClass("btn-info"); | |
| 600 | + } else if (shenhe_state == '0' ) { | |
| 601 | + $("#daishen").addClass("btn-warning"); | |
| 602 | + } else if (shenhe_state == '1' ) { | |
| 603 | + $("#Mydaishen").addClass("btn-success"); | |
| 604 | + } else if ( shenhe_state == '2') { | |
| 605 | + $("#yishen").addClass("btn-danger"); | |
| 606 | + } | |
| 607 | + | |
| 608 | + }) | |
| 609 | + | |
| 610 | + //翻页函数 | |
| 611 | + function fanye(page) { | |
| 612 | + var param = location.search; | |
| 613 | + if (param.indexOf("page=") != -1) { | |
| 614 | + if (page < 10) { | |
| 615 | + param = param.substring(1, param.length - 7); | |
| 616 | + } else if (page < 100) { | |
| 617 | + param = param.substring(1, param.length - 8); | |
| 618 | + } else if (page < 1000) { | |
| 619 | + param = param.substring(1, param.length - 9); | |
| 620 | + } else if (page < 10000) { | |
| 621 | + param = param.substring(1, param.length - 10); | |
| 622 | + } | |
| 623 | + window.location.href = "/live/page?" + param + "&page=" + page; | |
| 624 | + } else { | |
| 625 | + param = param.substring(1, param.length); | |
| 626 | + window.location.href = "/live/page?" + param + "&page=" + page; | |
| 627 | + } | |
| 628 | + } | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + //弹窗播放操作 ---预览,审核,查看,退领 | |
| 635 | + function preview(url) { | |
| 636 | + $('#cnlive').attr('flashVars', | |
| 637 | + "hasBorder=false&appid=82_irej0pbo53&type=live&model=2&videoURL=" | |
| 638 | + + url); | |
| 639 | + $('#preview').modal('show'); | |
| 640 | + $('.close').click(function() { | |
| 641 | + $('.preview').attr('display', 'none'); | |
| 642 | + }) | |
| 643 | + } | |
| 644 | + | |
| 645 | + </script> | |
| 646 | + <script> | |
| 647 | + $(function() { | |
| 648 | + $("[data-toggle='tooltip']").tooltip(); | |
| 649 | + }); | |
| 650 | + </script> | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 655 | + | |
| 656 | + | |
| 657 | + <!-- Control Sidebar --> | |
| 658 | + <aside class="control-sidebar control-sidebar-dark"> | |
| 659 | + <!-- Create the tabs --> | |
| 660 | + <ul class="nav nav-tabs nav-justified control-sidebar-tabs"> | |
| 661 | + <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i | |
| 662 | + class="fa fa-home"></i></a></li> | |
| 663 | + <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i | |
| 664 | + class="fa fa-gears"></i></a></li> | |
| 665 | + </ul> | |
| 666 | + <!-- Tab panes --> | |
| 667 | + <div class="tab-content"> | |
| 668 | + <!-- Home tab content --> | |
| 669 | + <div class="tab-pane" id="control-sidebar-home-tab"></div> | |
| 670 | + <!-- /.tab-pane --> | |
| 671 | + </div> | |
| 672 | + </aside> | |
| 673 | + <!-- /.control-sidebar --> | |
| 674 | + <!-- Add the sidebar's background. This div must be placed | |
| 675 | + immediately after the control sidebar --> | |
| 676 | + <div class="control-sidebar-bg"></div> | |
| 677 | + | |
| 678 | + </div> | |
| 679 | + <!-- ./wrapper --> | |
| 680 | +</body> | |
| 681 | + | |
| 682 | + | |
| 683 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 684 | +<script type="text/javascript"> | |
| 685 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 686 | +</script> | |
| 687 | + | |
| 688 | +<!-- AdminLTE App --> | |
| 689 | +<script src="./../../static/js/app.min.js"></script> | |
| 690 | +<!-- AdminLTE for demo purposes --> | |
| 691 | +<script src="./../../static/js/sidebar.js"></script> | |
| 692 | + | |
| 693 | +</html> | ... | ... |
src/main/resources/templates/page/video.html
| ... | ... | @@ -383,7 +383,6 @@ |
| 383 | 383 | //全部 |
| 384 | 384 | function quanbu() { |
| 385 | 385 | updateValue(); |
| 386 | -// window.location.href = "/videos/page?video_title=&start_date=&end_date=&state=&receive=&video_priority="; | |
| 387 | 386 | window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; |
| 388 | 387 | } |
| 389 | 388 | |
| ... | ... | @@ -392,12 +391,6 @@ |
| 392 | 391 | updateValue(); |
| 393 | 392 | var state = 0; |
| 394 | 393 | var receive = 0; |
| 395 | -// var video_priority = $("#video_priority").val(); | |
| 396 | -// var video_title = $("#video_titleID").val(); | |
| 397 | -// var start_date = $("#start_date").val(); | |
| 398 | -// var end_date = $("#end_date").val(); | |
| 399 | -// var sp_desc = $("#sp_desc").val(); | |
| 400 | -// var count = $("#count").val(); | |
| 401 | 394 | window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; |
| 402 | 395 | }); |
| 403 | 396 | //我的待审核 |
| ... | ... | @@ -405,12 +398,6 @@ |
| 405 | 398 | updateValue(); |
| 406 | 399 | var state = 0; |
| 407 | 400 | var receive = 1; |
| 408 | -// var video_priority = $("#video_priority").val(); | |
| 409 | -// var video_title = $("#video_titleID").val(); | |
| 410 | -// var start_date = $("#start_date").val(); | |
| 411 | -// var end_date = $("#end_date").val(); | |
| 412 | -// var sp_desc = $("#sp_desc").val(); | |
| 413 | -// var count = $("#count").val(); | |
| 414 | 401 | window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; |
| 415 | 402 | }); |
| 416 | 403 | //我的已审核 |
| ... | ... | @@ -418,24 +405,12 @@ |
| 418 | 405 | updateValue(); |
| 419 | 406 | var state = 1; |
| 420 | 407 | var receive = 1; |
| 421 | -// var video_priority = $("#video_priority").val(); | |
| 422 | -// var video_title = $("#video_titleID").val(); | |
| 423 | -// var start_date = $("#start_date").val(); | |
| 424 | -// var end_date = $("#end_date").val(); | |
| 425 | -// var sp_desc = $("#sp_desc").val(); | |
| 426 | -// var count = $("#count").val(); | |
| 427 | 408 | window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; |
| 428 | 409 | }); |
| 429 | 410 | |
| 430 | 411 | |
| 431 | 412 | //查询 |
| 432 | 413 | $('#videos_query').click(function () { |
| 433 | -// var video_priority = $("#video_priority").val(); | |
| 434 | -// var video_title = $("#video_titleID").val(); | |
| 435 | -// var start_date = $("#start_date").val(); | |
| 436 | -// var end_date = $("#end_date").val(); | |
| 437 | -// var sp_desc = $("#sp_desc").val(); | |
| 438 | -// var count = $("#count").val(); | |
| 439 | 414 | window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; |
| 440 | 415 | }); |
| 441 | 416 | /*全选的操作*/ | ... | ... |
src/main/resources/templates/page/videoStream.html
| ... | ... | @@ -17,8 +17,8 @@ |
| 17 | 17 | <section class="content-header"> |
| 18 | 18 | <h1>直播审核</h1> |
| 19 | 19 | <ol class="breadcrumb"> |
| 20 | - <li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 21 | - <li class="active"><a href="/live">直播审核</a></li> | |
| 20 | + <li><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 21 | + <li class="active"><a href="/live/page?activity_status=1">直播审核</a></li> | |
| 22 | 22 | </ol> |
| 23 | 23 | </section> |
| 24 | 24 | <section class="content"> |
| ... | ... | @@ -59,12 +59,12 @@ |
| 59 | 59 | data-target="#modal">认领</button> |
| 60 | 60 | <button type="button" |
| 61 | 61 | class="btn btn-success btn-sm margin-r-5 action claim" |
| 62 | - value="2" data="claim100" id="claim100" data-toggle="modal" | |
| 63 | - data-target="#modal">认领100条</button> | |
| 62 | + value="2" data="claim10" id="claim10" data-toggle="modal" | |
| 63 | + data-target="#modal">认领10条</button> | |
| 64 | 64 | <button type="button" |
| 65 | 65 | class="btn btn-success btn-sm margin-r-5 action claim" |
| 66 | - value="2" data="claim1000" id="claim1000" | |
| 67 | - data-toggle="modal" data-target="#modal">认领1000条</button> | |
| 66 | + value="2" data="claim100" id="claim100" | |
| 67 | + data-toggle="modal" data-target="#modal">认领100条</button> | |
| 68 | 68 | </div> |
| 69 | 69 | </div> |
| 70 | 70 | |
| ... | ... | @@ -112,24 +112,32 @@ |
| 112 | 112 | </div> |
| 113 | 113 | </div> |
| 114 | 114 | |
| 115 | - <div class="col-md-3" style="padding: 0"> | |
| 116 | - <label for="is_hot" class="control-label cb-toolbar">是否热点:</label> | |
| 117 | - <div class="col-sm-6" style="padding: 0;"> | |
| 118 | - <select class="form-control" id="is_hot" name="is_hot"><option | |
| 119 | - value="0">全部</option> | |
| 120 | - <option value="2">是</option> | |
| 121 | - <option value="1">否</option></select> | |
| 122 | - </div> | |
| 123 | - </div> | |
| 115 | +<!-- <div class="col-md-3" style="padding: 0"> --> | |
| 116 | +<!-- <label for="is_hot" class="control-label cb-toolbar">是否热点:</label> --> | |
| 117 | +<!-- <div class="col-sm-6" style="padding: 0;"> --> | |
| 118 | +<!-- <select class="form-control" id="is_hot" name="is_hot"><option --> | |
| 119 | +<!-- value="0">全部</option> --> | |
| 120 | +<!-- <option value="2">是</option> --> | |
| 121 | +<!-- <option value="1">否</option></select> --> | |
| 122 | +<!-- </div> --> | |
| 123 | +<!-- </div> --> | |
| 124 | + | |
| 125 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | |
| 126 | + <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label> | |
| 127 | + <div class="col-sm-8" style="padding: 0;"> | |
| 128 | + <input class="form-control" type="text" value="" id="sp_desc"> | |
| 129 | + </div> | |
| 130 | + </div> | |
| 124 | 131 | <div class="col-md-3" style="padding: 0"> |
| 125 | 132 | <label for="activity_status" |
| 126 | 133 | class="control-label cb-toolbar">直播状态:</label> |
| 127 | 134 | <div class="col-sm-6" style="padding: 0;"> |
| 128 | 135 | <select class="form-control col-sm-2" id="activity_status" |
| 129 | - name="activity_status"><option value="0">全部</option> | |
| 130 | - <option value="2">直播中</option> | |
| 131 | - <option value="3">已结束</option> | |
| 132 | - <option value="4">已下线</option></select> | |
| 136 | + name="activity_status"><option value="">全部</option> | |
| 137 | + <option value="3">待直播</option> | |
| 138 | + <option value="1">直播中</option> | |
| 139 | + <option value="2">已结束</option> | |
| 140 | + <option value="0">已下线</option></select> | |
| 133 | 141 | </div> |
| 134 | 142 | </div> |
| 135 | 143 | |
| ... | ... | @@ -159,11 +167,11 @@ |
| 159 | 167 | </div> |
| 160 | 168 | </div> |
| 161 | 169 | |
| 162 | - <div class="col-md-1 text-center" | |
| 163 | - style="width: 12%; padding: 0"> | |
| 164 | - <button type="button" class="btn btn-primary btn-sm" | |
| 165 | - id="live_query">查 询</button> | |
| 166 | - </div> | |
| 170 | +<!-- <div class="col-md-1 text-center" --> | |
| 171 | +<!-- style="width: 12%; padding: 0"> --> | |
| 172 | +<!-- <button type="button" class="btn btn-primary btn-sm" --> | |
| 173 | +<!-- id="live_query">查 询</button> --> | |
| 174 | +<!-- </div> --> | |
| 167 | 175 | |
| 168 | 176 | </div> |
| 169 | 177 | |
| ... | ... | @@ -179,17 +187,20 @@ |
| 179 | 187 | var activity_status ="";//直播状态 |
| 180 | 188 | var start_date ="";//开始时间 |
| 181 | 189 | var end_date = "";//结束时间 |
| 190 | + var sp_desc = ""; | |
| 182 | 191 | var count = ""; |
| 183 | 192 | |
| 184 | 193 | function updateValue(){ |
| 185 | - video_priority = $("#video_priority").val(); | |
| 186 | - video_title = $("#video_titleID").val(); | |
| 187 | - start_date = $("#start_date").val(); | |
| 194 | + activity_id = $("#activity_id").val(); | |
| 195 | + activity_name = $("activity_name").val(); | |
| 196 | +// is_hot = $("#is_hot").val(); | |
| 197 | + activity_status = $("#activity_status").val(); | |
| 198 | + start_date = $("#start_date").val(); | |
| 188 | 199 | end_date = $("#end_date").val(); |
| 189 | 200 | var spId=[[${session.sessionUser.spid}]]; |
| 190 | 201 | if(spId==0){ |
| 191 | 202 | sp_desc = $("#sp_desc").val(); |
| 192 | - count = $("#count").val(); | |
| 203 | +// count = $("#count").val(); | |
| 193 | 204 | } |
| 194 | 205 | } |
| 195 | 206 | |
| ... | ... | @@ -197,7 +208,7 @@ |
| 197 | 208 | //全部 |
| 198 | 209 | function quanbu() { |
| 199 | 210 | updateValue(); |
| 200 | - window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 211 | + window.location.href = "/live/page?activity_status="+activity_status+"&activity_id=" + activity_id + "&start_date=" + start_date + "&end_date=" + end_date + "&activity_name=" + activity_name + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 201 | 212 | } |
| 202 | 213 | |
| 203 | 214 | //全部待领 |
| ... | ... | @@ -262,10 +273,10 @@ |
| 262 | 273 | ids[ids.length] = $(this).attr('value'); |
| 263 | 274 | } |
| 264 | 275 | }); |
| 265 | - } else if (flag == 'claim100') { | |
| 266 | - ids = 100; | |
| 276 | + } else if (flag == 'claim10') { | |
| 277 | + ids = 10; | |
| 267 | 278 | } else { |
| 268 | - ids = 1000; | |
| 279 | + ids = 100; | |
| 269 | 280 | } |
| 270 | 281 | if (ids.length > 0|| ids > 0) { |
| 271 | 282 | if (flag == 'claim') { |
| ... | ... | @@ -273,16 +284,16 @@ |
| 273 | 284 | + ids.length+ '</span></strong>条信息吗?'); |
| 274 | 285 | $('#modal_remove').show(); |
| 275 | 286 | $('#modal_remove').attr('claim','claim'); |
| 276 | - } else if (flag == 'claim100') { | |
| 287 | + } else if (flag == 'claim10') { | |
| 277 | 288 | $('#msg').html('您确认认领这前<strong><span class="text-danger">' |
| 278 | 289 | + ids+ '</span></strong>条信息吗?'); |
| 279 | 290 | $('#modal_remove').show(); |
| 280 | - $('#modal_remove').attr('claim','claim100'); | |
| 291 | + $('#modal_remove').attr('claim','claim10'); | |
| 281 | 292 | } else { |
| 282 | 293 | $('#msg').html('您确认认领这前<strong><span class="text-danger">' |
| 283 | 294 | + ids+ '</span></strong>条信息吗?'); |
| 284 | 295 | $('#modal_remove').show(); |
| 285 | - $('#modal_remove').attr('claim','claim1000'); | |
| 296 | + $('#modal_remove').attr('claim','claim100'); | |
| 286 | 297 | } |
| 287 | 298 | } else { |
| 288 | 299 | alert('请选择要认领的数据'); |
| ... | ... | @@ -311,10 +322,10 @@ |
| 311 | 322 | ids[ids.length] = $(this).attr('value'); |
| 312 | 323 | } |
| 313 | 324 | }); |
| 314 | - } else if (flag == 'claim100') { | |
| 315 | - ids = 100; | |
| 325 | + } else if (flag == 'claim10') { | |
| 326 | + ids = 10; | |
| 316 | 327 | } else { |
| 317 | - ids = 1000; | |
| 328 | + ids = 100; | |
| 318 | 329 | } |
| 319 | 330 | var state = 2; |
| 320 | 331 | $.ajax({ |
| ... | ... | @@ -685,6 +696,24 @@ |
| 685 | 696 | |
| 686 | 697 | |
| 687 | 698 | <script> |
| 699 | + | |
| 700 | + $('#a_down').hide(); | |
| 701 | + | |
| 702 | + /*查询样式*/ | |
| 703 | + function openOrClose(id_name_str) { | |
| 704 | + var id_name = '#' + id_name_str; | |
| 705 | + if ($(id_name).css('display') == 'block') { | |
| 706 | + $(id_name).slideUp(350); | |
| 707 | + $('#a_up').show(); | |
| 708 | + $('#a_down').hide(); | |
| 709 | + } else { | |
| 710 | + $(id_name).slideDown(350); | |
| 711 | + $('#a_up').hide(); | |
| 712 | + $('#a_down').show(); | |
| 713 | + } | |
| 714 | + } | |
| 715 | + | |
| 716 | + | |
| 688 | 717 | /*查询字段效果*/ |
| 689 | 718 | $('#videos_query').click(function() { |
| 690 | 719 | $('#table').bootstrapTable('selectPage', 1); | ... | ... |