diff --git a/app/Model/OrderInquiryVideo.php b/app/Model/OrderInquiryVideo.php new file mode 100644 index 0000000..a4275b8 --- /dev/null +++ b/app/Model/OrderInquiryVideo.php @@ -0,0 +1,59 @@ +first($fields); + } + + /** + * 获取信息-多条 + * @param array $params + * @param array $fields + * @return object|null + */ + public static function getList(array $params, array $fields = ['*']): object|null + { + return self::where($params)->get($fields); + } +} diff --git a/app/Services/InquiryService.php b/app/Services/InquiryService.php index 22991f6..44dcce4 100644 --- a/app/Services/InquiryService.php +++ b/app/Services/InquiryService.php @@ -20,6 +20,7 @@ use App\Model\OrderInquiry; use App\Model\OrderInquiryCase; use App\Model\OrderInquiryCoupon; use App\Model\OrderInquiryRefund; +use App\Model\OrderInquiryVideo; use App\Model\OrderPrescription; use App\Model\OrderProductCoupon; use App\Model\PatientFamily; @@ -885,6 +886,7 @@ class InquiryService extends BaseService $follow = false; // 关注状态 $is_evaluation = false; // 评价状态 + $is_reservation_video = false; // 预约视频状态 // 获取医生问诊配置-问诊购药 $multi_point_enable = 0; @@ -915,6 +917,14 @@ class InquiryService extends BaseService $is_evaluation = OrderEvaluation::getExists($params); } + // 获取视频数据 + $params = array(); + $params['order_inquiry_id'] = $order_inquiry['order_inquiry_id']; + $order_inquiry_video = OrderInquiryVideo::getOne($params); + if (!empty($order_inquiry_video)){ + $is_reservation_video = true; + } + $result = array(); $result['doctor_user_id'] = $user_doctor['user_id']; $result['patient_user_id'] = $order_inquiry['user_id']; @@ -935,6 +945,7 @@ class InquiryService extends BaseService $result['reception_time'] = $order_inquiry['reception_time'] ?: null; // 接诊时间 $result['multi_point_status'] = $user_doctor['multi_point_status'] ?: null;// 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) $result['multi_point_enable'] = $multi_point_enable;// 医生问诊购药是否开启 + $result['is_reservation_video'] = $is_reservation_video;// 预约视频状态 return success($result); } diff --git a/config/routes.php b/config/routes.php index 544f2f6..7f348d3 100644 --- a/config/routes.php +++ b/config/routes.php @@ -222,7 +222,7 @@ Router::addGroup('/doctor', function () { }); }); - // 消息通知 + // 消息通知s Router::addGroup('/message', function () { // 获取医生消息页通知数据 Router::get('/notice', [MessageNoticeController::class, 'getDoctorMessageNotice']);