Commit 704a682c authored by hujun's avatar hujun

暂存

parent 84f09094
...@@ -125,16 +125,22 @@ class Houses extends Basic ...@@ -125,16 +125,22 @@ class Houses extends Basic
if ($this->request->isPost()) { if ($this->request->isPost()) {
$house = new HouseService(); $house = new HouseService();
$house_id = $house->addHouse($this->params, $this->userId); $house_data = $house->addHouse($this->params, $this->userId);
if ($house_data == 'successful') {
if (!empty($this->params['sublet_id']) && $this->params['source'] == 'transfer_list') { if (!empty($this->params['sublet_id']) && $this->params['source'] == 'transfer_list') {
$m_sublet = new SubletModel(); $m_sublet = new SubletModel();
$sublet_data['house_id'] = $house_id; $sublet_data['house_id'] = $house_data['house_id'];
$sublet_data['status'] = 2; $sublet_data['status'] = 2;
$sublet_data['agents_id'] = $this->userId; $sublet_data['agents_id'] = $this->userId;
$m_sublet->editData($sublet_data, $this->params['sublet_id']); $m_sublet->editData($sublet_data, $this->params['sublet_id']);
} }
$return = $this->response($result['code'], $result['msg'], [ 'id'=>$house_data['house_id'] ]);
} else {
$return = $this->response(101, '新增或编辑错误');
}
//编辑商铺 //编辑商铺
} elseif ($this->params['id']) { } elseif ($this->params['id']) {
if ($this->request->isAjax()) { if ($this->request->isAjax()) {
......
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