From 3ee35c147dd310a911dccd323c66def526464efb Mon Sep 17 00:00:00 2001
From: weiz <weiz@lihai.com>
Date: Thu, 28 Dec 2023 15:57:58 +0800
Subject: [PATCH] fixed 12-28

---
 app/adminapi/logic/custom/CustomLogic.php       | 2 ++
 app/common/model/custom_follow/CustomFollow.php | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/app/adminapi/logic/custom/CustomLogic.php b/app/adminapi/logic/custom/CustomLogic.php
index 927f48a13..24ba0f7a9 100644
--- a/app/adminapi/logic/custom/CustomLogic.php
+++ b/app/adminapi/logic/custom/CustomLogic.php
@@ -152,6 +152,8 @@ class CustomLogic extends BaseLogic
     public static function detail($params): array
     {
         $custom = Custom::findOrEmpty($params['id']);
+		$parent_company = $custom::field('name')->where('id',$custom['parent_company'])->findOrEmpty();
+		$custom['parent_company_name'] = $parent_company['name'];
         $custom->org;
         $custom->dept;
         $custom->other_contacts = json_decode($custom->other_contacts, true);
diff --git a/app/common/model/custom_follow/CustomFollow.php b/app/common/model/custom_follow/CustomFollow.php
index ef62a6001..85939dbd1 100644
--- a/app/common/model/custom_follow/CustomFollow.php
+++ b/app/common/model/custom_follow/CustomFollow.php
@@ -34,6 +34,11 @@ class CustomFollow extends BaseModel
     {
         return empty($value) ? '' : date('Y-m-d H:i:s', $value);
     }
+	
+	public function getAnnexAttr($value)
+	{
+		return empty($value) ? '' : json_decode($value,true);
+	}
 
     public function getNextFollowDateAttr($value)
     {