Commit 2a78ceef82b54b2e90df3a8116eaf1f4628913f6

Authored by 徐近程
1 parent 3857f059

点播审核增加审核员查询

src/main/java/com/cnlive/shenhe/controller/VideosController.java
@@ -20,12 +20,14 @@ import com.cnlive.shenhe.utils.CommonConst; @@ -20,12 +20,14 @@ import com.cnlive.shenhe.utils.CommonConst;
20 import com.cnlive.shenhe.utils.CommonUtils; 20 import com.cnlive.shenhe.utils.CommonUtils;
21 import com.cnlive.shenhe.utils.InfoUtil; 21 import com.cnlive.shenhe.utils.InfoUtil;
22 import com.github.pagehelper.PageInfo; 22 import com.github.pagehelper.PageInfo;
  23 +import org.jsoup.helper.DataUtil;
23 import org.slf4j.Logger; 24 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory; 25 import org.slf4j.LoggerFactory;
25 import org.springframework.beans.factory.annotation.Autowired; 26 import org.springframework.beans.factory.annotation.Autowired;
26 import org.springframework.beans.factory.annotation.Value; 27 import org.springframework.beans.factory.annotation.Value;
27 import org.springframework.stereotype.Controller; 28 import org.springframework.stereotype.Controller;
28 import org.springframework.ui.Model; 29 import org.springframework.ui.Model;
  30 +import org.springframework.util.StringUtils;
29 import org.springframework.web.bind.annotation.GetMapping; 31 import org.springframework.web.bind.annotation.GetMapping;
30 import org.springframework.web.bind.annotation.PostMapping; 32 import org.springframework.web.bind.annotation.PostMapping;
31 import org.springframework.web.bind.annotation.RequestMapping; 33 import org.springframework.web.bind.annotation.RequestMapping;
@@ -115,7 +117,16 @@ public class VideosController extends BaseController { @@ -115,7 +117,16 @@ public class VideosController extends BaseController {
115 * @return 117 * @return
116 */ 118 */
117 @GetMapping("/page") 119 @GetMapping("/page")
118 - 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, String sp_Id,Integer source,String video_user_id, HttpSession session) { 120 + 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, String sp_Id,Integer source,String video_user_id,String shen_auditor_id, HttpSession session) {
  121 + if (!StringUtils.isEmpty(shen_auditor_id)) {
  122 + if((!"自动审核".equals(shen_auditor_id))&&(!"白名单".equals(shen_auditor_id))){
  123 + shen_auditor_id = usersService.findspidByName(shen_auditor_id);
  124 + }
  125 + }
  126 +
  127 +
  128 +
  129 +
119 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 130 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
120 if (CommonUtils.isNull(sessionUser)) { 131 if (CommonUtils.isNull(sessionUser)) {
121 return "redirect:/users/login"; 132 return "redirect:/users/login";
@@ -136,7 +147,7 @@ public class VideosController extends BaseController { @@ -136,7 +147,7 @@ public class VideosController extends BaseController {
136 } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) { 147 } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) {
137 spid = null; 148 spid = null;
138 } 149 }
139 - PageInfo<ShyVideos> videoPage = videosService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId,sp_Id,source,video_user_id); 150 + PageInfo<ShyVideos> videoPage = videosService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId,sp_Id,source,video_user_id,shen_auditor_id);
140 List<ShyVideos> list = videoPage.getList(); 151 List<ShyVideos> list = videoPage.getList();
141 if (!list.isEmpty()) { 152 if (!list.isEmpty()) {
142 for (ShyVideos videos : list) { 153 for (ShyVideos videos : list) {
src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java
@@ -50,6 +50,19 @@ public class UsersServiceImpl { @@ -50,6 +50,19 @@ public class UsersServiceImpl {
50 return pageInfo; 50 return pageInfo;
51 } 51 }
52 52
  53 + public String findspidByName(String shen_auditor_id) {
  54 + Example example = new Example(ShyUsers.class);
  55 + Example.Criteria criteria = example.createCriteria();
  56 + criteria.andEqualTo("username", shen_auditor_id);
  57 + List<ShyUsers> shyUsersList = shyUsersMapper.selectByExample(example);
  58 + if (CommonUtils.isNotNull(shyUsersList) && shyUsersList.size() > 0) {
  59 + ShyUsers shyUsers = shyUsersList.get(0);
  60 + String user_id = shyUsers.getUser_id();
  61 + return user_id;
  62 + }
  63 + return null;
  64 + }
  65 +
53 public ShyUsers get(Integer id) { 66 public ShyUsers get(Integer id) {
54 return shyUsersMapper.selectByPrimaryKey(id); 67 return shyUsersMapper.selectByPrimaryKey(id);
55 } 68 }
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
@@ -109,7 +109,7 @@ public class VideosServiceImpl { @@ -109,7 +109,7 @@ public class VideosServiceImpl {
109 return shyVideosMapper.updateByPrimaryKey(shyVideos); 109 return shyVideosMapper.updateByPrimaryKey(shyVideos);
110 } 110 }
111 111
112 - 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, String sp_Id,Integer source,String video_user_id) { 112 + 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, String sp_Id,Integer source,String video_user_id,String shen_auditor_id) {
113 Example example = new Example(ShyVideos.class); 113 Example example = new Example(ShyVideos.class);
114 Example.Criteria criteria = example.createCriteria(); 114 Example.Criteria criteria = example.createCriteria();
115 Example.Criteria criteria2 = example.createCriteria(); 115 Example.Criteria criteria2 = example.createCriteria();
@@ -142,6 +142,16 @@ public class VideosServiceImpl { @@ -142,6 +142,16 @@ public class VideosServiceImpl {
142 criteria2.andEqualTo("video_priority", video_priority); 142 criteria2.andEqualTo("video_priority", video_priority);
143 } 143 }
144 144
  145 + if(CommonUtils.isNotEmpty(shen_auditor_id)){
  146 + if("白名单".equals(shen_auditor_id)||"自动审核".equals(shen_auditor_id)){
  147 + criteria.andEqualTo("updater", shen_auditor_id);
  148 + criteria2.andEqualTo("updater", shen_auditor_id);
  149 + }else{
  150 + criteria.andEqualTo("auditor_id", shen_auditor_id);
  151 + criteria2.andEqualTo("auditor_id", shen_auditor_id);
  152 + }
  153 + }
  154 +
145 if (source!=null) { 155 if (source!=null) {
146 criteria.andEqualTo("source", source); 156 criteria.andEqualTo("source", source);
147 criteria2.andEqualTo("source", source); 157 criteria2.andEqualTo("source", source);
src/main/resources/templates/page/video.html
@@ -174,6 +174,13 @@ @@ -174,6 +174,13 @@
174 </div> 174 </div>
175 </div> 175 </div>
176 176
  177 + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}">
  178 + <label for="shen_auditor_id" class="control-label cb-toolbar">审核员</label>
  179 + <div class="col-sm-9" style="padding: 0;">
  180 + <input class="form-control" type="text" value="" id="shen_auditor_id">
  181 + </div>
  182 + </div>
  183 +
177 <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> --> 184 <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> -->
178 <!-- <label for="count" class="control-label cb-toolbar">每页条数:</label> --> 185 <!-- <label for="count" class="control-label cb-toolbar">每页条数:</label> -->
179 <!-- <div class="col-sm-5" style="padding: 0;"> --> 186 <!-- <div class="col-sm-5" style="padding: 0;"> -->
@@ -455,6 +462,7 @@ @@ -455,6 +462,7 @@
455 var sp_Id = ""; 462 var sp_Id = "";
456 var source = ""; 463 var source = "";
457 var video_user_id = ""; 464 var video_user_id = "";
  465 + var shen_auditor_id = "";
458 466
459 467
460 function updateValue(){ 468 function updateValue(){
@@ -470,6 +478,7 @@ @@ -470,6 +478,7 @@
470 sp_desc = $("#sp_desc").val(); 478 sp_desc = $("#sp_desc").val();
471 count = $("#pageSize").val(); 479 count = $("#pageSize").val();
472 video_user_id = $("#video_user_id").val(); 480 video_user_id = $("#video_user_id").val();
  481 + shen_auditor_id = $("#shen_auditor_id").val();
473 } 482 }
474 } 483 }
475 484
@@ -477,7 +486,7 @@ @@ -477,7 +486,7 @@
477 //全部 486 //全部
478 function quanbu() { 487 function quanbu() {
479 updateValue(); 488 updateValue();
480 - window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id; 489 + window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id+"&shen_auditor_id="+shen_auditor_id;
481 } 490 }
482 491
483 //全部待领 492 //全部待领
@@ -485,27 +494,27 @@ @@ -485,27 +494,27 @@
485 updateValue(); 494 updateValue();
486 if($.trim(state) == '') state=0; 495 if($.trim(state) == '') state=0;
487 var receive = 0; 496 var receive = 0;
488 - 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id; 497 + 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id+"&shen_auditor_id="+shen_auditor_id;
489 }); 498 });
490 //我的待审核 499 //我的待审核
491 $('#Mydaishen').click(function () { 500 $('#Mydaishen').click(function () {
492 updateValue(); 501 updateValue();
493 var receive = 1; 502 var receive = 1;
494 if($.trim(state) == '') state=0; 503 if($.trim(state) == '') state=0;
495 - 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id; 504 + 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id+"&shen_auditor_id="+shen_auditor_id;
496 }); 505 });
497 //我的已审核 506 //我的已审核
498 $('#yishen').click(function () { 507 $('#yishen').click(function () {
499 updateValue(); 508 updateValue();
500 var receive = 1; 509 var receive = 1;
501 if($.trim(state) == '') state=3;//审核状态,3代表通过和拒绝都查询 510 if($.trim(state) == '') state=3;//审核状态,3代表通过和拒绝都查询
502 - 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id; 511 + 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+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id+"&shen_auditor_id="+shen_auditor_id;
503 }); 512 });
504 513
505 514
506 //查询 515 //查询
507 $('#videos_query').click(function () { 516 $('#videos_query').click(function () {
508 - window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id; 517 + window.location.href = "/videos/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id+"&source="+source+"&video_user_id="+video_user_id+"&shen_auditor_id="+shen_auditor_id;
509 }); 518 });
510 /*全选的操作*/ 519 /*全选的操作*/
511 $('#select_all').click(function () { 520 $('#select_all').click(function () {