Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
b44c249d
Commit
b44c249d
authored
Aug 23, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Api修改
parent
ae4a43ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
CenterAction.class.php
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
+14
-7
MonitorAction.class.php
SooonerHotel/App/Lib/Action/Api/MonitorAction.class.php
+12
-4
No files found.
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
View file @
b44c249d
...
...
@@ -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
);
...
...
SooonerHotel/App/Lib/Action/Api/MonitorAction.class.php
View file @
b44c249d
...
...
@@ -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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment