From 727b548be42fe0c2b4a7be18abb3c69fed4d03cc Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 13 Apr 2023 18:40:32 +0800 Subject: [PATCH] 1 --- app/Command/ReportPreProductOrderCommand.php | 2 +- app/Services/PatientOrderService.php | 28 +++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/app/Command/ReportPreProductOrderCommand.php b/app/Command/ReportPreProductOrderCommand.php index efa0654..6d1dd31 100644 --- a/app/Command/ReportPreProductOrderCommand.php +++ b/app/Command/ReportPreProductOrderCommand.php @@ -70,7 +70,7 @@ class ReportPreProductOrderCommand extends HyperfCommand $redis_value = $redis->get($redis_key); $redis->incr($redis_key); if(!empty($redis_value)){ - if ($redis_value >= 100){ + if ($redis_value >= 2){ // 存储上报失败 $this->savaReportFail($item['order_product_id'],"超出最大上报次数"); diff --git a/app/Services/PatientOrderService.php b/app/Services/PatientOrderService.php index 2aab9fc..cd08111 100644 --- a/app/Services/PatientOrderService.php +++ b/app/Services/PatientOrderService.php @@ -1099,18 +1099,6 @@ class PatientOrderService extends BaseService return fail(); } - // 获取物流数据 - $params = array(); - $params['order_product_id'] = $order_product_id; - $order_product_logistics = OrderProductLogistic::getOne($params); - if (empty($order_product_logistics)){ - return success(null); - } - - $order_product_logistics = $order_product_logistics->toArray(); - - $order_product_logistics['logistics_content'] = json_decode($order_product_logistics['logistics_content'],true); - // 地址数据 $address = array(); $address['province_id'] = $order_product['province_id']; @@ -1127,11 +1115,25 @@ class PatientOrderService extends BaseService $address['consignee_tel_mask'] = $order_product['consignee_tel_mask']; $result = array(); - $result['logistics'] = $order_product_logistics; + $result['logistics'] = null; $result['address'] = $address; + // 获取物流数据 + $params = array(); + $params['order_product_id'] = $order_product_id; + $order_product_logistics = OrderProductLogistic::getOne($params); + if (empty($order_product_logistics)){ + return success($result); + } + + $order_product_logistics = $order_product_logistics->toArray(); + + $order_product_logistics['logistics_content'] = json_decode($order_product_logistics['logistics_content'],true); + $result['logistics'] = $order_product_logistics; + return success($result); } + /** * 获取处方订单列表 * @return array