1
This commit is contained in:
parent
fa44ffae3f
commit
afc04c4026
@ -32,4 +32,15 @@ class MessageNoticeController extends AbstractController
|
|||||||
$data = $MessageNoticeService->getDoctorMessageSystem();
|
$data = $MessageNoticeService->getDoctorMessageSystem();
|
||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生系统公告详情
|
||||||
|
* @return ResponseInterface
|
||||||
|
*/
|
||||||
|
public function getDoctorMessageSystemInfo(): ResponseInterface
|
||||||
|
{
|
||||||
|
$MessageNoticeService = new MessageNoticeService();
|
||||||
|
$data = $MessageNoticeService->getDoctorMessageSystemInfo();
|
||||||
|
return $this->response->json($data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -590,7 +590,7 @@ class InquiryService extends BaseService
|
|||||||
return fail();
|
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();
|
return fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,14 +27,14 @@ class MessageNoticeService extends BaseService
|
|||||||
$params['notice_type'] = 1; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
$params['notice_type'] = 1; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||||
$params['send_status'] = 1;
|
$params['send_status'] = 1;
|
||||||
|
|
||||||
$result = MessageNotice::getMessageNoticePage($params,["*"],$page,$per_page);
|
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
|
||||||
if (!empty($result['data'])){
|
if (!empty($result['data'])) {
|
||||||
foreach ($result['data'] as &$item){
|
foreach ($result['data'] as &$item) {
|
||||||
if (!empty($item['link_params'])){
|
if (!empty($item['link_params'])) {
|
||||||
$item['link_params'] = json_decode($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']);
|
$item['show_params'] = json_decode($item['show_params']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,24 +59,22 @@ class MessageNoticeService extends BaseService
|
|||||||
$params['notice_type'] = 2; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
$params['notice_type'] = 2; // 消息类型(1:医生服务通知 2:医生系统公告 3:患者系统消息
|
||||||
$params['send_status'] = 1;
|
$params['send_status'] = 1;
|
||||||
|
|
||||||
$message_notice_system_params = array();
|
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
|
||||||
$message_notice_system_params["notice_type"] = 2;
|
if (!empty($result['data'])) {
|
||||||
$message_notice_system_params["send_status"] = 1;
|
foreach ($result['data'] as &$item) {
|
||||||
|
if (!empty($item['link_params'])) {
|
||||||
$fields = [
|
$item['link_params'] = json_decode($item['link_params'], true);
|
||||||
'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);
|
|
||||||
|
|
||||||
|
if (!empty($item['show_params'])) {
|
||||||
|
$item['show_params'] = json_decode($item['show_params'], true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return success($result);
|
return success($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDoctorMessageSystemInfo(){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -194,6 +194,9 @@ Router::addGroup('/doctor', function () {
|
|||||||
|
|
||||||
// 获取医生系统公告列表-分页
|
// 获取医生系统公告列表-分页
|
||||||
Router::get('/system', [MessageNoticeController::class, 'getDoctorMessageSystem']);
|
Router::get('/system', [MessageNoticeController::class, 'getDoctorMessageSystem']);
|
||||||
|
|
||||||
|
// 获取医生系统公告列表-分页
|
||||||
|
Router::get('/system/{notice_id:\d+}', [MessageNoticeController::class, 'getDoctorMessageSystemInfo']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user