afa 7 月之前
父节点
当前提交
78d3dd2c8b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
     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');
     }
     }
 
 
     // 获取订单状态
     // 获取订单状态