Commit d86c91cf authored by hujun's avatar hujun

取消注释

parent a17a3d52
...@@ -40,7 +40,7 @@ class Houses extends Basic ...@@ -40,7 +40,7 @@ class Houses extends Basic
} }
$house = new GHouses(); $house = new GHouses();
// $house->startTrans(); $house->startTrans();
//新增或编辑 //新增或编辑
if ($params['id'] == '') { if ($params['id'] == '') {
...@@ -57,27 +57,27 @@ class Houses extends Basic ...@@ -57,27 +57,27 @@ class Houses extends Basic
//新增或编辑根据id //新增或编辑根据id
if ($params['id'] == '') { if ($params['id'] == '') {
$ext_id = $house_ext->allowField(true)->save($params); $house_ext->allowField(true)->save($params);
} else { } else {
$house_ext_data = $house_ext->field('id')->where('house_id',$params['id'])->find(); $house_ext_data = $house_ext->field('id')->where('house_id',$params['id'])->find();
$ext_id = $house_ext->allowField(true)->isUpdate(true)->save($params, ['id' => $house_ext_data['id']]); $house_ext->allowField(true)->isUpdate(true)->save($params, ['id' => $house_ext_data['id']]);
} }
/***保存图片 hujun 2018.1.19 start***/ /***保存图片 hujun 2018.1.19 start***/
$house_img = new GHousesImgs(); $house_img = new GHousesImgs();
if ($params['id'] == '') { if ($params['id'] == '') {
$img_ = $house_img->add($params, $house_id); $house_img->add($params, $house_id);
} else { } else {
$house_img->edit($params, $house_id); $house_img->edit($params, $house_id);
} }
/***保存图片 hujun 2018.1.19 end***/ /***保存图片 hujun 2018.1.19 end***/
// if ($house->id && count($img_) > 0 && $ext_id) { if ($house->id) {
// $house->commit(); $house->commit();
// $return = $this->response($result['code'], $result['msg']); $return = $this->response($result['code'], $result['msg']);
// } else { } else {
// $house->rollback(); $house->rollback();
$return = $this->response(200, $result['msg']); $return = $this->response(101, $result['msg']);
// } }
} elseif ($this->request->param('id')){ } elseif ($this->request->param('id')){
//获取商铺详情 //获取商铺详情
......
*
!.gitignore
\ No newline at end of file
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