|
@@ -93,10 +93,7 @@ class Goods_set
|
|
|
foreach ($goods as $k => $v) {
|
|
|
$type = 1;
|
|
|
$type_id = $k;
|
|
|
-
|
|
|
- if ($v['total'] <= 0) {
|
|
|
- continue;
|
|
|
- }
|
|
|
+
|
|
|
$w = array();
|
|
|
$w['type'] = $type;
|
|
|
$w['type_id'] = $type_id;
|
|
@@ -107,8 +104,7 @@ class Goods_set
|
|
|
Dever::db('card/info_goods')->update(array('where_id' => $info['id'], 'state' => 2));
|
|
|
}
|
|
|
} else {
|
|
|
- $w['num'] = $v['total'];
|
|
|
-
|
|
|
+
|
|
|
if (!$info) {
|
|
|
Dever::db('card/info_goods')->insert($w);
|
|
|
} else {
|