Commit 3192edd5c3a53b86059904d1dac2f892909b4e91

Authored by 张宗朋
2 parents 20eaab46 fa81cf70

Merge branch 'zzpcheck'

src/main/java/com/cnlive/mz/live/action/LiveAction.java
@@ -138,12 +138,12 @@ public class LiveAction { @@ -138,12 +138,12 @@ public class LiveAction {
138 // 断流。 138 // 断流。
139 try { 139 try {
140 addBlackList(signature, accesskey, expire, streamName); 140 addBlackList(signature, accesskey, expire, streamName);
141 - delBlackList(delsignature, accesskey, expire, streamName); 141 + //delBlackList(delsignature, accesskey, expire, streamName);
142 } catch (UnsupportedEncodingException e) { 142 } catch (UnsupportedEncodingException e) {
143 e.printStackTrace(); 143 e.printStackTrace();
144 } 144 }
145 // 直播通知 145 // 直播通知
146 - tLiveService.notify(video_uuid, -1); 146 + //tLiveService.notify(video_uuid, -1);
147 boolean flag = tCheckService.closeLive(id); 147 boolean flag = tCheckService.closeLive(id);
148 return new Result(flag); 148 return new Result(flag);
149 } 149 }
@@ -175,7 +175,6 @@ public class LiveAction { @@ -175,7 +175,6 @@ public class LiveAction {
175 public String addBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException { 175 public String addBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException {
176 String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire 176 String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire
177 + "&app=live&method=add&name=" + streamName; 177 + "&app=live&method=add&name=" + streamName;
178 - System.out.println(url);  
179 String jsonArrStr = HttpReq.getRequestWidthResult(url); 178 String jsonArrStr = HttpReq.getRequestWidthResult(url);
180 int status = HttpReq.getRequest(url); 179 int status = HttpReq.getRequest(url);
181 System.out.println(status + "......and......" + jsonArrStr); 180 System.out.println(status + "......and......" + jsonArrStr);
@@ -195,7 +194,6 @@ public class LiveAction { @@ -195,7 +194,6 @@ public class LiveAction {
195 public Object delBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException { 194 public Object delBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException {
196 String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire 195 String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire
197 + "&app=live&method=del&name=" + streamName; 196 + "&app=live&method=del&name=" + streamName;
198 - System.out.println("..url.." + url);  
199 String jsonArrStr = HttpReq.getRequestWidthResult(url); 197 String jsonArrStr = HttpReq.getRequestWidthResult(url);
200 System.out.println("..jsonArrStr.." + jsonArrStr); 198 System.out.println("..jsonArrStr.." + jsonArrStr);
201 return jsonArrStr; 199 return jsonArrStr;
@@ -216,8 +214,16 @@ public class LiveAction { @@ -216,8 +214,16 @@ public class LiveAction {
216 System.out.println("...parmas..." + params); 214 System.out.println("...parmas..." + params);
217 String t_user_id = params.getString("search_user_id"); 215 String t_user_id = params.getString("search_user_id");
218 String title = params.getString("search_title"); 216 String title = params.getString("search_title");
  217 +
  218 + try {
  219 + title = new String(title.trim().getBytes("ISO-8859-1"), "utf-8");
  220 + System.out.println("...title.."+title);
  221 + } catch (UnsupportedEncodingException e) {
  222 + e.printStackTrace();
  223 + }
  224 +
219 Pager<TLive> tLive = tLiveService.getTLiveAllPager(page_number, Constants.PAGE_SIZE, t_user_id, title); 225 Pager<TLive> tLive = tLiveService.getTLiveAllPager(page_number, Constants.PAGE_SIZE, t_user_id, title);
220 - System.out.println(tLive); 226 + System.out.println("tLive====="+tLive);
221 return new View("live/all_live_management.jsp").data("tLive", tLive); 227 return new View("live/all_live_management.jsp").data("tLive", tLive);
222 } 228 }
223 229
src/main/webapp/pages/live/all_live_management.jsp
@@ -32,11 +32,11 @@ @@ -32,11 +32,11 @@
32 <div class="row"> 32 <div class="row">
33 <div class="col-xs-12"> 33 <div class="col-xs-12">
34 <div class="box box-warning"> 34 <div class="box box-warning">
35 - <div class="box-header with-border"> 35 + <div class="box-header with-border">
36 <h3 class="box-title"></h3> 36 <h3 class="box-title"></h3>
37 <div class="box-tools"> 37 <div class="box-tools">
38 <div class="input-group"> 38 <div class="input-group">
39 - <form role = "form" id="formid" name= "myform" action ="../../live/search/1" method ="get" > 39 + <form role="form" action="../../live/search/1" method="get">
40 <div class="input-group"> 40 <div class="input-group">
41 <input type="text" name="search_user_id" id="search_user_id" 41 <input type="text" name="search_user_id" id="search_user_id"
42 class="form-control input-sm" style="width: 150px;" 42 class="form-control input-sm" style="width: 150px;"
@@ -44,10 +44,9 @@ @@ -44,10 +44,9 @@
44 name="search_title" id="search_title" 44 name="search_title" id="search_title"
45 class="form-control input-sm" style="width: 150px;" 45 class="form-control input-sm" style="width: 150px;"
46 placeholder="活动名称" /> 46 placeholder="活动名称" />
47 - <button id="t_activity_search_btn" type="submit"  
48 - class="btn btn-sm btn-default"> 47 + <button type="submit" class="btn btn-sm btn-default">
49 <i class="fa fa-search"></i>搜索 48 <i class="fa fa-search"></i>搜索
50 - </button> 49 + </button>
51 </div> 50 </div>
52 </form> 51 </form>
53 </div> 52 </div>
@@ -74,8 +73,7 @@ @@ -74,8 +73,7 @@
74 <td><fmt:formatDate value="${item.start_time}" 73 <td><fmt:formatDate value="${item.start_time}"
75 pattern="yyyy-MM-dd HH:mm" /></td> 74 pattern="yyyy-MM-dd HH:mm" /></td>
76 <td>${item.end_time}</td> 75 <td>${item.end_time}</td>
77 - <td><c:if  
78 - test="${item.t_status_id==0}"> 76 + <td><c:if test="${item.t_status_id==0}">
79 <span class="badge bg-green">未开始</span> 77 <span class="badge bg-green">未开始</span>
80 </c:if> <c:if test="${item.t_status_id==2}"> 78 </c:if> <c:if test="${item.t_status_id==2}">
81 <span class="badge bg-green">正常结束</span> 79 <span class="badge bg-green">正常结束</span>
@@ -86,6 +84,10 @@ @@ -86,6 +84,10 @@
86 </c:if></td> 84 </c:if></td>
87 85
88 <td> 86 <td>
  87 + <%-- <button type="button" class="btn btn-xs btn-success" id="down" onclick="t_live_close('${item.id}','${item.uuid}');">
  88 + <i class="icon-upload"></i>下线
  89 + </button> --%>
  90 +
89 <button class="btn btn-danger btn-sm" 91 <button class="btn btn-danger btn-sm"
90 onclick="t_live_close('${item.id}','${item.uuid}');"> 92 onclick="t_live_close('${item.id}','${item.uuid}');">
91 <i class="fa fa-close"></i> 93 <i class="fa fa-close"></i>
@@ -104,7 +106,7 @@ @@ -104,7 +106,7 @@
104 </div> 106 </div>
105 </div> 107 </div>
106 </div> 108 </div>
107 - </section> 109 + </section>
108 </div> 110 </div>
109 <%@ include file="/pages/common/bottom.jsp"%> 111 <%@ include file="/pages/common/bottom.jsp"%>
110 </div> 112 </div>
src/main/webapp/static/assets/cnlive/js/all_live.js
@@ -7,7 +7,6 @@ function t_live_close(id, uuid) { @@ -7,7 +7,6 @@ function t_live_close(id, uuid) {
7 alert('获取错误!'); 7 alert('获取错误!');
8 }, 8 },
9 success : function(data) { 9 success : function(data) {
10 - alert(data);  
11 location.href = "../../live/alllive/1"; 10 location.href = "../../live/alllive/1";
12 } 11 }
13 }); 12 });
src/main/webapp/static/assets/cnlive/js/common.js
@@ -6,20 +6,6 @@ @@ -6,20 +6,6 @@
6 function next_page(pageNum) { 6 function next_page(pageNum) {
7 window.location.href = "" + pageNum; 7 window.location.href = "" + pageNum;
8 } 8 }
9 -function next_pager(pageNum) {  
10 - $.ajax({  
11 - url : '../../live/searchg/' + pageNum,  
12 - type : 'post',  
13 - datatype : "json",  
14 - async : true,  
15 - error : function() {  
16 - },  
17 - success : function(data) {  
18 - location.href = '../../live/search/'+pageNum;  
19 - }  
20 - });  
21 -  
22 -}  
23 9
24 // 提示 10 // 提示
25 function showTip(succ) { 11 function showTip(succ) {
src/main/webapp/static/assets/cnlive/js/global.js
1 var BASE; // Context Path(在 script.jsp 中初始化) 1 var BASE; // Context Path(在 script.jsp 中初始化)
2 - 2 +function next_page(pageNum){
  3 + window.location.href = "" + pageNum+window.location.search;
  4 + alert(window.location.search);
  5 +}
3 var Smart = { 6 var Smart = {
4 /* -------------------------------------------------- 函数 -------------------------------------------------- */ 7 /* -------------------------------------------------- 函数 -------------------------------------------------- */
5 Validator: { 8 Validator: {
@@ -146,7 +149,7 @@ $(function() { @@ -146,7 +149,7 @@ $(function() {
146 }); 149 });
147 150
148 // 设置 form 默认为 post 类型 151 // 设置 form 默认为 post 类型
149 - $('form').attr('method', 'post'); 152 + // $('form').attr('method', 'post');
150 153
151 // 全局 AJAX 设置 154 // 全局 AJAX 设置
152 $.ajaxSetup({ 155 $.ajaxSetup({
src/main/webapp/static/assets/cnlive/js/live.js
@@ -494,10 +494,6 @@ function t_live_underLine(id){ @@ -494,10 +494,6 @@ function t_live_underLine(id){
494 function checkUser(){ 494 function checkUser(){
495 var search_user_id = $("#search_user_id").val(); 495 var search_user_id = $("#search_user_id").val();
496 var search_title = $("#search_title").val(); 496 var search_title = $("#search_title").val();
497 - //var href ="../search/1?search_user_id="+search_user_id+"&search_title="+search_title ;  
498 - //window.open(href);  
499 - //window.location.href ="../../live/search/1?search_user_id="+search_user_id+"&search_title="+search_title ;  
500 -  
501 $.ajax({ 497 $.ajax({
502 url:'../../live/search/1', 498 url:'../../live/search/1',
503 type:'post', 499 type:'post',
@@ -506,8 +502,8 @@ function checkUser(){ @@ -506,8 +502,8 @@ function checkUser(){
506 alert('下线时发生错误!'); 502 alert('下线时发生错误!');
507 }, 503 },
508 success : function(data) { 504 success : function(data) {
509 - location.href = "../../live/search/1?search_user_id="+search_user_id+"&search_title="+search_title;  
510 - alert("下线成功"); 505 + //location.href = "../../live/search/1?search_user_id="+search_user_id+"&search_title="+search_title;
  506 + //alert(location.href);
511 } 507 }
512 }); 508 });
513 } 509 }
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
1 #Generated by Maven Integration for Eclipse 1 #Generated by Maven Integration for Eclipse
2 -#Thu Jun 23 09:20:00 CST 2016  
3 -version=0.0.1-SNAPSHOT  
4 -groupId=com.cnlive.mz.live.web  
5 -m2e.projectName=cnlive_live_web  
6 -m2e.projectLocation=D\:\\1_CNLIVE_JAVA_CODE\\cnlive_live_web  
7 -artifactId=cnlive_live_web  
8 -#Generated by Maven Integration for Eclipse  
9 -#Tue Jun 21 13:17:57 CST 2016  
10 -version=0.0.1-SNAPSHOT  
11 -groupId=com.cnlive.mz.live.web  
12 -m2e.projectName=cnlive_live_web  
13 -m2e.projectLocation=D\:\\1_CNLIVE_JAVA_CODE\\cnlive_live_web  
14 -artifactId=cnlive_live_web  
15 -#Generated by Maven Integration for Eclipse  
16 -#Mon Jun 20 09:31:18 CST 2016  
17 -#Mon Jun 20 10:10:00 CST 2016  
18 -#Fri Jun 17 09:20:43 CST 2016 2 +#Fri Jun 24 09:13:59 CST 2016
19 version=0.0.1-SNAPSHOT 3 version=0.0.1-SNAPSHOT
20 groupId=com.cnlive.mz.live.web 4 groupId=com.cnlive.mz.live.web
21 m2e.projectName=cnlive_live_web 5 m2e.projectName=cnlive_live_web
22 m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web 6 m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web
23 -artifactId=cnlive_live_web  
24 \ No newline at end of file 7 \ No newline at end of file
  8 +artifactId=cnlive_live_web