From a13b55d90b6a6e52ef6934485632fa5e0b8831ae Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 14 Aug 2023 14:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B2=9F=E9=80=9A=E5=B8=82?= =?UTF-8?q?=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/CallBackController.php | 2 +- app/Model/BasicDetectionOrgan.php | 7 ++++++- app/Services/InquiryService.php | 23 ++++++++++------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/Controller/CallBackController.php b/app/Controller/CallBackController.php index a8a3048..7e2f896 100644 --- a/app/Controller/CallBackController.php +++ b/app/Controller/CallBackController.php @@ -1333,7 +1333,7 @@ class CallBackController extends AbstractController // 获取检测订单数据 $params = array(); - $params['detection_no'] = "D548154592174350336"; + $params['detection_no'] = "D549534850211602432"; $order_detection = OrderDetection::getOne($params); if (empty($order_detection)){ return $this->detectionResultFailReturn("非法订单"); diff --git a/app/Model/BasicDetectionOrgan.php b/app/Model/BasicDetectionOrgan.php index c3d45ba..1967aac 100644 --- a/app/Model/BasicDetectionOrgan.php +++ b/app/Model/BasicDetectionOrgan.php @@ -11,8 +11,13 @@ use Hyperf\Snowflake\Concern\Snowflake; /** * @property int $detection_organ_id 主键id + * @property int $company_id 合作公司id * @property string $detection_organ_name 检测机构名称 + * @property string $app_id key + * @property string $app_secret 秘钥 * @property int $status 状态(1:正常 2:删除) + * @property string $request_dev_url 测试请求地址 + * @property string $request_prod_url 正式请求地址 * @property \Carbon\Carbon $created_at 创建时间 * @property \Carbon\Carbon $updated_at 修改时间 */ @@ -28,7 +33,7 @@ class BasicDetectionOrgan extends Model /** * The attributes that are mass assignable. */ - protected array $fillable = ['detection_organ_id', 'detection_organ_name', 'status', 'created_at', 'updated_at']; + protected array $fillable = ['detection_organ_id', 'company_id', 'detection_organ_name', 'app_id', 'app_secret', 'status', 'request_dev_url', 'request_prod_url', 'created_at', 'updated_at']; protected string $primaryKey = "detection_organ_id"; diff --git a/app/Services/InquiryService.php b/app/Services/InquiryService.php index 6ee3266..70a3b25 100644 --- a/app/Services/InquiryService.php +++ b/app/Services/InquiryService.php @@ -766,18 +766,17 @@ class InquiryService extends BaseService $follow = false; // 关注状态 $is_evaluation = false; // 评价状态 + // 沟通次数,沟通时长 + $params = array(); + $params['inquiry_type'] = $order_inquiry['inquiry_type']; + $params['inquiry_mode'] = $order_inquiry['inquiry_mode']; + $system_inquiry_config = SystemInquiryConfig::getOne($params); + if (!empty($system_inquiry_config)){ + $times_number = $system_inquiry_config['times_number']; + $duration = $system_inquiry_config['duration']; + } + if ($user_info['user_type'] == 1){ - - // 沟通次数,沟通时长 - $params = array(); - $params['inquiry_type'] = $order_inquiry['inquiry_type']; - $params['inquiry_mode'] = $order_inquiry['inquiry_mode']; - $system_inquiry_config = SystemInquiryConfig::getOne($params); - if (!empty($system_inquiry_config)){ - $times_number = $system_inquiry_config['times_number']; - $duration = $system_inquiry_config['duration']; - } - // 关注状态 $params = array(); $params['patient_id'] = $user_info['client_user_id']; @@ -792,8 +791,6 @@ class InquiryService extends BaseService $is_evaluation = OrderEvaluation::getExists($params); } - - $result = array(); $result['doctor_user_id'] = $user_doctor['user_id']; $result['patient_user_id'] = $order_inquiry['user_id'];