Commit b44c249d authored by 吴贤德's avatar 吴贤德

Api修改

parent ae4a43ac
......@@ -183,13 +183,20 @@ class CenterAction extends Action
}
$page_num = ceil($total/$page_size);
$limit_from = ($page-1)*$page_size;
$sql="SELECT mw.code id,mw.title,mw.description,mw.url_play playUrl,mw.url_pic picUrl"
.",mw.year,mw.type,mw.score,mw.region,mw.actor,mw.director"
.",h.code hotelId,hm.status,hm.status_inject statusInject"
." FROM (SELECT media_id,hotel_id,status,status_inject FROM sh_hotel_media_map_$spid"
." WHERE updatetime BETWEEN'$start' AND '$end' ORDER BY updatetime,media_id ASC LIMIT $limit_from,$page_size) hm"
." JOIN sh_media_wasu mw ON mw.id=hm.media_id"
." JOIN sh_hotel h ON h.id=hm.hotel_id";
// $sql="SELECT mw.code id,mw.title,mw.description,mw.url_play playUrl,mw.url_pic picUrl"
// .",mw.year,mw.type,mw.score,mw.region,mw.actor,mw.director"
// .",h.code hotelId,hm.status,hm.status_inject statusInject"
// ." FROM (SELECT media_id,hotel_id,status,status_inject FROM sh_hotel_media_map_$spid"
// ." WHERE updatetime BETWEEN'$start' AND '$end' ORDER BY updatetime,media_id ASC LIMIT $limit_from,$page_size) hm"
// ." JOIN sh_media_wasu mw ON mw.id=hm.media_id"
// ." JOIN sh_hotel h ON h.id=hm.hotel_id";
$sql = "SELECT mw.code id,mw.title,mw.description,mw.programType,mw.url_pic picUrl"
. ",mw.year,mw.type,mw.score,mw.region,mw.actor,mw.director"
. ",h.code hotelId,hm.status,hm.status_inject statusInject"
. " FROM (SELECT media_id,hotel_id,status,status_inject FROM sh_hotel_media_map_$spid"
. " WHERE updatetime BETWEEN'$start' AND '$end' ORDER BY updatetime,media_id ASC LIMIT $limit_from,$page_size) hm"
. " JOIN sh_media_wasu mw ON mw.id=hm.media_id"
. " JOIN sh_hotel h ON h.id=hm.hotel_id";
// echo $sql;exit;
$list = M("")->query($sql);
......
......@@ -17,14 +17,22 @@ class MonitorAction extends Action
$this->assign('SYSTEM_INFO',C('SYSTEM_INFO'));
$userInfo = $_SESSION["_USER_INFO"];
$limitRtimeout=60;
$limitCpu=0.9;
$limitMem=0.9;
$sql = "SELECT id,code,name,ip"
." FROM sh_hotel_device"
." WHERE status<2 "
." ORDER BY id ASC;";
$where = " d.hotel_id=h.id and h.status<2 and d.status<2 ";
if($userInfo['sp_ids']&&$userInfo['grade']>=3){
$where .= " and h.sp_id in(".$userInfo['sp_ids'].") ";
}
$sql = "SELECT d.id ,d.code,d.name,d.ip"
." FROM sh_hotel_device d,sh_hotel h"
." WHERE 1=1 and $where"
." ORDER BY d.name ASC";
$Devices = D("")->query($sql);
$values="";
foreach ($Devices as $device){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment