|
|
@@ -44,27 +44,27 @@ public class live extends Controller {
|
|
|
brandcustcount.addParameter("tactivityid", tactivityid);
|
|
|
brandcustcount.addParameter("siteid", siteid);
|
|
|
Rows brandcustcountrows = dbConnect.runSqlQuery(brandcustcount.getSQL());
|
|
|
- int flivecount= liverows.size();
|
|
|
+ int flivecount = liverows.size();
|
|
|
//正在直播数
|
|
|
resultObject.put("flivecount", flivecount);
|
|
|
//当前在线观众人数
|
|
|
resultObject.put("fcustcount", liverows.isEmpty() ? 0 : liverows.sum("fcustcount"));
|
|
|
//直播列表
|
|
|
- int pageSize=content.getIntValue("pageSize");
|
|
|
- int pageNumber=content.getIntValue("pageNumber");
|
|
|
- if(pageSize==0||pageNumber==0){
|
|
|
+ int pageSize = content.getIntValue("pageSize");
|
|
|
+ int pageNumber = content.getIntValue("pageNumber");
|
|
|
+ if (pageSize == 0 || pageNumber == 0) {
|
|
|
resultObject.put("tlivelist", liverows);
|
|
|
- }else{
|
|
|
- Rows newliverows=new Rows();
|
|
|
- double pageTotal= Math.ceil((double) flivecount / (double) pageSize);//总页数
|
|
|
- int startindex=(pageNumber-1)*pageSize;
|
|
|
- int endindex=(pageNumber)*pageSize-1;
|
|
|
- if(pageNumber>=pageTotal){
|
|
|
- startindex=flivecount-pageSize;
|
|
|
- endindex=flivecount-1;
|
|
|
+ } else {
|
|
|
+ Rows newliverows = new Rows();
|
|
|
+ double pageTotal = Math.ceil((double) flivecount / (double) pageSize);//总页数
|
|
|
+ int startindex = (pageNumber - 1) * pageSize;
|
|
|
+ int endindex = (pageNumber) * pageSize - 1;
|
|
|
+ if (pageNumber >= pageTotal) {
|
|
|
+ startindex = flivecount - pageSize;
|
|
|
+ endindex = flivecount - 1;
|
|
|
}
|
|
|
- for(int i=0;i<flivecount;i++){
|
|
|
- if(startindex<=i&&i<=endindex){
|
|
|
+ for (int i = 0; i < flivecount; i++) {
|
|
|
+ if (startindex <= i && i <= endindex) {
|
|
|
newliverows.add(liverows.get(i));
|
|
|
}
|
|
|
}
|
|
|
@@ -150,4 +150,11 @@ public class live extends Controller {
|
|
|
object.put("saleprodclasscount", rows4);
|
|
|
return getSucReturnObject().setData(object).saveToDataPool(1).toString();
|
|
|
}
|
|
|
+
|
|
|
+ public String getPolyvSoftUrl() {
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("MAC", "http://soft.polyv.net/custom/macCloud/04de51d4c1/4.5.4/Live-Setup.dmg");
|
|
|
+ object.put("WIN", "http://live.polyv.net/clients/winClient/04de51d4c1/Live-Setup.exe");
|
|
|
+ return getSucReturnObject().setData(object).toString();
|
|
|
+ }
|
|
|
}
|