|
|
@@ -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');
|
|
|
}
|
|
|
|
|
|
// 获取订单状态
|