diff --git a/app/api/controller/Message.php b/app/api/controller/Message.php index 9d1462d..b130883 100644 --- a/app/api/controller/Message.php +++ b/app/api/controller/Message.php @@ -18,7 +18,6 @@ class Message if($result){ return true; } - } //receve msg @@ -30,7 +29,8 @@ class Message ->join('user u','t.send_id = u.id') ->field('t.id as id,name,title,link,receve_id,t.create_time as create_time,is_read') ->where('t.receve_id',$uid) - ->where('t.delete_time',0) + ->where(['t.delete_time'=>0]) + ->order(['t.create_time'=>'desc']) ->select(); return $msg; }