Commit b494a257ed782f2174e9186d894716e9deddb9b9
1 parent
5c9a1dfc
修改视频拒绝后的常用意见显示,以及导出的常用意见显示
Showing
5 changed files
with
67 additions
and
47 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| @@ -69,7 +69,7 @@ public class VideosController { | @@ -69,7 +69,7 @@ public class VideosController { | ||
| 69 | public ResponseBean shenheInfo(Integer id, String activity_id, Integer state, String attr_tags, String msg, String callback, HttpSession session) { | 69 | public ResponseBean shenheInfo(Integer id, String activity_id, Integer state, String attr_tags, String msg, String callback, HttpSession session) { |
| 70 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | 70 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 71 | String userId = sessionUser.getUserId(); | 71 | String userId = sessionUser.getUserId(); |
| 72 | - ShyVideos shyVideos = videosService.selectByPrimaryKey(id); | 72 | +// ShyVideos shyVideos = videosService.selectByPrimaryKey(id); |
| 73 | // if (shyVideos.getReceive() && CommonUtils.isNotEmpty(shyVideos.getReceive_user_id()) && userId.equals(shyVideos.getReceive_user_id())) { | 73 | // if (shyVideos.getReceive() && CommonUtils.isNotEmpty(shyVideos.getReceive_user_id()) && userId.equals(shyVideos.getReceive_user_id())) { |
| 74 | JSONObject result = null; | 74 | JSONObject result = null; |
| 75 | try { | 75 | try { |
| @@ -89,7 +89,7 @@ public class VideosController { | @@ -89,7 +89,7 @@ public class VideosController { | ||
| 89 | return new ResponseBean(code, result.getString("msg")); | 89 | return new ResponseBean(code, result.getString("msg")); |
| 90 | } | 90 | } |
| 91 | state = state == 4 ? 2 : 1; | 91 | state = state == 4 ? 2 : 1; |
| 92 | - int i = videosService.updateVideo(id, userId,null, state, msg); | 92 | + int i = videosService.updateVideo(id, userId,null,attr_tags, state, msg); |
| 93 | if (i == 0) { | 93 | if (i == 0) { |
| 94 | return new ResponseBean(ErrorEnum.ERROR); | 94 | return new ResponseBean(ErrorEnum.ERROR); |
| 95 | } | 95 | } |
| @@ -193,6 +193,7 @@ public class VideosController { | @@ -193,6 +193,7 @@ public class VideosController { | ||
| 193 | } else if (plat == CommonConst.KS_PLAT) { | 193 | } else if (plat == CommonConst.KS_PLAT) { |
| 194 | yuming = ks_domain + "/"; | 194 | yuming = ks_domain + "/"; |
| 195 | } | 195 | } |
| 196 | + detailsContent.setAttr_tags(CommonUtils.isEmpty(detailsContent.getAttr_tags())?"":detailsContent.getAttr_tags()); | ||
| 196 | model.addAttribute("images", images); | 197 | model.addAttribute("images", images); |
| 197 | model.addAttribute("avsampleImgs", avsampleImgs); | 198 | model.addAttribute("avsampleImgs", avsampleImgs); |
| 198 | model.addAttribute("video", detailsContent); | 199 | model.addAttribute("video", detailsContent); |
| @@ -299,26 +300,29 @@ public class VideosController { | @@ -299,26 +300,29 @@ public class VideosController { | ||
| 299 | cell.setCellValue("视频标签"); | 300 | cell.setCellValue("视频标签"); |
| 300 | cell = row.createCell(5);//列 | 301 | cell = row.createCell(5);//列 |
| 301 | cell.setCellValue("审核员"); | 302 | cell.setCellValue("审核员"); |
| 302 | - cell = row.createCell(6);//列 | ||
| 303 | - cell.setCellValue("审核意见"); | 303 | + cell = row.createCell(6);//增加一列 |
| 304 | + cell.setCellValue("常用审核意见"); | ||
| 304 | cell = row.createCell(7);//列 | 305 | cell = row.createCell(7);//列 |
| 305 | - cell.setCellValue("状态"); | 306 | + cell.setCellValue("审核意见"); |
| 306 | cell = row.createCell(8);//列 | 307 | cell = row.createCell(8);//列 |
| 307 | - cell.setCellValue("视频关键字"); | 308 | + cell.setCellValue("状态"); |
| 308 | cell = row.createCell(9);//列 | 309 | cell = row.createCell(9);//列 |
| 309 | - cell.setCellValue("视频简介"); | 310 | + cell.setCellValue("视频关键字"); |
| 310 | cell = row.createCell(10);//列 | 311 | cell = row.createCell(10);//列 |
| 311 | - cell.setCellValue("视频id"); | 312 | + cell.setCellValue("视频简介"); |
| 312 | cell = row.createCell(11);//列 | 313 | cell = row.createCell(11);//列 |
| 313 | - cell.setCellValue("创建时间"); | 314 | + cell.setCellValue("视频id"); |
| 314 | cell = row.createCell(12);//列 | 315 | cell = row.createCell(12);//列 |
| 315 | - cell.setCellValue("视频上传时间"); | 316 | + cell.setCellValue("创建时间"); |
| 316 | cell = row.createCell(13);//列 | 317 | cell = row.createCell(13);//列 |
| 317 | - cell.setCellValue("视频时长(秒)"); | 318 | + cell.setCellValue("视频上传时间"); |
| 318 | cell = row.createCell(14);//列 | 319 | cell = row.createCell(14);//列 |
| 319 | - cell.setCellValue("spid"); | 320 | + cell.setCellValue("视频时长(秒)"); |
| 320 | cell = row.createCell(15);//列 | 321 | cell = row.createCell(15);//列 |
| 322 | + cell.setCellValue("spid"); | ||
| 323 | + cell = row.createCell(16);//列 | ||
| 321 | cell.setCellValue("sp简称"); | 324 | cell.setCellValue("sp简称"); |
| 325 | + | ||
| 322 | for (int i = 0; i < shyVideosList.size(); i++) { | 326 | for (int i = 0; i < shyVideosList.size(); i++) { |
| 323 | row = sheetlist.createRow((short) (i + 1));//行 | 327 | row = sheetlist.createRow((short) (i + 1));//行 |
| 324 | cell = row.createCell(0);//列 | 328 | cell = row.createCell(0);//列 |
| @@ -348,9 +352,11 @@ public class VideosController { | @@ -348,9 +352,11 @@ public class VideosController { | ||
| 348 | } | 352 | } |
| 349 | } | 353 | } |
| 350 | cell.setCellValue(updater); | 354 | cell.setCellValue(updater); |
| 351 | - cell = row.createCell(6);//列 | ||
| 352 | - cell.setCellValue(shyVideosList.get(i).getMsg()); | 355 | + cell = row.createCell(6);//列、增加一列 |
| 356 | + cell.setCellValue(shyVideosList.get(i).getAttr_tags()); | ||
| 353 | cell = row.createCell(7);//列 | 357 | cell = row.createCell(7);//列 |
| 358 | + cell.setCellValue(shyVideosList.get(i).getMsg()); | ||
| 359 | + cell = row.createCell(8);//列 | ||
| 354 | /*状态需要处理成用户可读*/ | 360 | /*状态需要处理成用户可读*/ |
| 355 | if (shyVideosList.get(i).getState() == 0) { | 361 | if (shyVideosList.get(i).getState() == 0) { |
| 356 | state1 = "未审核"; | 362 | state1 = "未审核"; |
| @@ -360,21 +366,21 @@ public class VideosController { | @@ -360,21 +366,21 @@ public class VideosController { | ||
| 360 | state1 = "审核拒绝"; | 366 | state1 = "审核拒绝"; |
| 361 | } | 367 | } |
| 362 | cell.setCellValue(state1); | 368 | cell.setCellValue(state1); |
| 363 | - cell = row.createCell(8);//列 | ||
| 364 | - cell.setCellValue(shyVideosList.get(i).getVideo_keyword()); | ||
| 365 | cell = row.createCell(9);//列 | 369 | cell = row.createCell(9);//列 |
| 366 | - cell.setCellValue(shyVideosList.get(i).getVideo_desc()); | 370 | + cell.setCellValue(shyVideosList.get(i).getVideo_keyword()); |
| 367 | cell = row.createCell(10);//列 | 371 | cell = row.createCell(10);//列 |
| 368 | - cell.setCellValue(shyVideosList.get(i).getVideo_id()); | 372 | + cell.setCellValue(shyVideosList.get(i).getVideo_desc()); |
| 369 | cell = row.createCell(11);//列 | 373 | cell = row.createCell(11);//列 |
| 370 | - cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getCreated_at(), "yyyy-MM-dd HH:mm:ss")); | 374 | + cell.setCellValue(shyVideosList.get(i).getVideo_id()); |
| 371 | cell = row.createCell(12);//列 | 375 | cell = row.createCell(12);//列 |
| 372 | - cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getVideo_upload_time(), "yyyy-MM-dd HH:mm:ss")); | 376 | + cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getCreated_at(), "yyyy-MM-dd HH:mm:ss")); |
| 373 | cell = row.createCell(13);//列 | 377 | cell = row.createCell(13);//列 |
| 374 | - cell.setCellValue(shyVideosList.get(i).getDuration()); | 378 | + cell.setCellValue(CommonUtils.formatDate(shyVideosList.get(i).getVideo_upload_time(), "yyyy-MM-dd HH:mm:ss")); |
| 375 | cell = row.createCell(14);//列 | 379 | cell = row.createCell(14);//列 |
| 376 | - cell.setCellValue(shyVideosList.get(i).getSpid()); | 380 | + cell.setCellValue(shyVideosList.get(i).getDuration()); |
| 377 | cell = row.createCell(15);//列 | 381 | cell = row.createCell(15);//列 |
| 382 | + cell.setCellValue(shyVideosList.get(i).getSpid()); | ||
| 383 | + cell = row.createCell(16);//列 | ||
| 378 | cell.setCellValue(sitesService.findspidDescByspid(shyVideosList.get(i).getSpid()).getName()); | 384 | cell.setCellValue(sitesService.findspidDescByspid(shyVideosList.get(i).getSpid()).getName()); |
| 379 | } | 385 | } |
| 380 | 386 | ||
| @@ -451,7 +457,7 @@ public class VideosController { | @@ -451,7 +457,7 @@ public class VideosController { | ||
| 451 | showMsg = showMsg + "," + shyVideos.getVideo_title() + " " + result.getString("msg"); | 457 | showMsg = showMsg + "," + shyVideos.getVideo_title() + " " + result.getString("msg"); |
| 452 | break; | 458 | break; |
| 453 | } | 459 | } |
| 454 | - int i = videosService.updateVideo(Integer.parseInt(shyVideoId), userId,null, 2, msg); | 460 | + int i = videosService.updateVideo(Integer.parseInt(shyVideoId), userId,null,"", 2, msg); |
| 455 | if (i == 0) { | 461 | if (i == 0) { |
| 456 | showMsg = showMsg + "," + shyVideos.getVideo_title() + " 更新失败"; | 462 | showMsg = showMsg + "," + shyVideos.getVideo_title() + " 更新失败"; |
| 457 | break; | 463 | break; |
src/main/java/com/cnlive/shenhe/entity/ShyVideos.java
| @@ -50,6 +50,10 @@ public class ShyVideos { | @@ -50,6 +50,10 @@ public class ShyVideos { | ||
| 50 | private String video_priority; | 50 | private String video_priority; |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | + * 常用审核意见 | ||
| 54 | + */ | ||
| 55 | + private String attr_tags; | ||
| 56 | + /** | ||
| 53 | * 拒绝理由 | 57 | * 拒绝理由 |
| 54 | */ | 58 | */ |
| 55 | private String msg; | 59 | private String msg; |
| @@ -686,5 +690,14 @@ public class ShyVideos { | @@ -686,5 +690,14 @@ public class ShyVideos { | ||
| 686 | public void setSpid_desc(String spid_desc) { | 690 | public void setSpid_desc(String spid_desc) { |
| 687 | this.spid_desc = spid_desc; | 691 | this.spid_desc = spid_desc; |
| 688 | } | 692 | } |
| 693 | + | ||
| 694 | + public String getAttr_tags() { | ||
| 695 | + return attr_tags; | ||
| 696 | + } | ||
| 697 | + | ||
| 698 | + public void setAttr_tags(String attr_tags) { | ||
| 699 | + this.attr_tags = attr_tags; | ||
| 700 | + } | ||
| 701 | + | ||
| 689 | 702 | ||
| 690 | } | 703 | } |
| 691 | \ No newline at end of file | 704 | \ No newline at end of file |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| @@ -99,10 +99,11 @@ public class VideosServiceImpl { | @@ -99,10 +99,11 @@ public class VideosServiceImpl { | ||
| 99 | return true; | 99 | return true; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | - public int updateVideo(Integer id, String auditor_id,String updater, Integer state, String msg) { | 102 | + public int updateVideo(Integer id, String auditor_id,String updater,String attr_tags, Integer state, String msg) { |
| 103 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(id); | 103 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(id); |
| 104 | shyVideos.setAuditor_id(auditor_id); | 104 | shyVideos.setAuditor_id(auditor_id); |
| 105 | shyVideos.setState(state); | 105 | shyVideos.setState(state); |
| 106 | + shyVideos.setAttr_tags(attr_tags); | ||
| 106 | shyVideos.setMsg(msg); | 107 | shyVideos.setMsg(msg); |
| 107 | shyVideos.setUpdater(updater); | 108 | shyVideos.setUpdater(updater); |
| 108 | if(CommonUtils.isNotEmpty(auditor_id)){ | 109 | if(CommonUtils.isNotEmpty(auditor_id)){ |
| @@ -381,14 +382,14 @@ public class VideosServiceImpl { | @@ -381,14 +382,14 @@ public class VideosServiceImpl { | ||
| 381 | shenheState=CommonConst.AUDIT_SUCCESS; | 382 | shenheState=CommonConst.AUDIT_SUCCESS; |
| 382 | } | 383 | } |
| 383 | //修改审核云的视频状态 | 384 | //修改审核云的视频状态 |
| 384 | - int i = videosService.updateVideo(video.getId(), null,video.getUpdater(), shenheState, video.getMsg()); | 385 | + int i = videosService.updateVideo(video.getId(), null,video.getUpdater(),"", shenheState, video.getMsg()); |
| 385 | if (i != 1) { | 386 | if (i != 1) { |
| 386 | logger.error("点播视频更改失败,activity_id:{}", video.getVideo_id()); | 387 | logger.error("点播视频更改失败,activity_id:{}", video.getVideo_id()); |
| 387 | } | 388 | } |
| 388 | return i; | 389 | return i; |
| 389 | } else { | 390 | } else { |
| 390 | video.setMsg("点播视频回调失败,"+video.getMsg()); | 391 | video.setMsg("点播视频回调失败,"+video.getMsg()); |
| 391 | - videosService.updateVideo(video.getId(), null,video.getUpdater(), CommonConst.AUDIT_CALLBACK_FAIL, video.getMsg()); | 392 | + videosService.updateVideo(video.getId(), null,video.getUpdater(),"", CommonConst.AUDIT_CALLBACK_FAIL, video.getMsg()); |
| 392 | logger.error("点播视频回调失败,activity_id:{},code:{},msg:{}", video.getVideo_id(), code, result.getString("msg")); | 393 | logger.error("点播视频回调失败,activity_id:{},code:{},msg:{}", video.getVideo_id(), code, result.getString("msg")); |
| 393 | } | 394 | } |
| 394 | 395 |
src/main/resources/templates/page/content.html
| @@ -52,15 +52,15 @@ | @@ -52,15 +52,15 @@ | ||
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | <div class="btn-group margin-bottom pull-right"> | 54 | <div class="btn-group margin-bottom pull-right"> |
| 55 | - <button type="button" class="btn btn-success btn-sm margin-r-5 filter " | ||
| 56 | - th:onclick="'javascript:daochu()'" value="" id="excel"> | ||
| 57 | - 导出excel | ||
| 58 | - </button> | 55 | +<!-- <button type="button" class="btn btn-success btn-sm margin-r-5 filter " --> |
| 56 | +<!-- th:onclick="'javascript:daochu()'" value="" id="excel"> --> | ||
| 57 | +<!-- 导出excel --> | ||
| 58 | +<!-- </button> --> | ||
| 59 | <button type="button" class="btn btn-sm margin-r-5 filter " | 59 | <button type="button" class="btn btn-sm margin-r-5 filter " |
| 60 | th:onclick="'javascript:quanbu()'" value="" id="quanbu"> | 60 | th:onclick="'javascript:quanbu()'" value="" id="quanbu"> |
| 61 | 全部 | 61 | 全部 |
| 62 | </button> | 62 | </button> |
| 63 | - </button> | 63 | +<!-- </button> --> |
| 64 | <button type="button" class="btn btn-sm margin-r-5 filter " id="daishen" | 64 | <button type="button" class="btn btn-sm margin-r-5 filter " id="daishen" |
| 65 | th:onclick="'javascript:daishen()'" value="0">全部待领 | 65 | th:onclick="'javascript:daishen()'" value="0">全部待领 |
| 66 | </button> | 66 | </button> |
| @@ -216,7 +216,7 @@ | @@ -216,7 +216,7 @@ | ||
| 216 | <input data-index="0" name="btSelectItem" type="checkbox" th:value="${content.id}"></td> | 216 | <input data-index="0" name="btSelectItem" type="checkbox" th:value="${content.id}"></td> |
| 217 | <td style="text-align: center; width: 6%;" th:text="${content.sp_desc}"></td> | 217 | <td style="text-align: center; width: 6%;" th:text="${content.sp_desc}"></td> |
| 218 | <td style="text-align: center; width: 20%;" > | 218 | <td style="text-align: center; width: 20%;" > |
| 219 | - <a class="detail" th:href="@{'/content/details/?id='+${content.id}}"> | 219 | + <a class="detail" th:href="@{'/content/details/'+${content.id}}"> |
| 220 | <span th:text="${content.title}">邓建国正面PK冯小刚</span> | 220 | <span th:text="${content.title}">邓建国正面PK冯小刚</span> |
| 221 | </a> | 221 | </a> |
| 222 | </td> | 222 | </td> |
src/main/resources/templates/page/videoDetail.html
| @@ -177,19 +177,19 @@ | @@ -177,19 +177,19 @@ | ||
| 177 | 177 | ||
| 178 | <div class="col-sm-9"> | 178 | <div class="col-sm-9"> |
| 179 | <select class="form-control select2 select2-hidden-accessible" | 179 | <select class="form-control select2 select2-hidden-accessible" |
| 180 | - onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" | ||
| 181 | - name="attr_tags[]" id="attr_tags" style="width: 100%;" | 180 | + onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" |
| 181 | + name="attr_tags[]" id="attr_tags" style="width: 100%;" | ||
| 182 | tabindex="-1" aria-hidden="true"> | 182 | tabindex="-1" aria-hidden="true"> |
| 183 | - <option value="其他">其他</option> | ||
| 184 | - <option value="不符">不符</option> | ||
| 185 | - <option value="规范">规范</option> | ||
| 186 | - <option value="建议">建议</option> | ||
| 187 | - <option value="错字">错字</option> | ||
| 188 | - <option value="要求">要求</option> | ||
| 189 | - <option value="图片">图片</option> | ||
| 190 | - <option value="敏感">敏感</option> | ||
| 191 | - <option value="视频">视频</option> | ||
| 192 | - <option value="提交">提交</option> | 183 | + <option value="其他" th:selected="${video.attr_tags.indexOf('其他')!=-1}">其他</option> |
| 184 | + <option value="不符" th:selected="${video.attr_tags.indexOf('不符')!=-1}">不符</option> | ||
| 185 | + <option value="规范" th:selected="${video.attr_tags.indexOf('规范')!=-1}">规范</option> | ||
| 186 | + <option value="建议" th:selected="${video.attr_tags.indexOf('建议')!=-1}">建议</option> | ||
| 187 | + <option value="错字" th:selected="${video.attr_tags.indexOf('错字')!=-1}">错字</option> | ||
| 188 | + <option value="要求" th:selected="${video.attr_tags.indexOf('要求')!=-1}">要求</option> | ||
| 189 | + <option value="图片" th:selected="${video.attr_tags.indexOf('图片')!=-1}">图片</option> | ||
| 190 | + <option value="敏感" th:selected="${video.attr_tags.indexOf('敏感')!=-1}">敏感</option> | ||
| 191 | + <option value="视频" th:selected="${video.attr_tags.indexOf('视频')!=-1}">视频</option> | ||
| 192 | + <option value="提交" th:selected="${video.attr_tags.indexOf('提交')!=-1}">提交</option> | ||
| 193 | </select> | 193 | </select> |
| 194 | </div> | 194 | </div> |
| 195 | </div> | 195 | </div> |
| @@ -267,7 +267,7 @@ | @@ -267,7 +267,7 @@ | ||
| 267 | <script th:inline="javascript"> | 267 | <script th:inline="javascript"> |
| 268 | //使常用审核意见回显到下方的备注中 | 268 | //使常用审核意见回显到下方的备注中 |
| 269 | function change() { | 269 | function change() { |
| 270 | - $("#msg").val($("#attr_tags").val()); | 270 | +// $("#msg").val($("#attr_tags").val()); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | /*拒绝*/ | 273 | /*拒绝*/ |
| @@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
| 313 | id: id, | 313 | id: id, |
| 314 | activity_id: activity_id, | 314 | activity_id: activity_id, |
| 315 | state: state, | 315 | state: state, |
| 316 | - attr_tags: msg, | 316 | + attr_tags: attr_tags+"", |
| 317 | msg: msg, | 317 | msg: msg, |
| 318 | callback: callback | 318 | callback: callback |
| 319 | }, | 319 | }, |
| @@ -344,7 +344,7 @@ | @@ -344,7 +344,7 @@ | ||
| 344 | id: id, | 344 | id: id, |
| 345 | activity_id: activity_id, | 345 | activity_id: activity_id, |
| 346 | state: state, | 346 | state: state, |
| 347 | - attr_tags: msg, | 347 | + attr_tags: attr_tags+"", |
| 348 | msg: msg, | 348 | msg: msg, |
| 349 | callback: callback | 349 | callback: callback |
| 350 | }, | 350 | }, |