DESKTOP-9JTA2JJ\HP před 5 roky
rodič
revize
8c4c85463d
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      api/application/controllers/Lampcontrol.php

+ 1 - 0
api/application/controllers/Lampcontrol.php

@@ -108,6 +108,7 @@ class Lampcontrol extends Base_Controller {
                 $fields .= ",RI.updatetime";
             }
             $join = array();
+            $join[] = ['table'=>'(select t1.* from realtime_info_log t1, (select lampid, max(updatetime) as maxtime from realtime_info_log group by lampid) t2 where t1.lampid = t2.lampid and t1.updatetime = t2.maxtime) as RI', 'cond'=>'L.id = RI.lampid', 'type'=>'left'];
             $data['lamps'] = $this->Lamp_model->get_list_by_join($filter, $fields,$limit, $offset, $join, "L.number ASC", NUll, 'L');
         } else {
             if(empty($fields) || empty($field1)){