Commit 065274fe authored by hujun's avatar hujun

exclusive

parent f3980a4b
......@@ -531,7 +531,7 @@ class Houses extends Basic
*/
public function editExclusive()
{
if (empty($this->params['houses_id']) || empty($this->params['exclusive_id'])) {
if (empty($this->params['houses_id'])) {
return $this->response(101, '参数错误');
}
......@@ -547,7 +547,7 @@ class Houses extends Basic
$this->msg = $this->data['msg'];
}
} else {
$result = $house->delAgentHouse(3, $this->params['houses_id'], $this->params['exclusive_id']);
$result = $house->delAgentHouse(3, $this->params['houses_id']);
if (!$result) {
$this->code = 101;
$this->msg = '解除独家关系失败';
......
......@@ -944,18 +944,17 @@ class HouseService
* @param $agent_id
* @return GHousesToAgents|bool
*/
public function delAgentHouse($type, $house_id, $agent_id) {
if (empty($type) || empty($house_id) || empty($agent_id)) {
public function delAgentHouse($type, $house_id) {
if (empty($type) || empty($house_id)) {
return false;
}
$id = $this->m_house->getTotal(['id'=>$house_id]);
$id = $this->m_house->getTotal(['id'=>$house_id,'is_exclusive_type'=>1]);
if (empty($id)) {
return false;
}
$where['houses_id'] = $house_id;
$where['agents_id'] = $agent_id;
$where['type'] = $type;
$is_ok = $this->agent_house->updateData($where, ['is_del'=>1]);
if ($type == 3) {
......
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