1
This commit is contained in:
@@ -30,6 +30,7 @@ class MessageNoticeService extends BaseService
|
||||
$fields = [
|
||||
'notice_id',
|
||||
'read_status',
|
||||
'inquiry_type',
|
||||
'from_name',
|
||||
'notice_title',
|
||||
'notice_send_time',
|
||||
@@ -160,4 +161,84 @@ class MessageNoticeService extends BaseService
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 一键消息已读
|
||||
* @return array
|
||||
*/
|
||||
public function putMessageRead(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$notice_type = $this->request->input('notice_type');
|
||||
|
||||
$data = array();
|
||||
$data['read_status'] = 1;
|
||||
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$params['user_type'] = $user_info['user_type'];
|
||||
$params['notice_type'] = $notice_type;
|
||||
$params['send_status'] = 1;
|
||||
MessageNotice::edit($params,$data);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取患者系统消息通知最后一条消息列表
|
||||
* @return array
|
||||
*/
|
||||
public function getPatientMessageServiceLast(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$result = array();
|
||||
|
||||
// 服务消息
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$params['user_id'] = 1;
|
||||
$params['user_type'] = 1;
|
||||
$params['notice_type'] = 3; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||
$params['notice_system_type'] = 1; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息)
|
||||
$params['send_status'] = 1;
|
||||
$result['service']['info'] = MessageNotice::getOrderOne($params,'notice_send_time',['*']);
|
||||
$result['service']['count'] = MessageNotice::getCount($params);
|
||||
|
||||
// 福利消息
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$params['user_id'] = 1;
|
||||
$params['user_type'] = 1;
|
||||
$params['notice_type'] = 3; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||
$params['notice_system_type'] = 2; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息)
|
||||
$params['send_status'] = 1;
|
||||
$result['benefit']['info'] = MessageNotice::getOrderOne($params,'notice_send_time',['*']);
|
||||
$result['benefit']['count'] = MessageNotice::getCount($params);
|
||||
|
||||
// 退款消息
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$params['user_id'] = 1;
|
||||
$params['user_type'] = 1;
|
||||
$params['notice_type'] = 3; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||
$params['notice_system_type'] = 3; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息)
|
||||
$params['send_status'] = 1;
|
||||
$result['refund']['info'] = MessageNotice::getOrderOne($params,'notice_send_time',['*']);
|
||||
$result['refund']['count'] = MessageNotice::getCount($params);
|
||||
|
||||
// 物流消息
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$params['user_id'] = 1;
|
||||
$params['user_type'] = 1;
|
||||
$params['notice_type'] = 3; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||
$params['notice_system_type'] = 4; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息)
|
||||
$params['send_status'] = 1;
|
||||
$result['logistics']['info'] = MessageNotice::getOrderOne($params,'notice_send_time',['*']);
|
||||
$result['logistics']['count'] = MessageNotice::getCount($params);
|
||||
|
||||
return success($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user