|
|
@ -429,12 +429,12 @@ class Customer extends ApiCommon
|
|
|
|
|
|
|
|
|
|
|
|
# 获取客户数据
|
|
|
|
# 获取客户数据
|
|
|
|
$customerData = [];
|
|
|
|
$customerData = [];
|
|
|
|
$customerList = db('crm_customer')->field(['customer_id', 'owner_user_id', 'name', 'crm_roziuw'])->whereIn('customer_id', $customerIds)->select();
|
|
|
|
$customerList = db('crm_customer')->field(['customer_id', 'owner_user_id', 'name', 'crm_lthugd'])->whereIn('customer_id', $customerIds)->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($customerList as $key => $value) {
|
|
|
|
foreach ($customerList as $key => $value) {
|
|
|
|
# 判断客户类型是否符合公海池客户类型
|
|
|
|
# 判断客户类型是否符合公海池客户类型
|
|
|
|
if (!in_array($value['crm_roziuw'], $customerTypeArray)) {
|
|
|
|
if (!in_array($value['crm_lthugd'], $customerTypeArray)) {
|
|
|
|
$message[] = '客户类型与公海池类型不匹配!';
|
|
|
|
$message[] = '客户类型与公海池类型不匹配!';
|
|
|
|
return resultArray(['error' => $message]);
|
|
|
|
return resultArray(['error' => $message]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1197,7 +1197,7 @@ class Customer extends ApiCommon
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function Type()
|
|
|
|
public function Type()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$data = db('admin_field')->where(['types' => 'crm_customer', 'field' => 'crm_roziuw'])->value('options');
|
|
|
|
$data = db('admin_field')->where(['types' => 'crm_customer', 'field' => 'crm_lthugd'])->value('options');
|
|
|
|
|
|
|
|
|
|
|
|
$data = explode(',', $data);
|
|
|
|
$data = explode(',', $data);
|
|
|
|
|
|
|
|
|
|
|
|