|
|
@ -585,7 +585,9 @@ class LoginService extends BaseHomeService |
|
|
|
]); |
|
|
|
// 如果有代理,绑定到代理下一个客服(轮询客服绑定) |
|
|
|
if ($agentId > 0 ) { |
|
|
|
Log::info("手机号注册 - 开始获取客服列表..."); |
|
|
|
$customerIds = AdminModel::getCustomerIdsByAgentId($agentId); // 获取代理下的所有客服ID |
|
|
|
Log::info("手机号注册 - 获取客服列表结果==".json_encode($customerIds)); |
|
|
|
if (empty($customerIds)) { |
|
|
|
return $this->toData('500', lang('account_registration_failed')); |
|
|
|
} |
|
|
@ -599,6 +601,7 @@ class LoginService extends BaseHomeService |
|
|
|
$tagIndex = $counterIndex % count($customerIds); |
|
|
|
$tagCustomerId = $customerIds[$tagIndex]; |
|
|
|
} |
|
|
|
Log::info("手机号注册 - 或者最终绑定客服ID==".$tagCustomerId); |
|
|
|
if ($tagCustomerId > 0) { |
|
|
|
$regUser->customer_id = $tagCustomerId; |
|
|
|
$regUser->save(); |
|
|
|