作者 王智

222

... ... @@ -1121,6 +1121,7 @@ class Index extends Api
$map1 = [];
$map2 = [];
$map3 = [];
$map4['a.stock'] = ['GT', 0];
if (!empty($param['isclass']) || $param['isclass'] != null || $param['isclass'] != '') {
$class_id = Db::name('classa')->where(['class' => $param['isclass']])->value('id');
if (empty($class_id)) {
... ... @@ -1154,6 +1155,7 @@ class Index extends Api
->where($map1)
->where($map2)
->where($map3)
->where($map4)
->page($param['pages'], $param['rows'])
->select();
if (empty($product_id)) {
... ... @@ -1165,7 +1167,6 @@ class Index extends Api
foreach ($product_id as $k => $v) {
$lists[$k] = $this->product_arr($v['id']);
}
$map4['a.id'] = ['eq', 1];
$list = $this->three_arr($lists);
$count = \db('product')
->alias('a')
... ...