From 2d2e30faa98b58891c2bdf6e4b2d99c1ce5a1996 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 20 Aug 2025 11:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/service/CustomerService.php | 2 +- app/crm/utils/Util.php | 8 +++++++- app/ticket/service/ConversationService.php | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index b7654f0..ef5aa71 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -256,7 +256,7 @@ class CustomerService // $customer['created_at'] = Util::timeTotDate($customer['created_at']); // $customer['updated_at'] = Util::timeTotDate($customer['updated_at']); - $customer = Util::formatDate($customer,['follow_last']); + $customer = Util::formatDate($customer,['follow_next','follow_last']); $nameLang = $language=='en'?'name_en':($language=='ru'?'name_ru':'name'); $countryLang = $language=='en'?'en_addr':'cn_addr'; // $customer['car_type_name'] = empty($customer['car_type_id'])?'':CarType::where(['id'=>$customer['car_type_id']])->value($nameLang); diff --git a/app/crm/utils/Util.php b/app/crm/utils/Util.php index e6ac4d0..586ee45 100644 --- a/app/crm/utils/Util.php +++ b/app/crm/utils/Util.php @@ -100,7 +100,13 @@ class Util public static function formatDate($value,$key = ['created_at','updated_at']) { foreach ($key as $k){ - $value[$k]= self::timeTotDate($value[$k]); + // 如果是整数,可能是 UNIX 时间戳 + if (is_numeric($value[$k]) && $value[$k] > 0) { + // 检查是否是合理的时间戳范围(1970-2100年) + if ($value[$k] >= 0 && $value[$k] <= 4102444800) { + $value[$k]= self::timeTotDate($value[$k]); + } + } } return $value; } diff --git a/app/ticket/service/ConversationService.php b/app/ticket/service/ConversationService.php index e80704a..22da6fb 100644 --- a/app/ticket/service/ConversationService.php +++ b/app/ticket/service/ConversationService.php @@ -60,7 +60,7 @@ class ConversationService 'reply' => '', ]; //$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱 - $emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤 + $emailDefault = 'support@hnxinyouhe.com'; //范彩凤 if (empty($conversation)) { $email = $emailDefault; }else{ @@ -108,7 +108,7 @@ class ConversationService 'reply' => '', ]; //$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱 - $emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤 + $emailDefault = 'support@hnxinyouhe.com'; //范彩凤 if (empty($conversation)) { $email = $emailDefault; }else{