Forráskód Böngészése

调接口。。。

q 1 éve
szülő
commit
27572770e2
1 módosított fájl, 16 hozzáadás és 3 törlés
  1. 16 3
      webmain/task/openapi/openmeetAction.php

+ 16 - 3
webmain/task/openapi/openmeetAction.php

@@ -31,6 +31,7 @@ class openmeetClassAction extends openapiAction
                FROM `[Q]meeting` 
               where start_time REGEXP '".date("Y-m-d")."'
                 and end_time > now()
+                and status = 1
                 and meeting_room = '".$rawData['room_name']."'
              union all
              SELECT 2 as type, id, title, start_time, end_time, compere, meet_state 
@@ -92,9 +93,16 @@ class openmeetClassAction extends openapiAction
         }
 
         $nowMeetingSql = /** @lang text */
-            "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room  FROM `[Q]meeting` where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'
+            "SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees
+               FROM `[Q]meeting` 
+              where status = 1 
+                and start_time < now() 
+                and end_time > now() 
+                and meeting_room = '".$rawData['room_name']."'
              union all
-             SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room  FROM `[Q]meeting_key` where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'";
+             SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, null as attendees
+               FROM `[Q]meeting_key` 
+              where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'";
         $nowMeetingData = $this->db->getall($nowMeetingSql);
 
 
@@ -138,7 +146,12 @@ class openmeetClassAction extends openapiAction
             } else {
                 // 普通会议,议题为空
                 $data['meetingTopic'] = [];
-                $data['participants'] = [];
+                $data['participants'] = [
+                    [
+                        "topics"=>$nowMeet['title'],
+                        "personnel_list"=>$nowMeet['attendees'],
+                    ]
+                ];
             }
         } else {
             $data['basic_information'] = [