正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -1121,6 +1121,7 @@ class Index extends Api | @@ -1121,6 +1121,7 @@ class Index extends Api | ||
1121 | $map1 = []; | 1121 | $map1 = []; |
1122 | $map2 = []; | 1122 | $map2 = []; |
1123 | $map3 = []; | 1123 | $map3 = []; |
1124 | + $map4['a.stock'] = ['GT', 0]; | ||
1124 | if (!empty($param['isclass']) || $param['isclass'] != null || $param['isclass'] != '') { | 1125 | if (!empty($param['isclass']) || $param['isclass'] != null || $param['isclass'] != '') { |
1125 | $class_id = Db::name('classa')->where(['class' => $param['isclass']])->value('id'); | 1126 | $class_id = Db::name('classa')->where(['class' => $param['isclass']])->value('id'); |
1126 | if (empty($class_id)) { | 1127 | if (empty($class_id)) { |
@@ -1154,6 +1155,7 @@ class Index extends Api | @@ -1154,6 +1155,7 @@ class Index extends Api | ||
1154 | ->where($map1) | 1155 | ->where($map1) |
1155 | ->where($map2) | 1156 | ->where($map2) |
1156 | ->where($map3) | 1157 | ->where($map3) |
1158 | + ->where($map4) | ||
1157 | ->page($param['pages'], $param['rows']) | 1159 | ->page($param['pages'], $param['rows']) |
1158 | ->select(); | 1160 | ->select(); |
1159 | if (empty($product_id)) { | 1161 | if (empty($product_id)) { |
@@ -1165,7 +1167,6 @@ class Index extends Api | @@ -1165,7 +1167,6 @@ class Index extends Api | ||
1165 | foreach ($product_id as $k => $v) { | 1167 | foreach ($product_id as $k => $v) { |
1166 | $lists[$k] = $this->product_arr($v['id']); | 1168 | $lists[$k] = $this->product_arr($v['id']); |
1167 | } | 1169 | } |
1168 | - $map4['a.id'] = ['eq', 1]; | ||
1169 | $list = $this->three_arr($lists); | 1170 | $list = $this->three_arr($lists); |
1170 | $count = \db('product') | 1171 | $count = \db('product') |
1171 | ->alias('a') | 1172 | ->alias('a') |
-
请 注册 或 登录 后发表评论