wupengfei 2 years ago
parent
commit
e0676e51d8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/api/controller/Order.php

+ 1 - 1
application/api/controller/Order.php

@@ -298,7 +298,7 @@ class Order extends Base
         $order = json_decode($order,true);
 
         $inventory = getCollectionInventory($order['c_id']);
-        if ($inventory<1) $this->error('已售罄');
+        if ($inventory < 0) $this->error('已售罄');
         if ($inventory<$order['num']) $this->error('库存不足');
 
       /*  $coll_info = getCollectionInfoHash($order['c_id']);