afa 7 months ago
parent
commit
78d3dd2c8b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      application/common/model/ProductOrder.php

+ 1 - 1
application/common/model/ProductOrder.php

@@ -146,7 +146,7 @@ class ProductOrder extends Model
     //获取持有产品数量
     private static function getUserOrderNum(int $uid, int $product_id): int
     {
-        return  self::where('user_id', $uid)->where('product_id', $product_id)->where('status', '<',self::Cancelled)->sum('num');
+        return  self::where('user_id', $uid)->where('product_id', $product_id)->where('status', '=', self::Paid)->sum('num');
     }
 
     // 获取订单状态