From 39bd343893413e3322d66e3305e480215edae15a Mon Sep 17 00:00:00 2001 From: mzl92 Date: Tue, 29 Jul 2025 08:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/controller/NotifyController.php | 2 +- .../controller/InquiryLogController.php | 21 +++++++++++++++---- app/inquiry/service/InquiryLogService.php | 6 +++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/app/common/controller/NotifyController.php b/app/common/controller/NotifyController.php index 9e4fffb..f6e728e 100644 --- a/app/common/controller/NotifyController.php +++ b/app/common/controller/NotifyController.php @@ -126,7 +126,7 @@ class NotifyController try { $data = $request->post(); - var_dump($data); + var_dump('飞书事件回调:'.$data); return json($data); } catch (\Throwable $e) { diff --git a/app/inquiry/controller/InquiryLogController.php b/app/inquiry/controller/InquiryLogController.php index 82f5667..dec1ca4 100644 --- a/app/inquiry/controller/InquiryLogController.php +++ b/app/inquiry/controller/InquiryLogController.php @@ -30,14 +30,27 @@ class InquiryLogController extends BaseController $countdown = 60 * 60; $data['countdown'] = (time() - $data['r_time']) < $countdown ? $data['r_time'] + (60*60) : time()-1; } - if (isset($data['created_at'])) + + if (isset($data['created_at'])) { $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); - if (isset($data['updated_at'])) + } + + if (isset($data['updated_at'])) { $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); - if (isset($data['r_time'])) + } + + if (isset($data['r_time'])) { $data['r_time'] = $data['r_time'] > 0 ? date('Y-m-d H:i:s', $data['r_time']) : 0; - if (isset($data['t_time'])) + } + + if (isset($data['t_time'])) { $data['t_time'] = $data['t_time'] > 0 ? date('Y-m-d H:i:s', $data['t_time']) : 0; + } + + if (isset($data['quality'])) { + $inquiryLogService = new InquiryLogService(); + $data['quality'] = $inquiryLogService->qualityName($data['quality']); + } // var_dump($data); return $data; } diff --git a/app/inquiry/service/InquiryLogService.php b/app/inquiry/service/InquiryLogService.php index 7a935b4..c736ceb 100644 --- a/app/inquiry/service/InquiryLogService.php +++ b/app/inquiry/service/InquiryLogService.php @@ -233,9 +233,9 @@ class InquiryLogService return '🤍 银牌商机'; } $quality = [ - 1 => '💛 金牌商机', - 2 => '🤍 银牌商机', - 3 => '🧡 银牌商机' + 1 => '💛金牌商机', + 2 => '🤍银牌商机', + 3 => '🧡铜牌商机' ]; return $quality[$id]; }