From 2b6e8d22097a88d6d36d3e4f6e179979c01d6db0 Mon Sep 17 00:00:00 2001 From: toogee Date: Sun, 29 Mar 2020 20:23:52 +0800 Subject: [PATCH] msg --- app/api/controller/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }