dever 3 years ago
parent
commit
9ef4552157
2 changed files with 6 additions and 2 deletions
  1. 3 1
      app/shop/lib/Set.php
  2. 3 1
      app/store/lib/Set.php

+ 3 - 1
app/shop/lib/Set.php

@@ -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) {

+ 3 - 1
app/store/lib/Set.php

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