Commit 09903f32f7a253efb5c5cab6c3bf2315d221118a

Authored by 徐近程
2 parents 22b7c8ce 2a78ceef

Merge branch 'dev'

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/comment.html
... ... @@ -60,9 +60,9 @@
60 60  
61 61 <div class="btn-group margin-bottom pull-right">
62 62 <div class="btn-group margin-bottom">
63   - <button type="button" class="btn btn-success btn-sm margin-r-5 filter "
64   - th:onclick="'javascript:daochu()'" value="" id="excel">导出excel
65   - </button>
  63 + <button type="button" class="btn btn-success btn-sm margin-r-5 filter "
  64 + th:onclick="'javascript:daochu()'" value="" id="excel">导出excel
  65 + </button>
66 66 <button type="button" id="quanbu"
67 67 class="btn btn-sm margin-r-5 action_bottom"
68 68 th:onclick="'javascript:quanbu()'">全部
... ... @@ -90,7 +90,6 @@
90 90  
91 91 <div class="form-horizontal form-group-sm" id="forms" style="display: none;">
92 92 <form id="commentForm">
93   -<!-- <input th:value="${param.state}"/> -->
94 93 <div class="btn-group margin-bottom col-md-6" style="padding: 0;">
95 94 <div class="col-md-4" style="padding: 0">
96 95 <label for="activity_id" class="control-label cb-toolbar">活动id:</label>
... ... @@ -102,8 +101,7 @@
102 101 <div class="col-md-5" style="padding: 0">
103 102 <label for="content" class="control-label cb-toolbar">内容:</label>
104 103 <div class="col-sm-9" style="padding: 0;">
105   - <input class="form-control" name="content" type="text" id="content"
106   - >
  104 + <input class="form-control" name="content" type="text" id="content">
107 105 </div>
108 106 </div>
109 107 <div class="col-md-3" style="padding: 0">
... ... @@ -117,28 +115,27 @@
117 115 </select>
118 116 </div>
119 117 </div>
120   -
121 118 </div>
122 119  
123 120 <div class="btn-group margin-bottom col-md-6 pull-right" style="padding: 0">
124   - <div class="col-md-3" style="padding: 0">
125   - <label for="state" class="control-label cb-toolbar">类型:</label>
126   - <div class="col-sm-8" style="padding: 0;">
127   - <select class="form-control col-sm-2" id="topic" name="topic">
128   - <option value="">全部</option>
129   - <option value="0" >话题</option>
130   - <option value="1" >其他</option>
131   - </select>
132   - </div>
133   - </div>
134   - <div class="col-md-5" style="padding: 0;">
135   - <label for="start_date" class="control-label cb-toolbar">时间:</label>
  121 + <div class="col-md-3" style="padding: 0">
  122 + <label for="state" class="control-label cb-toolbar">类型:</label>
  123 + <div class="col-sm-8" style="padding: 0;">
  124 + <select class="form-control col-sm-2" id="topic" name="topic">
  125 + <option value="">全部</option>
  126 + <option value="0" >话题</option>
  127 + <option value="1" >其他</option>
  128 + </select>
  129 + </div>
  130 + </div>
  131 + <div class="col-md-5" style="padding: 0;">
  132 + <label for="start_date" class="control-label cb-toolbar">时间:</label>
136 133 <div class="input-group col-md-9 date">
137 134 <input class="form-control date" name="start_date" type="text"
138 135 id="start_date" >
139 136 <span class="input-group-addon">
140   - <span class="glyphicon glyphicon-calendar"></span>
141   - </span>
  137 + <span class="glyphicon glyphicon-calendar"></span>
  138 + </span>
142 139 </div>
143 140 </div>
144 141 <div class="col-md-4" style="padding: 0;">
... ... @@ -147,18 +144,12 @@
147 144 <input class="form-control date" name="end_date" type="text"
148 145 id="end_date" >
149 146 <span class="input-group-addon">
150   - <span class="glyphicon glyphicon-calendar"></span>
151   - </span>
  147 + <span class="glyphicon glyphicon-calendar"></span>
  148 + </span>
152 149 </div>
153 150 </div>
154   -<!-- <div class="col-md-4" style="padding: 0;width: 2%;"> -->
155   -<!-- <button type="button" class="btn btn-info btn-sm" id="comments_query" -->
156   -<!-- onclick="javascript:$('#commentForm').submit();">查 询 -->
157   -<!-- </button> -->
158   -<!-- </div> -->
159 151 </div>
160 152 </form>
161   -
162 153 </div>
163 154  
164 155 <div class="bootstrap-table">
... ... @@ -336,9 +327,12 @@
336 327 <!-- </a> -->
337 328 </td>
338 329 </tr>
  330 +
339 331 </tbody>
340 332 </table>
341 333 </div>
  334 +
  335 +
342 336 <div class="fixed-table-footer" style="display: none;">
343 337 <table>
344 338 <tbody>
... ... @@ -396,9 +390,46 @@
396 390 </div>
397 391 </div>
398 392 </div>
399   - <div class="clearfix"></div>
  393 + <div class="clearfix">
  394 + </div>
  395 +
  396 + <div class="clearfix" style="text-indent:20em;">
  397 + <div class="btn-group margin-bottom pull-left">
  398 + <div class="btn-group margin-bottom hide" id="hide_select_area1">
  399 + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom"
  400 + id="more_pass1">批量通过
  401 + </button>
  402 + <button type="button" class="btn btn-danger btn-sm margin-r-5 action_bottom"
  403 + id="more_reject1">批量拒绝
  404 + </button>
  405 + </div>
  406 +
  407 + <div class="btn-group margin-bottom" id="receive_select1">
  408 + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom"
  409 + onclick="receive(0);">认领
  410 + </button>
  411 + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom"
  412 + onclick="receive(10);">认领10条
  413 + </button>
  414 + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom"
  415 + onclick="receive(100);">认领100条
  416 + </button>
  417 + <button type="button" class="btn btn-warning btn-sm margin-r-5 action_bottom"
  418 + onclick="retReceive();">退领
  419 + </button>
  420 + <button type="button" class="btn btn-danger btn-sm margin-r-5 action claim"
  421 + value="2" data="claim1000" id="claim10001" data-toggle="modal"
  422 + data-target="#modal" onclick="repulse();">拒绝
  423 + </button>
  424 + <button type="button" class="btn btn-success btn-sm margin-r-5 action_bottom"
  425 + id="morePass1" onclick="morePass();">批量通过
  426 + </button>
  427 + </div>
  428 + </div>
  429 + </div>
400 430  
401 431 </div>
  432 +
402 433 </div>
403 434 </div>
404 435 </div>
... ...
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 () {
... ...