qifengquan 1 年間 前
コミット
42881583a0
1 ファイル変更2 行追加1 行削除
  1. 2 1
      app/data/controller/api/business/User.php

+ 2 - 1
app/data/controller/api/business/User.php

@@ -506,7 +506,8 @@ class User extends Auth
             ->order('id desc')
             ->paginate()->toArray();
         foreach ($messagelist['data'] as &$v){
-            $v['is_read'] = SystemUserMessageRead::mk()->where('uuid',$this->user['id'])->where('message_id',$v['id'])->count() ? 1 : 0;
+            SystemUserMessageRead::mk()->insert(['message_id'=>$v['id'],'uuid'=>$this->user['id']]);
+//            $v['is_read'] = SystemUserMessageRead::mk()->where('uuid',$this->user['id'])->where('message_id',$v['id'])->count() ? 1 : 0;
         }
         $this->success('成功',$messagelist);
     }