Commit e1d70e2f authored by hujun's avatar hujun

exclusive

parent 065274fe
......@@ -1032,20 +1032,23 @@ class Shop extends Basic
*/
public function editExclusive()
{
if (empty($this->params['id']) || empty($this->params['exclusive_ids'])) {
if (empty($this->params['id'])) {
return $this->response(101, '参数错误');
}
$code = 200;
$msg = "";
$house = new HouseService();
if ($this->params['is_exclusive_type'] == 1) {
if (empty($this->params['exclusive_ids'])) {
return $this->response(101, '参数错误');
}
$result = $house->addHouse($this->params, $this->agentId, 1, 0, 'exclusive');
if ($result['status'] == 'fail') {
$code = 101;
$msg = $result['msg'];
}
} else {
$result = $house->delAgentHouse(3, $this->params['id'], $this->params['exclusive_ids']);
$result = $house->delAgentHouse(3, $this->params['id']);
if (!$result) {
$code = 101;
$msg = '解除独家关系失败';
......
......@@ -537,6 +537,9 @@ class Houses extends Basic
$house = new HouseService();
if ($this->params['is_exclusive_type'] == 1) {
if (empty($this->params['exclusive_ids'])) {
return $this->response(101, '参数错误');
}
$data = $this->params;
$data['id'] = $this->params['houses_id'];
unset($data['houses_id']);
......
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