Commit 93acc0c98ace123bee446428d905d586d5105222
..
Showing
6 changed files
with
57 additions
and
48 deletions
.settings/org.eclipse.wst.common.component
| @@ -8,15 +8,6 @@ | @@ -8,15 +8,6 @@ | ||
| 8 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> | 8 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> |
| 9 | <dependency-type>uses</dependency-type> | 9 | <dependency-type>uses</dependency-type> |
| 10 | </dependent-module> | 10 | </dependent-module> |
| 11 | - <dependent-module archiveName="cnlive_ks3-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_ks3/cnlive_ks3"> | ||
| 12 | - <dependency-type>uses</dependency-type> | ||
| 13 | - </dependent-module> | ||
| 14 | - <dependent-module archiveName="smart-framework-4.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> | ||
| 15 | - <dependency-type>uses</dependency-type> | ||
| 16 | - </dependent-module> | ||
| 17 | - <dependent-module archiveName="smart-plugin-job-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-job/smart-plugin-job"> | ||
| 18 | - <dependency-type>uses</dependency-type> | ||
| 19 | - </dependent-module> | ||
| 20 | <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> | 11 | <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> |
| 21 | <dependency-type>uses</dependency-type> | 12 | <dependency-type>uses</dependency-type> |
| 22 | </dependent-module> | 13 | </dependent-module> |
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| @@ -123,32 +123,32 @@ public class LiveAction { | @@ -123,32 +123,32 @@ public class LiveAction { | ||
| 123 | String video_uuid = params.getString("uuid"); | 123 | String video_uuid = params.getString("uuid"); |
| 124 | if (live_url.isEmpty()) { | 124 | if (live_url.isEmpty()) { |
| 125 | return null; | 125 | return null; |
| 126 | - }else{ | ||
| 127 | - int index = live_url.lastIndexOf("/"); | ||
| 128 | - String streamName = live_url.substring(index+1); | ||
| 129 | - System.out.println("streamName==="+streamName); | ||
| 130 | - String accesskey = BaseUtil.getAccessKey(); | ||
| 131 | - accesskey = java.net.URLEncoder.encode(accesskey,"utf-8"); | ||
| 132 | - String add = "add"; | ||
| 133 | - String addsignature = BaseUtil.signature(add,streamName); | ||
| 134 | - String del = "del"; | ||
| 135 | - String delsignature = BaseUtil.signature(del,streamName); | ||
| 136 | - String expire = BaseUtil.getTimestamp(); | ||
| 137 | - System.out.println(expire+"---expire---"); | ||
| 138 | - //断流。 | ||
| 139 | - try { | ||
| 140 | - addBlackList(addsignature,accesskey,expire,streamName); | ||
| 141 | - delBlackList(delsignature,accesskey,expire,streamName); | ||
| 142 | - } catch (UnsupportedEncodingException e) { | ||
| 143 | - e.printStackTrace(); | 126 | + } else { |
| 127 | + int index = live_url.lastIndexOf("live"); | ||
| 128 | + String streamName = live_url.substring(index + 6); | ||
| 129 | + System.out.println("streamName===" + streamName); | ||
| 130 | + String accesskey = BaseUtil.getAccessKey(); | ||
| 131 | + accesskey = java.net.URLEncoder.encode(accesskey, "utf-8"); | ||
| 132 | + String add = "add"; | ||
| 133 | + String signature = BaseUtil.signature(add, streamName); | ||
| 134 | + String del = "del"; | ||
| 135 | + String delsignature = BaseUtil.signature(del, streamName); | ||
| 136 | + String expire = BaseUtil.getTimestamp(); | ||
| 137 | + System.out.println(expire + "---expire---"); | ||
| 138 | + // 断流。 | ||
| 139 | + try { | ||
| 140 | + addBlackList(signature, accesskey, expire, streamName); | ||
| 141 | + delBlackList(delsignature, accesskey, expire, streamName); | ||
| 142 | + } catch (UnsupportedEncodingException e) { | ||
| 143 | + e.printStackTrace(); | ||
| 144 | + } | ||
| 145 | + // 直播通知 | ||
| 146 | + // tLiveService.notify(video_uuid, "-1"); | ||
| 147 | + boolean flag = tCheckService.closeLive(id); | ||
| 148 | + return new Result(flag); | ||
| 144 | } | 149 | } |
| 145 | - // 直播通知 | ||
| 146 | - tLiveService.notify(video_uuid, -2); | ||
| 147 | - boolean flag = tCheckService.closeLive(id); | ||
| 148 | - return new Result(flag); | ||
| 149 | - } | ||
| 150 | - | ||
| 151 | } | 150 | } |
| 151 | + | ||
| 152 | // 通过审核 | 152 | // 通过审核 |
| 153 | @Request.Get("/check/pass/{id}") | 153 | @Request.Get("/check/pass/{id}") |
| 154 | public Result pass(int id) { | 154 | public Result pass(int id) { |
| @@ -207,7 +207,7 @@ public class LiveAction { | @@ -207,7 +207,7 @@ public class LiveAction { | ||
| 207 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | 207 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); |
| 208 | Pager<TLive> tLive = tLiveService.getAllTLivePager(page_number, Constants.PAGE_SIZE); | 208 | Pager<TLive> tLive = tLiveService.getAllTLivePager(page_number, Constants.PAGE_SIZE); |
| 209 | return new View("live/all_live_management.jsp").data("tLive", tLive); | 209 | return new View("live/all_live_management.jsp").data("tLive", tLive); |
| 210 | - } | 210 | + } |
| 211 | 211 | ||
| 212 | @Request.Post("/live/search/{page_number}") | 212 | @Request.Post("/live/search/{page_number}") |
| 213 | public View search(int page_number, Params params) { | 213 | public View search(int page_number, Params params) { |
| @@ -220,4 +220,10 @@ public class LiveAction { | @@ -220,4 +220,10 @@ public class LiveAction { | ||
| 220 | System.out.println(tLive); | 220 | System.out.println(tLive); |
| 221 | return new View("live/all_live_management.jsp").data("tLive", tLive); | 221 | return new View("live/all_live_management.jsp").data("tLive", tLive); |
| 222 | } | 222 | } |
| 223 | + | ||
| 224 | + @Request.Get("/live/searchg/{page_number}") | ||
| 225 | + public Result searchq(int page_number) { | ||
| 226 | + | ||
| 227 | + return new Result(true); | ||
| 228 | + } | ||
| 223 | } | 229 | } |
| 224 | \ No newline at end of file | 230 | \ No newline at end of file |
src/main/webapp/pages/common/left.jsp
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | </div> | 18 | </div> |
| 19 | </div> | 19 | </div> |
| 20 | <ul class="sidebar-menu"> | 20 | <ul class="sidebar-menu"> |
| 21 | - <c:if test="${sessionScope.roleId=='0'}"> | 21 | + <c:if test="${sessionScope.roleId=='0'}"> |
| 22 | <li class="header">导航栏</li> | 22 | <li class="header">导航栏</li> |
| 23 | <li> | 23 | <li> |
| 24 | <a href="${BASE}/switch"><i class="fa fa-circle-o text-blue"></i>全局切换</a> | 24 | <a href="${BASE}/switch"><i class="fa fa-circle-o text-blue"></i>全局切换</a> |
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> | 57 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> |
| 58 | </li> | 58 | </li> |
| 59 | </c:if> | 59 | </c:if> |
| 60 | - <c:if test="true"> | 60 | + <c:if test="${sessionScope.roleId=='2'}"> |
| 61 | <li class="header">UGC直播审查</li> | 61 | <li class="header">UGC直播审查</li> |
| 62 | <li> | 62 | <li> |
| 63 | <a href="${BASE}/user/list/1"><i class="fa fa-circle-o text-yellow"></i>主播管理</a> | 63 | <a href="${BASE}/user/list/1"><i class="fa fa-circle-o text-yellow"></i>主播管理</a> |
src/test/java/com/cnlive/test/Test.java
| @@ -13,13 +13,18 @@ import com.cnlive.mz.commons.net.HttpReq; | @@ -13,13 +13,18 @@ import com.cnlive.mz.commons.net.HttpReq; | ||
| 13 | public class Test { | 13 | public class Test { |
| 14 | 14 | ||
| 15 | public static void main(String[] args) { | 15 | public static void main(String[] args) { |
| 16 | - String mediaId="123"; | ||
| 17 | - String title="hha"; | ||
| 18 | - String sid="234"; | ||
| 19 | - //String url = "https://mobile.cnlive.com/CnliveMobile/hd/applyChatRoomId.action?mediaId="+mediaId+"&title="+title+"&sid=?"+sid; | ||
| 20 | - String url = "https://mobile.cnlive.com/CnliveMobile/hd/applyChatRoomId.action"; | ||
| 21 | - //String chat_room_id = HttpReq.getRequestWidthResult(url); | ||
| 22 | - System.out.println(sendGet(url)); | 16 | +// String mediaId="123"; |
| 17 | +// String title="hha"; | ||
| 18 | +// String sid="234"; | ||
| 19 | +// //String url = "https://mobile.cnlive.com/CnliveMobile/hd/applyChatRoomId.action?mediaId="+mediaId+"&title="+title+"&sid=?"+sid; | ||
| 20 | +// String url = "https://mobile.cnlive.com/CnliveMobile/hd/applyChatRoomId.action"; | ||
| 21 | +// //String chat_room_id = HttpReq.getRequestWidthResult(url); | ||
| 22 | +// System.out.println(sendGet(url)); | ||
| 23 | + String live = "rtmp://cnlive01.rtmplive.ks-cdn.com/live/498122_a9fdb367c6054edc9d2035dc237d28aa"; | ||
| 24 | + int index = live.lastIndexOf("/"); | ||
| 25 | + System.out.println(index); | ||
| 26 | + String live_url = live.substring(index+1); | ||
| 27 | + System.out.println(live_url); | ||
| 23 | } | 28 | } |
| 24 | 29 | ||
| 25 | public static String toGMTString(Date date) { | 30 | public static String toGMTString(Date date) { |
target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
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 | -#Tue Jun 21 09:00:02 CST 2016 | 2 | +#Tue Jun 21 13:17:57 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 | +#Mon Jun 20 09:31:18 CST 2016 | ||
| 10 | +#Mon Jun 20 10:10:00 CST 2016 | ||
| 11 | +#Fri Jun 17 09:20:43 CST 2016 | ||
| 3 | version=0.0.1-SNAPSHOT | 12 | version=0.0.1-SNAPSHOT |
| 4 | groupId=com.cnlive.mz.live.web | 13 | groupId=com.cnlive.mz.live.web |
| 5 | m2e.projectName=cnlive_live_web | 14 | m2e.projectName=cnlive_live_web |
| 6 | m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web | 15 | m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web |
| 7 | artifactId=cnlive_live_web | 16 | artifactId=cnlive_live_web |
| 8 | - | ||
| 9 | - |