Commit 70e73d6e authored by hujun's avatar hujun

上下架

parent 7e1204d0
......@@ -1192,6 +1192,13 @@ class GHouses extends BaseModel
$params['shop_area_end'] = $params['shop_area_start'];
}
//剩余商铺为0下架
if (empty($params['residue_num']) || empty($params['total'])) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
//新增或编辑
if (empty($params['id'])) {
$params['upload_id'] = $agent_id;
......@@ -1202,14 +1209,6 @@ class GHouses extends BaseModel
} else {
$house_data = $this->field('id,internal_title,residue_num,total')->where('id', $params['id'])->where('status', '<>', 3)->find();
if (!empty($house_data['id'])) {
//剩余商铺为0下架
if (empty($params['residue_num']) || empty($params['total'])) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
$params['operation_id'] = $params['userId'];
$this->allowField(true)->isUpdate(true)->save($params, [ 'id' => $params['id'] ]);
$house_id = $this->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