|
@@ -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);
|
|
|
}
|