diff --git a/app/crm/controller/CustomerController.php b/app/crm/controller/CustomerController.php index 42003c0..e1e3f79 100644 --- a/app/crm/controller/CustomerController.php +++ b/app/crm/controller/CustomerController.php @@ -272,6 +272,7 @@ class CustomerController extends BaseController ]; if (Util::isEmpty($id)) { + $data['enter_user_id'] = $request->user->uid; $res = Customer::create($data); } else { unset($data['grade']); diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index b54eeab..7317ac3 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -2,6 +2,7 @@ namespace app\crm\service; +use app\common\model\User; use app\crm\logic\CustomerLogic; use app\crm\model\CarType; use app\crm\model\Channel; @@ -145,6 +146,8 @@ class CustomerService $customer['channel_name'] = empty($customer['channel_id'])?'':Channel::where(['id'=>$customer['channel_id']])->value($nameLang); // $customer['last_follow'] = $last_follow; + $customer['enter_user_name'] = empty($customer['enter_user_id']) ? '' : User::find($customer['enter_user_id'])->value('name'); + if ($tag) { foreach ($customer['tags'] as &$tag) { $tag['names'] = unserialize($tag['names']);