This commit is contained in:
wucongxing 2023-03-27 09:08:34 +08:00
parent fa44ffae3f
commit afc04c4026
4 changed files with 35 additions and 23 deletions

View File

@ -32,4 +32,15 @@ class MessageNoticeController extends AbstractController
$data = $MessageNoticeService->getDoctorMessageSystem();
return $this->response->json($data);
}
/**
* 获取医生系统公告详情
* @return ResponseInterface
*/
public function getDoctorMessageSystemInfo(): ResponseInterface
{
$MessageNoticeService = new MessageNoticeService();
$data = $MessageNoticeService->getDoctorMessageSystemInfo();
return $this->response->json($data);
}
}

View File

@ -590,7 +590,7 @@ class InquiryService extends BaseService
return fail();
}
if ($order_inquiry['doctor_id'] != $user_info['client_user_id'] || $order_inquiry['patient_id'] != $user_info['client_user_id']){
if ($order_inquiry['doctor_id'] != $user_info['client_user_id'] && $order_inquiry['patient_id'] != $user_info['client_user_id']){
return fail();
}

View File

@ -27,14 +27,14 @@ 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){
if (!empty($item['link_params'])){
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
if (!empty($result['data'])) {
foreach ($result['data'] as &$item) {
if (!empty($item['link_params'])) {
$item['link_params'] = json_decode($item['link_params']);
}
if (!empty($item['show_params'])){
if (!empty($item['show_params'])) {
$item['show_params'] = json_decode($item['show_params']);
}
}
@ -59,24 +59,22 @@ class MessageNoticeService extends BaseService
$params['notice_type'] = 2; // 消息类型1:医生服务通知 2:医生系统公告 3:患者系统消息
$params['send_status'] = 1;
$message_notice_system_params = array();
$message_notice_system_params["notice_type"] = 2;
$message_notice_system_params["send_status"] = 1;
$fields = [
'notice_id',
'notice_system_type',
'from_name',
'notice_title',
'notice_content',
'send_status',
'notice_send_time',
'link_type',
'notice_params',
];
$result = MessageNotice::getMessageNoticePage($params,$message_notice_system_params,$fields,$page,$per_page);
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
if (!empty($result['data'])) {
foreach ($result['data'] as &$item) {
if (!empty($item['link_params'])) {
$item['link_params'] = json_decode($item['link_params'], true);
}
if (!empty($item['show_params'])) {
$item['show_params'] = json_decode($item['show_params'], true);
}
}
}
return success($result);
}
public function getDoctorMessageSystemInfo(){
}
}

View File

@ -194,6 +194,9 @@ Router::addGroup('/doctor', function () {
// 获取医生系统公告列表-分页
Router::get('/system', [MessageNoticeController::class, 'getDoctorMessageSystem']);
// 获取医生系统公告列表-分页
Router::get('/system/{notice_id:\d+}', [MessageNoticeController::class, 'getDoctorMessageSystemInfo']);
});
});