Commit 302addcbf0486f7706004a027bc320090bd8af04
xiugaick
Showing
11 changed files
with
73 additions
and
59 deletions
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| @@ -143,7 +143,7 @@ public class LiveAction { | @@ -143,7 +143,7 @@ public class LiveAction { | ||
| 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 | } |
| @@ -209,7 +209,7 @@ public class LiveAction { | @@ -209,7 +209,7 @@ public class LiveAction { | ||
| 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.Get("/live/search/{page_number}") |
| 213 | public View search(int page_number, Params params) { | 213 | public View search(int page_number, Params params) { |
| 214 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | 214 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); |
| 215 | System.out.println(user_id); | 215 | System.out.println(user_id); |
src/main/java/com/cnlive/mz/live/action/UserAction.java
| @@ -35,9 +35,8 @@ public class UserAction { | @@ -35,9 +35,8 @@ public class UserAction { | ||
| 35 | return new View("user/user_live_list.jsp").data("userPage", userPage); | 35 | return new View("user/user_live_list.jsp").data("userPage", userPage); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | - @Request.Get("/user/report/{userId}") | ||
| 39 | - public Result getUserByReport(int userId) { | 38 | + @Request.Get("/user/report/{userId}/{type}") |
| 39 | + public Result getUserByReport(int userId,int type) { | ||
| 40 | return new Result(tUserService.addReport(userId)); | 40 | return new Result(tUserService.addReport(userId)); |
| 41 | } | 41 | } |
| 42 | - | ||
| 43 | } | 42 | } |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
| @@ -76,6 +76,7 @@ public class VideoAction { | @@ -76,6 +76,7 @@ public class VideoAction { | ||
| 76 | String md5 = params.getString("md5"); | 76 | String md5 = params.getString("md5"); |
| 77 | String relation_id = params.getString("relation_id"); | 77 | String relation_id = params.getString("relation_id"); |
| 78 | String uuid = ""; | 78 | String uuid = ""; |
| 79 | + boolean success=true; | ||
| 79 | if (video_type.equals("2")) { | 80 | if (video_type.equals("2")) { |
| 80 | // 2:sdk上传录播文件 | 81 | // 2:sdk上传录播文件 |
| 81 | TVideo tVideo = new TVideo(); | 82 | TVideo tVideo = new TVideo(); |
| @@ -107,12 +108,17 @@ public class VideoAction { | @@ -107,12 +108,17 @@ public class VideoAction { | ||
| 107 | tLive.setDirect(Integer.parseInt(direct)); | 108 | tLive.setDirect(Integer.parseInt(direct)); |
| 108 | } | 109 | } |
| 109 | tLive.setLive_url(Constants.KS_HOST_RTMP + tLive.getT_user_id() + "_" + uuid); | 110 | tLive.setLive_url(Constants.KS_HOST_RTMP + tLive.getT_user_id() + "_" + uuid); |
| 110 | - tLiveService.startLive(tLive); | 111 | + success=tLiveService.startLive(tLive); |
| 111 | } | 112 | } |
| 112 | data.put("video_uuid", uuid); | 113 | data.put("video_uuid", uuid); |
| 113 | ApiBean apiBean = new ApiBean(); | 114 | ApiBean apiBean = new ApiBean(); |
| 114 | - apiBean.setCode(100); | ||
| 115 | - apiBean.setMessage("请求成功"); | 115 | + if (success) { |
| 116 | + apiBean.setCode(100); | ||
| 117 | + apiBean.setMessage("请求成功"); | ||
| 118 | + }else{ | ||
| 119 | + apiBean.setCode(201); | ||
| 120 | + apiBean.setMessage("发起直播失败"); | ||
| 121 | + } | ||
| 116 | apiBean.setData(data); | 122 | apiBean.setData(data); |
| 117 | return apiBean; | 123 | return apiBean; |
| 118 | } | 124 | } |
src/main/resources/log4j.properties
| 1 | -log4j.rootLogger=INFO,console,file | ||
| 2 | -log4j.logger.content=INFO,content | ||
| 3 | -log4j.logger.video=INFO,video | ||
| 4 | -log4j.logger.action=INFO,action | 1 | +log4j.rootLogger=INFO,console,file,action,content,video,httpreq |
| 2 | + | ||
| 3 | +#Console | ||
| 4 | +log4j.appender.Threshold=INFO | ||
| 5 | +log4j.appender.console.Target=System.out | ||
| 5 | log4j.appender.console=org.apache.log4j.ConsoleAppender | 6 | log4j.appender.console=org.apache.log4j.ConsoleAppender |
| 6 | -log4j.appender.console.Target=System.out | ||
| 7 | log4j.appender.console.layout=org.apache.log4j.PatternLayout | 7 | log4j.appender.console.layout=org.apache.log4j.PatternLayout |
| 8 | -log4j.appender.console.layout.ConversionPattern=%m%n | 8 | +log4j.appender.console.layout.ConversionPattern=%d %-5p [%c] (%t:%x) %m%n |
| 9 | + | ||
| 9 | 10 | ||
| 10 | log4j.appender.file=org.apache.log4j.DailyRollingFileAppender | 11 | log4j.appender.file=org.apache.log4j.DailyRollingFileAppender |
| 11 | log4j.appender.file.File=${catalina.base}/logs/cnlive_live_web/log | 12 | log4j.appender.file.File=${catalina.base}/logs/cnlive_live_web/log |
| @@ -45,6 +46,16 @@ log4j.appender.video.DatePattern='.'yyyy-MM-dd | @@ -45,6 +46,16 @@ log4j.appender.video.DatePattern='.'yyyy-MM-dd | ||
| 45 | log4j.appender.video.Encoding=UTF-8 | 46 | log4j.appender.video.Encoding=UTF-8 |
| 46 | 47 | ||
| 47 | 48 | ||
| 49 | + | ||
| 50 | +#httpreq | ||
| 51 | +log4j.appender.httpreq=org.apache.log4j.DailyRollingFileAppender | ||
| 52 | +log4j.appender.httpreq.File=${catalina.home}/logs/httpreq.log | ||
| 53 | +log4j.appender.httpreq.layout=org.apache.log4j.PatternLayout | ||
| 54 | +log4j.appender.httpreq.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | ||
| 55 | +log4j.appender.httpreq.DatePattern='.'yyyy-MM-dd | ||
| 56 | +log4j.appender.httpreq.Encoding=UTF-8 | ||
| 57 | + | ||
| 58 | + | ||
| 48 | #log4j.logger.com.ksyun.ks3=DEBUG,stdout | 59 | #log4j.logger.com.ksyun.ks3=DEBUG,stdout |
| 49 | #log4j.logger.org.apache.http=DEBUG,stdout | 60 | #log4j.logger.org.apache.http=DEBUG,stdout |
| 50 | #log4j.logger.org.apache.http.wire=ERROR,stdout | 61 | #log4j.logger.org.apache.http.wire=ERROR,stdout |
src/main/webapp/pages/common/left.jsp
| @@ -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="${sessionScope.roleId=='2'}"> | 60 | + <c:if test="true"> |
| 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/main/webapp/pages/live/all_live_management.jsp
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 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"> | 39 | + <form role = "form" id="formid" name= "myform" 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,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 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" onclick="search()" | 47 | + <button id="t_activity_search_btn" type="submit" |
| 48 | class="btn btn-sm btn-default"> | 48 | class="btn btn-sm btn-default"> |
| 49 | <i class="fa fa-search"></i>搜索 | 49 | <i class="fa fa-search"></i>搜索 |
| 50 | </button> | 50 | </button> |
| @@ -110,12 +110,4 @@ | @@ -110,12 +110,4 @@ | ||
| 110 | </div> | 110 | </div> |
| 111 | <%@ include file="/pages/common/js.jsp"%> | 111 | <%@ include file="/pages/common/js.jsp"%> |
| 112 | </body> | 112 | </body> |
| 113 | -<script type="text/javascript"> | ||
| 114 | - function search(){ | ||
| 115 | - var search_user_id = $("#search_user_id").val(); | ||
| 116 | - var search_title = $("#search_title").val(); | ||
| 117 | - window.location.href ="../search/1?search_user_id="+search_user_id+"&search_title="+search_title ; | ||
| 118 | - alert(window.location.href); | ||
| 119 | - } | ||
| 120 | -</script> | ||
| 121 | </html> | 113 | </html> |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.js
| @@ -295,19 +295,7 @@ function ckstyle() { //定义总的风格 | @@ -295,19 +295,7 @@ function ckstyle() { //定义总的风格 | ||
| 295 | 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | 295 | 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 |
| 296 | ------------------------------------------------------------------------------------------------------------------ | 296 | ------------------------------------------------------------------------------------------------------------------ |
| 297 | */ | 297 | */ |
| 298 | - cpt_lights: '1', | ||
| 299 | - /* | ||
| 300 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | ||
| 301 | - */ | ||
| 302 | - cpt_share: 'ckplayer/share.xml', | ||
| 303 | - /* | ||
| 304 | - 分享插件调用的配置文件地址 | ||
| 305 | - 调用插件开始 | ||
| 306 | - */ | ||
| 307 | - cpt_list: ckcpt() | ||
| 308 | - /* | ||
| 309 | - ckcpt()是本文件最上方的定义插件的函数 | ||
| 310 | - */ | 298 | + |
| 311 | } | 299 | } |
| 312 | return ck; | 300 | return ck; |
| 313 | } | 301 | } |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.xml
| @@ -259,22 +259,5 @@ | @@ -259,22 +259,5 @@ | ||
| 259 | 跳过广告和播放结束时调用的js函数 | 259 | 跳过广告和播放结束时调用的js函数 |
| 260 | --> | 260 | --> |
| 261 | <myweb></myweb> | 261 | <myweb></myweb> |
| 262 | - | ||
| 263 | - <!-- | ||
| 264 | - 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | ||
| 265 | - 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | ||
| 266 | - --> | ||
| 267 | - <cpt_lights>0</cpt_lights> | ||
| 268 | - <!-- | ||
| 269 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | ||
| 270 | - --> | ||
| 271 | - <cpt_share>/ckplayer/share.xml</cpt_share> | ||
| 272 | - <!-- | ||
| 273 | - 分享插件调用的配置文件地址 | ||
| 274 | - 调用插件开始 | ||
| 275 | - --> | ||
| 276 | - <!-- <cpt>right.swf,2,1,0,0,2,0</cpt>右边开关灯,调整,分享按钮的插件 | ||
| 277 | - <cpt>share.swf,1,1,-180,-100,3,0</cpt>分享插件 | ||
| 278 | - <cpt>adjustment.swf,1,1,-180,-100,3,0</cpt>调整大小和颜色的插件 --> | ||
| 279 | </style> | 262 | </style> |
| 280 | </ckplayer> | 263 | </ckplayer> |
| 281 | \ No newline at end of file | 264 | \ No newline at end of file |
src/main/webapp/static/assets/cnlive/js/live.js
| @@ -491,4 +491,23 @@ function t_live_underLine(id){ | @@ -491,4 +491,23 @@ function t_live_underLine(id){ | ||
| 491 | } | 491 | } |
| 492 | }); | 492 | }); |
| 493 | } | 493 | } |
| 494 | +function checkUser(){ | ||
| 495 | + var search_user_id = $("#search_user_id").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 ; | ||
| 494 | 500 | ||
| 501 | + $.ajax({ | ||
| 502 | + url:'../../live/search/1', | ||
| 503 | + type:'post', | ||
| 504 | + datatype : 'json', | ||
| 505 | + error : function() { | ||
| 506 | + alert('下线时发生错误!'); | ||
| 507 | + }, | ||
| 508 | + success : function(data) { | ||
| 509 | + location.href = "../../live/search/1?search_user_id="+search_user_id+"&search_title="+search_title; | ||
| 510 | + alert("下线成功"); | ||
| 511 | + } | ||
| 512 | + }); | ||
| 513 | +} |
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 | -#Thu Jun 23 09:05:43 CST 2016 | 2 | +#Thu Jun 23 09:20:00 CST 2016 |
| 3 | version=0.0.1-SNAPSHOT | 3 | version=0.0.1-SNAPSHOT |
| 4 | groupId=com.cnlive.mz.live.web | 4 | groupId=com.cnlive.mz.live.web |
| 5 | m2e.projectName=cnlive_live_web | 5 | m2e.projectName=cnlive_live_web |
| 6 | -m2e.projectLocation=C\:\\Users\\Administrator\\git\\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 | ||
| 7 | artifactId=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 | ||
| 19 | +version=0.0.1-SNAPSHOT | ||
| 20 | +groupId=com.cnlive.mz.live.web | ||
| 21 | +m2e.projectName=cnlive_live_web | ||
| 22 | +m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web | ||
| 23 | +artifactId=cnlive_live_web | ||
| 8 | \ No newline at end of file | 24 | \ No newline at end of file |