Commit 2954351a authored by hujun's avatar hujun

1

parent 156819c5
...@@ -170,6 +170,7 @@ class HouseService ...@@ -170,6 +170,7 @@ class HouseService
if (empty($agent_data)) { if (empty($agent_data)) {
return false; return false;
} }
$agent_id_old = [];
$agent_id = array_unique(explode(',', $agent_data)); $agent_id = array_unique(explode(',', $agent_data));
...@@ -180,6 +181,7 @@ class HouseService ...@@ -180,6 +181,7 @@ class HouseService
$agent_data_old = $this->agetn_house->getAgentHouseAll('id,agents_id,houses_id', $agent_house_where); $agent_data_old = $this->agetn_house->getAgentHouseAll('id,agents_id,houses_id', $agent_house_where);
foreach ($agent_data_old['data'] as $k => $v) { foreach ($agent_data_old['data'] as $k => $v) {
$agent_id_old = $v['agents_id'];
if (in_array($v['agents_id'], $agent_id)) { if (in_array($v['agents_id'], $agent_id)) {
continue; continue;
} else { } else {
...@@ -193,7 +195,7 @@ class HouseService ...@@ -193,7 +195,7 @@ class HouseService
} }
foreach ($agent_id as $k2 => $v2) { foreach ($agent_id as $k2 => $v2) {
if (in_array($v2, $agent_data_old['data'])) { if (in_array($v2, $agent_id_old)) {
continue; continue;
} else { } else {
$insert_data[$k2]['agents_id'] = $v2; $insert_data[$k2]['agents_id'] = $v2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment