From 98c9e0a00b36228fa704108379a9a260f403ff5d Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 10 Aug 2023 17:00:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=80=E5=85=B7=E5=A4=84?= =?UTF-8?q?=E6=96=B9=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=9B=9E=E6=BB=9A=E3=80=82?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8log=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=A4=84=E6=96=B9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Amqp/Consumer/AssignPharmacistConsumer.php | 2 +- app/Services/CaService.php | 3 +-- app/Services/OrderPrescriptionService.php | 2 +- app/Services/UserDoctorService.php | 5 +++-- extend/Ca/Ca.php | 3 --- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/Amqp/Consumer/AssignPharmacistConsumer.php b/app/Amqp/Consumer/AssignPharmacistConsumer.php index 1425b9e..d5c76ac 100644 --- a/app/Amqp/Consumer/AssignPharmacistConsumer.php +++ b/app/Amqp/Consumer/AssignPharmacistConsumer.php @@ -98,7 +98,7 @@ class AssignPharmacistConsumer extends ConsumerMessage OrderPrescription::edit($params, $save_data); Db::commit(); - } catch (\Exception $e) { + } catch (\Throwable $e) { Db::rollBack(); Log::getInstance()->error("分配药师队列执行失败原因:" . $e->getMessage()); diff --git a/app/Services/CaService.php b/app/Services/CaService.php index 7bf43c4..6d55e1a 100644 --- a/app/Services/CaService.php +++ b/app/Services/CaService.php @@ -397,7 +397,7 @@ class CaService extends BaseService $pdf->Image('@' . $img_result, 10, 10, 0, 0, '', '', '', false, 300, '', false, false, 0, false, false, false); $prescription_pdf_local_filename = $order_prescription['order_prescription_id'] . '.' . 'pdf'; - $prescription_pdf_local_path = dirname(__DIR__, 2) . "/file/prescription/"; + $prescription_pdf_local_path = BASE_PATH . "/runtime/file/prescription/"; $res = mkdirs($prescription_pdf_local_path); if (!$res){ @@ -406,7 +406,6 @@ class CaService extends BaseService // 图片生成的处方pdf存储为本地文件 runtime目录下 $pdf->Output($prescription_pdf_local_path . $prescription_pdf_local_filename, "F"); - return $prescription_img_oss_path; } diff --git a/app/Services/OrderPrescriptionService.php b/app/Services/OrderPrescriptionService.php index dd48625..aae18bc 100644 --- a/app/Services/OrderPrescriptionService.php +++ b/app/Services/OrderPrescriptionService.php @@ -198,7 +198,7 @@ class OrderPrescriptionService extends BaseService $result['file_id'] = $file_id; return $result; - } catch (\Exception $e) { + } catch (\Throwable $e) { throw new BusinessException($e->getMessage()); } } diff --git a/app/Services/UserDoctorService.php b/app/Services/UserDoctorService.php index 545f67a..45fcb34 100644 --- a/app/Services/UserDoctorService.php +++ b/app/Services/UserDoctorService.php @@ -1379,6 +1379,7 @@ class UserDoctorService extends BaseService $params['product_id'] = $item['product_id']; $product = Product::getOne($params); if (empty($product)){ + Db::rollBack(); return fail(HttpEnumCode::SERVER_ERROR,"商品错误"); } @@ -1498,7 +1499,7 @@ class UserDoctorService extends BaseService } Db::commit(); - } catch (\Exception $e) { + } catch (\Throwable $e) { Db::rollBack(); return fail(HttpEnumCode::SERVER_ERROR, $e->getMessage()); } @@ -1507,7 +1508,7 @@ class UserDoctorService extends BaseService // 发送消息-药师审核中 $ImService = new ImService(); $ImService->pharmacistVerify($order_inquiry,(string)$order_prescription->order_prescription_id,$product_name,$user_doctor['user_id'],$order_inquiry['user_id']); - }catch (\Exception $e){ + }catch (\Throwable $e){ return success([],HttpEnumCode::HTTP_SUCCESS,"消息发送失败"); } diff --git a/extend/Ca/Ca.php b/extend/Ca/Ca.php index a8b8fdf..e621b5c 100644 --- a/extend/Ca/Ca.php +++ b/extend/Ca/Ca.php @@ -54,7 +54,6 @@ abstract class Ca ] ]; - Log::getInstance()->info("获取云证书签名请求",$option); try { $response = $this->httpRequest( $this->api_url . '/cloud-certificate-service' . '/api/cloudCert/open/cert/sign', @@ -89,8 +88,6 @@ abstract class Ca ] ]; - dump($option); - try { $response = $this->httpRequest( $this->api_url . '/signgw-service/api/signature/verifyPkcs7',