Commit cb44c8f5349af50e7f5340ea163b306694348c41

Authored by 王言钊
1 parent 67323c72

修复音频、活动管理模块并测试

src/main/java/com/cnlive/shenhe/FinalShell.java
@@ -7,6 +7,13 @@ import java.util.Scanner; @@ -7,6 +7,13 @@ import java.util.Scanner;
7 7
8 public class FinalShell { 8 public class FinalShell {
9 public static void main(String[] args) throws NoSuchAlgorithmException, IOException { 9 public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
  10 + //int[] array = {2, 0, 6, 7, 3, 8, 1};
  11 + //int[] index = {6, 4, 0, 3, 6, 1, 3, 5, 3, 1, 0};
  12 + //StringBuilder tel = new StringBuilder();
  13 + //for (int i : index) {
  14 + // tel.append(array[i]);
  15 + //}
  16 + //System.out.println("tel&&wx:" + tel);
10 System.out.print("请输入FinalShell的离线机器码:"); 17 System.out.print("请输入FinalShell的离线机器码:");
11 Scanner reader = new Scanner(System.in); 18 Scanner reader = new Scanner(System.in);
12 String machineCode = reader.nextLine(); 19 String machineCode = reader.nextLine();
src/main/java/com/cnlive/shenhe/dto/AudioDTO.java
@@ -65,7 +65,7 @@ public class AudioDTO extends ShyAudio implements Serializable { @@ -65,7 +65,7 @@ public class AudioDTO extends ShyAudio implements Serializable {
65 } 65 }
66 66
67 public Integer getPage() { 67 public Integer getPage() {
68 - return page == null ? 1 : page; 68 + return page;
69 } 69 }
70 70
71 public void setPage(Integer page) { 71 public void setPage(Integer page) {
@@ -73,7 +73,7 @@ public class AudioDTO extends ShyAudio implements Serializable { @@ -73,7 +73,7 @@ public class AudioDTO extends ShyAudio implements Serializable {
73 } 73 }
74 74
75 public Integer getPageSize() { 75 public Integer getPageSize() {
76 - return pageSize == null ? 10 : pageSize; 76 + return pageSize;
77 } 77 }
78 78
79 public void setPageSize(Integer pageSize) { 79 public void setPageSize(Integer pageSize) {
src/main/java/com/cnlive/shenhe/dto/ShyActivityDTO.java
@@ -14,7 +14,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable { @@ -14,7 +14,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable {
14 14
15 private Integer pageNum; 15 private Integer pageNum;
16 16
17 - private Integer pageSize ; 17 + private Integer pageSize;
18 18
19 19
20 public ShyActivityDTO(Integer pageNum, Integer pageSize) { 20 public ShyActivityDTO(Integer pageNum, Integer pageSize) {
@@ -26,7 +26,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable { @@ -26,7 +26,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable {
26 } 26 }
27 27
28 public Integer getPageNum() { 28 public Integer getPageNum() {
29 - return pageNum == null ? 1 : pageNum; 29 + return pageNum;
30 } 30 }
31 31
32 public void setPageNum(Integer pageNum) { 32 public void setPageNum(Integer pageNum) {
@@ -34,7 +34,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable { @@ -34,7 +34,7 @@ public class ShyActivityDTO extends ShyActivity implements Serializable {
34 } 34 }
35 35
36 public Integer getPageSize() { 36 public Integer getPageSize() {
37 - return pageSize == null ? 10 : pageSize; 37 + return pageSize;
38 } 38 }
39 39
40 public void setPageSize(Integer pageSize) { 40 public void setPageSize(Integer pageSize) {
src/main/resources/templates/common/frame.html
@@ -79,7 +79,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" @@ -79,7 +79,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em"
79 </a> 79 </a>
80 <ul class="treeview-menu"> 80 <ul class="treeview-menu">
81 <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> 81 <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li>
82 - <li><a href="/audio/page?state=0&receive=0" id="/audio/page"> 音频审核</a></li> 82 + <li><a href="/audio/page?state=0&receive=0&page=1&pageSize=10" id="/audio/page"> 音频审核</a></li>
83 <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> 83 <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li>
84 <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> 84 <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li>
85 <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> 85 <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li>
@@ -98,7 +98,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot; @@ -98,7 +98,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot;
98 <li><a href="/email/page" id="/email/page"> 邮件消息管理</a></li> 98 <li><a href="/email/page" id="/email/page"> 邮件消息管理</a></li>
99 <li><a href="/usersFree/page" id="/usersFree/page"> 网++白名单管理</a></li> 99 <li><a href="/usersFree/page" id="/usersFree/page"> 网++白名单管理</a></li>
100 <li><a href="/notSpeak/page" id="/notSpeak/page"> 网++禁言管理</a></li> 100 <li><a href="/notSpeak/page" id="/notSpeak/page"> 网++禁言管理</a></li>
101 - <li><a href="/activity/page" id="/activity/page"> 活动管理</a></li> 101 + <li><a href="/activity/page?pageNum=1&pageSize=10" id="/activity/page"> 活动管理</a></li>
102 <li><a href="/log/page" id="/log/page"> 日志管理</a></li> 102 <li><a href="/log/page" id="/log/page"> 日志管理</a></li>
103 </ul> 103 </ul>
104 </li> 104 </li>
src/main/resources/templates/page/activity.html
@@ -223,7 +223,8 @@ @@ -223,7 +223,8 @@
223 <option value="10" th:selected="${ShyActivitylist.pageSize==10}">10</option> 223 <option value="10" th:selected="${ShyActivitylist.pageSize==10}">10</option>
224 <option value="20" th:selected="${ShyActivitylist.pageSize==20}">20</option> 224 <option value="20" th:selected="${ShyActivitylist.pageSize==20}">20</option>
225 <option value="50" th:selected="${ShyActivitylist.pageSize==50}">50</option> 225 <option value="50" th:selected="${ShyActivitylist.pageSize==50}">50</option>
226 - <option value="100" th:selected="${ShyActivitylist.pageSize==100}">100</option> 226 + <option value="100" th:selected="${ShyActivitylist.pageSize==100}">100
  227 + </option>
227 </select> <span class="pagination-info">条记录</span> 228 </select> <span class="pagination-info">条记录</span>
228 </div> 229 </div>
229 <div class="pull-right pagination"> 230 <div class="pull-right pagination">
@@ -309,9 +310,9 @@ @@ -309,9 +310,9 @@
309 310
310 <select class="" id="exempt_from_trial" name="exempt_from_trial"> 311 <select class="" id="exempt_from_trial" name="exempt_from_trial">
311 <option value="" name="-选择审核类型-">-选择审核类型-</option> 312 <option value="" name="-选择审核类型-">-选择审核类型-</option>
312 - <option value="1" name="非免审">免审</option>  
313 - <option value="2" name="免审">机审</option>  
314 - <option value="3" name="免审">人工审</option> 313 + <option value="1" name="免审">免审</option>
  314 + <option value="2" name="机审">机审</option>
  315 + <option value="3" name="人工审">人工审</option>
315 </select> 316 </select>
316 </div> 317 </div>
317 </div> 318 </div>
@@ -470,7 +471,7 @@ @@ -470,7 +471,7 @@
470 if (s.indexOf("pageSize=") < 0 && s.indexOf("pageNum=") < 0) h = h + "&" + split[i]; 471 if (s.indexOf("pageSize=") < 0 && s.indexOf("pageNum=") < 0) h = h + "&" + split[i];
471 } 472 }
472 h = h.substring(1, h.length); 473 h = h.substring(1, h.length);
473 - window.location.href = "/activity/page?" + h + "&pageSize=" + pageSize; 474 + window.location.href = "/activity/page?" + h + "&pageNum=" + 1 + "&pageSize=" + pageSize;
474 } else { 475 } else {
475 var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 476 var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
476 var split = se.split("&"); 477 var split = se.split("&");
@@ -480,7 +481,7 @@ @@ -480,7 +481,7 @@
480 if (s.indexOf("pageNum=") < 0) h = h + "&" + split[i]; 481 if (s.indexOf("pageNum=") < 0) h = h + "&" + split[i];
481 } 482 }
482 h = h.substring(1, h.length); 483 h = h.substring(1, h.length);
483 - window.location.href = "/activity/page?" + h + "&pageSize=" + pageSize; 484 + window.location.href = "/activity/page?" + h + "&pageNum=" + 1 + "&pageSize=" + pageSize;
484 } 485 }
485 } 486 }
486 487
@@ -492,7 +493,7 @@ @@ -492,7 +493,7 @@
492 var exempt_from_trial = $("#exempt_from_trial_query").val(); 493 var exempt_from_trial = $("#exempt_from_trial_query").val();
493 // exempt_from_trial.selected = true; 494 // exempt_from_trial.selected = true;
494 var pageSize = $("#pageSize").val(); 495 var pageSize = $("#pageSize").val();
495 - window.location.href = "/activity/page?activity=" + activity + "&exempt_from_trial=" + exempt_from_trial + "&pageSize=" + pageSize; 496 + window.location.href = "/activity/page?activity=" + activity + "&exempt_from_trial=" + exempt_from_trial + "&pageNum=" + 1 + "&pageSize=" + pageSize;
496 }); 497 });
497 498
498 //鼠标回车事件 499 //鼠标回车事件
src/main/resources/templates/page/audio.html
@@ -81,7 +81,8 @@ @@ -81,7 +81,8 @@
81 <div class="col-md-5" style="padding: 0;width: 100%;"> 81 <div class="col-md-5" style="padding: 0;width: 100%;">
82 <label for="video_titleID" class="control-label cb-toolbar">标题:</label> 82 <label for="video_titleID" class="control-label cb-toolbar">标题:</label>
83 <div class="col-sm-9" style="padding: 0;"> 83 <div class="col-sm-9" style="padding: 0;">
84 - <input class="form-control" type="text" th:value="${AudioTitle}" value="" id="video_titleID"> 84 + <input class="form-control" type="text" th:value="${AudioTitle}" value=""
  85 + id="video_titleID">
85 </div> 86 </div>
86 </div> 87 </div>
87 </div> 88 </div>
@@ -108,7 +109,8 @@ @@ -108,7 +109,8 @@
108 <div class="col-md-10" style="padding: 0;width: 25%;"> 109 <div class="col-md-10" style="padding: 0;width: 25%;">
109 <label for="start_date" class="control-label cb-toolbar">时间:</label> 110 <label for="start_date" class="control-label cb-toolbar">时间:</label>
110 <div class="input-group col-md-9 date"> 111 <div class="input-group col-md-9 date">
111 - <input class="form-control date" name="start_date" type="text" th:value="${Start_date}" 112 + <input class="form-control date" name="start_date" type="text"
  113 + th:value="${Start_date}"
112 id="start_date"> 114 id="start_date">
113 <span class="input-group-addon"> 115 <span class="input-group-addon">
114 <span class="glyphicon glyphicon-calendar"></span> 116 <span class="glyphicon glyphicon-calendar"></span>
@@ -118,7 +120,8 @@ @@ -118,7 +120,8 @@
118 <div class="col-md-10" style="padding: 0;width: 25%;"> 120 <div class="col-md-10" style="padding: 0;width: 25%;">
119 <label for="start_date" class="control-label cb-toolbar">至</label> 121 <label for="start_date" class="control-label cb-toolbar">至</label>
120 <div class="input-group col-md-9 date"> 122 <div class="input-group col-md-9 date">
121 - <input class="form-control date" name="end_date" type="text" th:value="${End_date}" 123 + <input class="form-control date" name="end_date" type="text"
  124 + th:value="${End_date}"
122 id="end_date"> 125 id="end_date">
123 <span class="input-group-addon"> 126 <span class="input-group-addon">
124 <span class="glyphicon glyphicon-calendar"></span> 127 <span class="glyphicon glyphicon-calendar"></span>
@@ -130,7 +133,8 @@ @@ -130,7 +133,8 @@
130 th:if="${session.sessionUser.spid==0}"> 133 th:if="${session.sessionUser.spid==0}">
131 <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label> 134 <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label>
132 <div class="col-sm-9" style="padding: 0;"> 135 <div class="col-sm-9" style="padding: 0;">
133 - <input class="form-control" type="text" th:value="${Sp_desc}" value="" id="sp_desc"> 136 + <input class="form-control" type="text" th:value="${Sp_desc}" value=""
  137 + id="sp_desc">
134 </div> 138 </div>
135 </div> 139 </div>
136 140
@@ -138,7 +142,8 @@ @@ -138,7 +142,8 @@
138 th:if="${session.sessionUser.spid==0}"> 142 th:if="${session.sessionUser.spid==0}">
139 <label for="sp_Id" class="control-label cb-toolbar">sp_Id</label> 143 <label for="sp_Id" class="control-label cb-toolbar">sp_Id</label>
140 <div class="col-sm-9" style="padding: 0;"> 144 <div class="col-sm-9" style="padding: 0;">
141 - <input class="form-control" type="text" th:value="${Sp_id}" value="" id="sp_Id"> 145 + <input class="form-control" type="text" th:value="${Sp_id}" value=""
  146 + id="sp_Id">
142 </div> 147 </div>
143 </div> 148 </div>
144 <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> --> 149 <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> -->
@@ -399,7 +404,7 @@ @@ -399,7 +404,7 @@
399 if (s.indexOf("pageSize=") < 0 && s.indexOf("page=") < 0) h = h + "&" + split[i]; 404 if (s.indexOf("pageSize=") < 0 && s.indexOf("page=") < 0) h = h + "&" + split[i];
400 } 405 }
401 h = h.substring(1, h.length); 406 h = h.substring(1, h.length);
402 - window.location.href = "/audio/page?" + h + "&pageSize=" + pageSize; 407 + window.location.href = "/audio/page?" + h + "&page=" + 1 + "&pageSize=" + pageSize;
403 } else { 408 } else {
404 var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 409 var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
405 var split = se.split("&"); 410 var split = se.split("&");
@@ -409,7 +414,7 @@ @@ -409,7 +414,7 @@
409 if (s.indexOf("page=") < 0) h = h + "&" + split[i]; 414 if (s.indexOf("page=") < 0) h = h + "&" + split[i];
410 } 415 }
411 h = h.substring(1, h.length); 416 h = h.substring(1, h.length);
412 - window.location.href = "/audio/page?" + h + "&pageSize=" + pageSize; 417 + window.location.href = "/audio/page?" + h + "&page=" + 1 + "&pageSize=" + pageSize;
413 } 418 }
414 } 419 }
415 420
@@ -448,7 +453,7 @@ @@ -448,7 +453,7 @@
448 function quanbu() { 453 function quanbu() {
449 updateValue(); 454 updateValue();
450 var expand_list_state = $("#forms").attr("expand_list_state"); 455 var expand_list_state = $("#forms").attr("expand_list_state");
451 - window.location.href = "/audio/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 + "&expand_list_state=" + expand_list_state; 456 + window.location.href = "/audio/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&sp_Id=" + sp_Id + "&expand_list_state=" + expand_list_state;
452 } 457 }
453 458
454 //全部待领 459 //全部待领
@@ -456,27 +461,27 @@ @@ -456,27 +461,27 @@
456 updateValue(); 461 updateValue();
457 if ($.trim(state) == '') state = 0; 462 if ($.trim(state) == '') state = 0;
458 var receive = 0; 463 var receive = 0;
459 - 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; 464 + 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 + "&page=" + 1 + "&pageSize=" + count + "&sp_Id=" + sp_Id;
460 }); 465 });
461 //我的待审核 466 //我的待审核
462 $('#Mydaishen').click(function () { 467 $('#Mydaishen').click(function () {
463 updateValue(); 468 updateValue();
464 var receive = 1; 469 var receive = 1;
465 if ($.trim(state) == '') state = 0; 470 if ($.trim(state) == '') state = 0;
466 - 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; 471 + 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 + "&page=" + 1 + "&pageSize=" + count + "&sp_Id=" + sp_Id;
467 }); 472 });
468 //我的已审核 473 //我的已审核
469 $('#yishen').click(function () { 474 $('#yishen').click(function () {
470 updateValue(); 475 updateValue();
471 var receive = 1; 476 var receive = 1;
472 if ($.trim(state) == '') state = 3;//审核状态,3代表通过和拒绝都查询 477 if ($.trim(state) == '') state = 3;//审核状态,3代表通过和拒绝都查询
473 - 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; 478 + 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 + "&page=" + 1 + "&pageSize=" + count + "&sp_Id=" + sp_Id;
474 }); 479 });
475 480
476 481
477 //查询 482 //查询
478 $('#videos_query').click(function () { 483 $('#videos_query').click(function () {
479 - window.location.href = "/audio/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; 484 + window.location.href = "/audio/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc + "&page=" + 1 + "&pageSize=" + count + "&sp_Id=" + sp_Id;
480 }); 485 });
481 /*全选的操作*/ 486 /*全选的操作*/
482 $('#select_all').click(function () { 487 $('#select_all').click(function () {