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',