1
This commit is contained in:
@@ -132,4 +132,32 @@ class MessageNoticeService extends BaseService
|
||||
|
||||
return success($message_notice->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息已读
|
||||
* @return array
|
||||
*/
|
||||
public function putMessageReadId(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$notice_id = $this->request->route('notice_id');
|
||||
|
||||
$params = array();
|
||||
$params['notice_id'] = $notice_id;
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$message_notice = MessageNotice::getExists($params);
|
||||
if (empty($message_notice)){
|
||||
return success();
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['read_status'] = 1;
|
||||
|
||||
$params = array();
|
||||
$params['notice_id'] = $notice_id;
|
||||
MessageNotice::edit($params,$data);
|
||||
|
||||
return success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user