This commit is contained in:
2025-07-25 09:47:27 +08:00
parent dbb2b04870
commit be87fce09b
2 changed files with 9 additions and 3 deletions
+5 -2
View File
@@ -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,
+4 -1
View File
@@ -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,