Commit 2a78ceef82b54b2e90df3a8116eaf1f4628913f6
1 parent
3857f059
点播审核增加审核员查询
Showing
4 changed files
with
51 additions
and
8 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -20,12 +20,14 @@ import com.cnlive.shenhe.utils.CommonConst; |
| 20 | 20 | import com.cnlive.shenhe.utils.CommonUtils; |
| 21 | 21 | import com.cnlive.shenhe.utils.InfoUtil; |
| 22 | 22 | import com.github.pagehelper.PageInfo; |
| 23 | +import org.jsoup.helper.DataUtil; | |
| 23 | 24 | import org.slf4j.Logger; |
| 24 | 25 | import org.slf4j.LoggerFactory; |
| 25 | 26 | import org.springframework.beans.factory.annotation.Autowired; |
| 26 | 27 | import org.springframework.beans.factory.annotation.Value; |
| 27 | 28 | import org.springframework.stereotype.Controller; |
| 28 | 29 | import org.springframework.ui.Model; |
| 30 | +import org.springframework.util.StringUtils; | |
| 29 | 31 | import org.springframework.web.bind.annotation.GetMapping; |
| 30 | 32 | import org.springframework.web.bind.annotation.PostMapping; |
| 31 | 33 | import org.springframework.web.bind.annotation.RequestMapping; |
| ... | ... | @@ -115,7 +117,16 @@ public class VideosController extends BaseController { |
| 115 | 117 | * @return |
| 116 | 118 | */ |
| 117 | 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 | 130 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 120 | 131 | if (CommonUtils.isNull(sessionUser)) { |
| 121 | 132 | return "redirect:/users/login"; |
| ... | ... | @@ -136,7 +147,7 @@ public class VideosController extends BaseController { |
| 136 | 147 | } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) { |
| 137 | 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 | 151 | List<ShyVideos> list = videoPage.getList(); |
| 141 | 152 | if (!list.isEmpty()) { |
| 142 | 153 | for (ShyVideos videos : list) { | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java
| ... | ... | @@ -50,6 +50,19 @@ public class UsersServiceImpl { |
| 50 | 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 | 66 | public ShyUsers get(Integer id) { |
| 54 | 67 | return shyUsersMapper.selectByPrimaryKey(id); |
| 55 | 68 | } | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| ... | ... | @@ -109,7 +109,7 @@ public class VideosServiceImpl { |
| 109 | 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 | 113 | Example example = new Example(ShyVideos.class); |
| 114 | 114 | Example.Criteria criteria = example.createCriteria(); |
| 115 | 115 | Example.Criteria criteria2 = example.createCriteria(); |
| ... | ... | @@ -142,6 +142,16 @@ public class VideosServiceImpl { |
| 142 | 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 | 155 | if (source!=null) { |
| 146 | 156 | criteria.andEqualTo("source", source); |
| 147 | 157 | criteria2.andEqualTo("source", source); | ... | ... |
src/main/resources/templates/page/video.html
| ... | ... | @@ -174,6 +174,13 @@ |
| 174 | 174 | </div> |
| 175 | 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 | 184 | <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> --> |
| 178 | 185 | <!-- <label for="count" class="control-label cb-toolbar">每页条数:</label> --> |
| 179 | 186 | <!-- <div class="col-sm-5" style="padding: 0;"> --> |
| ... | ... | @@ -455,6 +462,7 @@ |
| 455 | 462 | var sp_Id = ""; |
| 456 | 463 | var source = ""; |
| 457 | 464 | var video_user_id = ""; |
| 465 | + var shen_auditor_id = ""; | |
| 458 | 466 | |
| 459 | 467 | |
| 460 | 468 | function updateValue(){ |
| ... | ... | @@ -470,6 +478,7 @@ |
| 470 | 478 | sp_desc = $("#sp_desc").val(); |
| 471 | 479 | count = $("#pageSize").val(); |
| 472 | 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 | 486 | //全部 |
| 478 | 487 | function quanbu() { |
| 479 | 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 | 494 | updateValue(); |
| 486 | 495 | if($.trim(state) == '') state=0; |
| 487 | 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 | 500 | $('#Mydaishen').click(function () { |
| 492 | 501 | updateValue(); |
| 493 | 502 | var receive = 1; |
| 494 | 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 | 507 | $('#yishen').click(function () { |
| 499 | 508 | updateValue(); |
| 500 | 509 | var receive = 1; |
| 501 | 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 | 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 | 520 | $('#select_all').click(function () { | ... | ... |