|
@@ -31,7 +31,8 @@ class openmeetClassAction extends openapiAction
|
|
|
m("meeting_room")->update(["final_res_time"=>date("Y-m-d H:i:s")], "id = '{$rawData['id']}'");
|
|
|
|
|
|
$sqlStr = /** @lang text */
|
|
|
- "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, is_hand
|
|
|
+ "select * from (
|
|
|
+ SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, is_hand
|
|
|
FROM `[Q]meeting`
|
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
|
and end_time > now()
|
|
@@ -42,7 +43,7 @@ class openmeetClassAction extends openapiAction
|
|
|
FROM `[Q]meeting_key`
|
|
|
where start_time REGEXP '".date("Y-m-d")."'
|
|
|
and end_time > now()
|
|
|
- and room_id = '".$rawData['id']."'";
|
|
|
+ and room_id = '".$rawData['id']."') t order by start_time";
|
|
|
|
|
|
$meetData = $this->db->getall($sqlStr);
|
|
|
|
|
@@ -213,7 +214,7 @@ class openmeetClassAction extends openapiAction
|
|
|
$dataDate = date("Y-m-d");
|
|
|
}
|
|
|
|
|
|
- $dataArr = m("meeting_room")->getall('1=1');
|
|
|
+ $dataArr = m("meeting_room")->getall('1=1', '*', 'room_name asc');
|
|
|
$list = [];
|
|
|
|
|
|
for ($i = 0; $i < count($dataArr); $i++) {
|
|
@@ -265,6 +266,11 @@ class openmeetClassAction extends openapiAction
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ // 有会议的往前排
|
|
|
+ usort($list, function($a, $b) {
|
|
|
+ return $b['meeting_today_num'] - $a['meeting_today_num'];
|
|
|
+ });
|
|
|
+
|
|
|
$this->showreturn($list,'success');
|
|
|
}
|
|
|
|