获取问诊订单消息内页基础数据

This commit is contained in:
2023-03-25 17:48:04 +08:00
parent 1befd6a06c
commit 359d9d70b9
6 changed files with 118 additions and 37 deletions
+35 -1
View File
@@ -27,8 +27,42 @@ class MessageNoticeService extends BaseService
$params['notice_type'] = 1; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
$params['send_status'] = 1;
$result = MessageNotice::getMessageNoticePage($params,["*"],$page,$per_page);
if (!empty($result['data'])){
foreach ($result['data'] as &$item){
/**
* 处理通知参数(json数据,此字段内容和link_type字段有关联)
* link_type
* 1(无按钮):空
* 2(我的账户):空
* 3(联系客服):空
* 4(问诊消息):
*/
$item['notice_params'] = json_decode($item['notice_params']) ?: [];
}
}
return success($result);
}
/**
* 获取医生系统公告列表-分页
* @return array
*/
public function getDoctorMessageSystem(): array
{
$user_info = $this->request->getAttribute("userInfo") ?? [];
$page = $this->request->input('page', 1);
$per_page = $this->request->input('per_page', 10);
$params = array();
$params['user_id'] = $user_info['user_id'];
$params['user_type'] = 2;
$params['notice_type'] = 2; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
$params['send_status'] = 1;
$message_notice_system_params = array();
$message_notice_system_params["notice_type"] = 1;
$message_notice_system_params["notice_type"] = 2;
$message_notice_system_params["send_status"] = 1;
$fields = [