|
@@ -99,7 +99,10 @@ class Manage
|
|
|
public function drop_api($id)
|
|
|
{
|
|
|
$info = Dever::db('code/info')->one($id);
|
|
|
- Dever::setInput('set_product_id', $info['product_id']);
|
|
|
+ if ($info['product_id'] > 0) {
|
|
|
+ Dever::setInput('set_product_id', $info['product_id']);
|
|
|
+ }
|
|
|
+
|
|
|
$update['where_id'] = $id;
|
|
|
$update['type'] = 4;
|
|
|
Dever::db('code/info')->update($update);
|
|
@@ -109,7 +112,9 @@ class Manage
|
|
|
public function recovery_api($id)
|
|
|
{
|
|
|
$info = Dever::db('code/info')->one($id);
|
|
|
- Dever::setInput('set_product_id', $info['product_id']);
|
|
|
+ if ($info['product_id'] > 0) {
|
|
|
+ Dever::setInput('set_product_id', $info['product_id']);
|
|
|
+ }
|
|
|
$update['where_id'] = $id;
|
|
|
$update['type'] = 1;
|
|
|
Dever::db('code/info')->update($update);
|