获取客户时间
This commit is contained in:
@@ -166,6 +166,7 @@ class CustomerController
|
|||||||
}else{
|
}else{
|
||||||
$where[] = ['user_id', $userId];
|
$where[] = ['user_id', $userId];
|
||||||
}
|
}
|
||||||
|
$where[] = ['status', 1];
|
||||||
if (!empty($countryId)){
|
if (!empty($countryId)){
|
||||||
$where[] = ['country_id', $countryId];
|
$where[] = ['country_id', $countryId];
|
||||||
}
|
}
|
||||||
@@ -328,8 +329,10 @@ class CustomerController
|
|||||||
return Util::fail([], trans('contacts_not_null'));
|
return Util::fail([], trans('contacts_not_null'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user = User::where(['id' => $request->user['id']])->first();
|
||||||
$data = [
|
$data = [
|
||||||
'user_id' => $request->user['id'],
|
'user_id' => $request->user['id'],
|
||||||
|
'corp_id' => $user->corp_id,
|
||||||
'grade' => Util::getParam($request, 'grade', 0),
|
'grade' => Util::getParam($request, 'grade', 0),
|
||||||
'channel_id' => $channel_id,
|
'channel_id' => $channel_id,
|
||||||
'country_id' => $country_id,
|
'country_id' => $country_id,
|
||||||
@@ -375,8 +378,11 @@ class CustomerController
|
|||||||
if (Util::isEmpty($customerId)) {
|
if (Util::isEmpty($customerId)) {
|
||||||
return Util::fail([], trans('customer_id').trans('not_null'));
|
return Util::fail([], trans('customer_id').trans('not_null'));
|
||||||
}
|
}
|
||||||
|
$user = User::where(['id' => $userId])->first();
|
||||||
$data = [
|
$data = [
|
||||||
'user_id' => $request->user['id']
|
'user_id' => $request->user['id'],
|
||||||
|
'obtain' => time(),
|
||||||
|
'corp_id' => $user->corp_id,
|
||||||
];
|
];
|
||||||
$customer= Customer::withTrashed()->find($customerId);
|
$customer= Customer::withTrashed()->find($customerId);
|
||||||
|
|
||||||
@@ -435,7 +441,12 @@ class CustomerController
|
|||||||
'user_id' => $user['id'],
|
'user_id' => $user['id'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$res = $query->update(['user_id' => $user->id]);
|
|
||||||
|
$data = [
|
||||||
|
'user_id' => $user->id,
|
||||||
|
'obtain' => time(),
|
||||||
|
];
|
||||||
|
$res = $query->update($data);
|
||||||
|
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user