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]; }