From be87fce09b637f11183289489c17252db17d09a4 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Fri, 25 Jul 2025 09:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/controller/CustomerController.php | 7 +++++-- app/crm/controller/FollowController.php | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/crm/controller/CustomerController.php b/app/crm/controller/CustomerController.php index a9796f2..81936eb 100644 --- a/app/crm/controller/CustomerController.php +++ b/app/crm/controller/CustomerController.php @@ -2,6 +2,7 @@ namespace app\crm\controller; +use app\common\model\Corp; use app\common\model\User; use app\crm\model\Channel; use app\crm\model\Country; @@ -249,13 +250,15 @@ class CustomerController extends BaseController return $this->error(trans('contacts_not_null')); } + $corpInfo = Corp::where('abbr', $request->basic_data['corp_abbr'])->first(); + $corpId = $corpInfo->id; $data = [ 'user_id' => $request->user->uid, - 'corp_abbr' => $request->basic_data['corp_abbr'], + 'corp_abbr' => $corpId, 'grade' => Util::getParam($request, 'grade', 0), 'channel_id' => $channel_id, 'country_id' => $country_id, - 'car_type_id' => $car_type_id, +// 'car_type_id' => $car_type_id, 'magnitude' => Util::getParam($request, 'magnitude', 0), 'email' => $email, 'phone' => $phone, diff --git a/app/crm/controller/FollowController.php b/app/crm/controller/FollowController.php index a23749c..caf785f 100644 --- a/app/crm/controller/FollowController.php +++ b/app/crm/controller/FollowController.php @@ -2,6 +2,7 @@ namespace app\crm\controller; +use app\common\model\Corp; use app\crm\model\Customer; use app\crm\model\Follow; use app\crm\service\CustomerService; @@ -96,9 +97,11 @@ class FollowController extends BaseController return $this->error(trans('picture_not_null')); } + $corpInfo = Corp::where('abbr', $request->basic_data['corp_abbr'])->first(); + $corpId = $corpInfo->id; $data = [ 'user_id' => $request->user->uid, - 'corp_abbr' => $request->basic_data['corp_abbr'], + 'corp_abbr' => $corpId, 'customer_id' => $customer_id, 'type' => $type, 'picture' => $picture,