Commit b1363a259a1686c3e7d6838e54f2fa784db31eac

Authored by 张宗朋
1 parent d528314d

mm

src/main/java/com/cnlive/mz/live/action/LiveAction.java
... ... @@ -123,26 +123,26 @@ public class LiveAction {
123 123 if(live_url.isEmpty()){
124 124 return null;
125 125 }else{
126   - int index = live_url.lastIndexOf("live");
127   - String streamName = live_url.substring(index+6);
  126 + int index = live_url.lastIndexOf("/");
  127 + String streamName = live_url.substring(index+1);
128 128 System.out.println("streamName==="+streamName);
129 129 String accesskey = BaseUtil.getAccessKey();
130 130 accesskey = java.net.URLEncoder.encode(accesskey,"utf-8");
131 131 String add = "add";
132   - String signature = BaseUtil.signature(add,streamName);
  132 + String addsignature = BaseUtil.signature(add,streamName);
133 133 String del = "del";
134 134 String delsignature = BaseUtil.signature(del,streamName);
135 135 String expire = BaseUtil.getTimestamp();
136 136 System.out.println(expire+"---expire---");
137 137 //断流。
138 138 try {
139   - addBlackList(signature,accesskey,expire,streamName);
  139 + addBlackList(addsignature,accesskey,expire,streamName);
140 140 delBlackList(delsignature,accesskey,expire,streamName);
141 141 } catch (UnsupportedEncodingException e) {
142 142 e.printStackTrace();
143 143 }
144 144 // 直播通知
145   - // tLiveService.notify(video_uuid, "-1",-2);
  145 + tLiveService.notify(video_uuid, -2);
146 146 boolean flag = tCheckService.closeLive(id);
147 147 return new Result(flag);
148 148 }
... ... @@ -218,7 +218,7 @@ public class LiveAction {
218 218 Pager<TLive> tLive = tLiveService.getTLivePager(page_number, Constants.PAGE_SIZE);
219 219 return new View("live/all_live_management.jsp").data("tLive", tLive);
220 220 }
221   - @Request.Post("/live/search/{page_number}")
  221 + @Request.Get("/live/search/{page_number}")
222 222 public View search(int page_number,Params params) {
223 223 int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID));
224 224 System.out.println(user_id);
... ...
src/main/webapp/pages/live/all_live_management.jsp
... ... @@ -35,7 +35,7 @@
35 35 <h3 class="box-title"></h3>
36 36 <div class="box-tools">
37 37 <div class="input-group">
38   - <form role = "form" action="../search/1" method="get">
  38 + <form role = "form">
39 39 <div class="input-group">
40 40 <input type="text" name="search_user_id" id="search_user_id"
41 41 class="form-control input-sm" style="width: 150px;"
... ... @@ -43,7 +43,7 @@
43 43 <input type="text" name="search_title" id="search_title"
44 44 class="form-control input-sm" style="width: 150px;"
45 45 placeholder="活动名称" />
46   - <button id="t_activity_search_btn" type="submit"
  46 + <button id="t_activity_search_btn" onclick="search()"
47 47 class="btn btn-sm btn-default">
48 48 <i class="fa fa-search"></i>搜索
49 49 </button>
... ... @@ -110,4 +110,12 @@
110 110 </div>
111 111 <%@ include file="/pages/common/js.jsp"%>
112 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>
113 121 </html>
... ...
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
1 1 #Generated by Maven Integration for Eclipse
2   -#Mon Jun 20 09:31:18 CST 2016
3   -#Mon Jun 20 10:10:00 CST 2016
4   -#Fri Jun 17 09:20:43 CST 2016
  2 +#Tue Jun 21 09:00:02 CST 2016
5 3 version=0.0.1-SNAPSHOT
6 4 groupId=com.cnlive.mz.live.web
7 5 m2e.projectName=cnlive_live_web
... ...