@@ -71,7 +71,9 @@ class Set
Dever::db('shop/goods_sku')->update(array('where_id' => $sku_info['id'], 'state' => 2));
}
unset($w['sku_id']);
- $total = Dever::db('shop/goods_sku')->total($w);
+ $t = $w;
+ $t['state'] = 1;
+ $total = Dever::db('shop/goods_sku')->total($t);
if ($total <= 0) {
$info = Dever::db('shop/goods')->one($w);
if ($info) {
@@ -72,7 +72,9 @@ class Set
Dever::db('store/goods_sku')->update(array('where_id' => $sku_info['id'], 'state' => 2));
- $total = Dever::db('store/goods_sku')->total($w);
+ $total = Dever::db('store/goods_sku')->total($t);
$info = Dever::db('store/goods')->one($w);