Commit d93bea2b authored by hujun's avatar hujun

商铺库存判断

parent 92f8a798
......@@ -1203,29 +1203,11 @@ class GHouses extends BaseModel
$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 (isset($params['residue_num'])) {
if (empty($params['residue_num']) || empty($params['total'])) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
}
//商铺总数为0下架
if (isset($params['total'])) {
if (empty($params['total'])) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
}
if (!isset($params["status"])) {
if ($house_data["residue_num"] == 0 || $house_data["total"] == 0) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
if (empty($params['residue_num']) || empty($params['total'])) {
$params['status'] = 2;
} else {
$params['status'] = 1;
}
$params['operation_id'] = $params['userId'];
......
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