From fde2f447667b98d248999dd09960733fdf8a91db Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Tue, 18 Apr 2023 10:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E6=88=91?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E7=94=9F=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=82=A3?= =?UTF-8?q?=E8=80=85=E9=97=AE=E8=AF=8A=E5=8F=96=E6=B6=88=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/UserDoctorController.php | 2 +- app/Model/PatientHistoryInquiry.php | 5 ----- app/Services/MessagePush.php | 2 +- app/Services/PatientDoctorService.php | 14 ++++---------- app/Services/UserDoctorService.php | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/Controller/UserDoctorController.php b/app/Controller/UserDoctorController.php index fb8fb0f..8128829 100644 --- a/app/Controller/UserDoctorController.php +++ b/app/Controller/UserDoctorController.php @@ -115,7 +115,7 @@ class UserDoctorController extends AbstractController * 新增绑定医生银行卡 * @return ResponseInterface * @throws ContainerExceptionInterface - * @throws NotFoundExceptionInterface + * @throws NotFoundExceptionInterface|GuzzleException */ public function addDoctorBankCard(): ResponseInterface { diff --git a/app/Model/PatientHistoryInquiry.php b/app/Model/PatientHistoryInquiry.php index abdc181..8f7f176 100644 --- a/app/Model/PatientHistoryInquiry.php +++ b/app/Model/PatientHistoryInquiry.php @@ -40,11 +40,6 @@ class PatientHistoryInquiry extends Model */ protected array $fillable = ['history_inquiry_id', 'patient_id', 'doctor_id', 'pharmacist_id', 'order_inquiry_id', 'history_status', 'created_at', 'updated_at']; - /** - * The attributes that should be cast to native types. - */ - protected array $casts = ['history_inquiry_id' => 'integer', 'patient_id' => 'integer', 'doctor_id' => 'integer', 'pharmacist_id' => 'integer', 'order_inquiry_id' => 'integer', 'history_status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime']; - protected string $primaryKey = "history_inquiry_id"; /** diff --git a/app/Services/MessagePush.php b/app/Services/MessagePush.php index e017877..d605c8e 100644 --- a/app/Services/MessagePush.php +++ b/app/Services/MessagePush.php @@ -1939,7 +1939,7 @@ class MessagePush extends BaseService $data['notice_type'] = 1; $data['inquiry_type'] = $this->order_inquiry['inquiry_type']; // 问诊类型(医生端服务通知存在 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药) $data['from_name'] = "肝胆小秘书"; - $data['notice_brief_title'] = inquiryTypeToString($this->order_inquiry['inquiry_type']); + $data['notice_brief_title'] = "患者已取消问诊咨询。"; $data['notice_title'] = "患者已取消问诊咨询。"; $data['notice_content'] = "患者已取消问诊咨询,您可选择其他患者的问诊咨询进行接诊。"; $data['link_type'] = 3; // 问诊消息列表页 diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index 23f6ff7..b28a9b0 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -744,15 +744,9 @@ class PatientDoctorService extends BaseService continue; } - if (count($results) > 5){ - // 超出5个 - continue; - } - - // 检测是否重复,如果重复,删除最早的一个数据 - foreach ($results as $key => $result){ - if ($patient_history_doctor['doctor_id'] == $result['doctor_id']){ - unset($results[$key]); + foreach ($results as $item){ + if ($patient_history_doctor['doctor_id'] == $item['doctor_id']){ + continue 2; } } @@ -781,7 +775,7 @@ class PatientDoctorService extends BaseService } } - $results = array_merge($results); + return $results; } } \ No newline at end of file diff --git a/app/Services/UserDoctorService.php b/app/Services/UserDoctorService.php index 029fc0e..4346f43 100644 --- a/app/Services/UserDoctorService.php +++ b/app/Services/UserDoctorService.php @@ -28,6 +28,7 @@ use App\Model\OrderPrescriptionIcd; use App\Model\OrderPrescriptionProduct; use App\Model\OrderProductItem; use App\Model\PatientHistoryInquiry; +use App\Model\Popup; use App\Model\Product; use App\Model\ProductPlatformAmount; use App\Model\SystemInquiryConfig; @@ -317,6 +318,19 @@ class UserDoctorService extends BaseService $data['is_bind_bank'] = 1; UserDoctor::editUserDoctor($params, $data); + // 新增弹窗表 + $data = array(); + $data['user_id'] = $user_info['user_id']; + $data['app_type'] = 1; + $data['client_type'] = 2; + $data['popup_type'] = 1; + $data['popup_link'] = ""; // 跳转地址 + $popup = Popup::addPopup($data); + if (empty($popup)){ + Db::rollBack(); + return fail(HttpEnumCode::SERVER_ERROR); + } + Db::commit(); } catch (\Exception $e) { Db::rollBack();