|
|
|
@ -95,7 +95,8 @@ class Order extends BaseService |
|
|
|
|
*/ |
|
|
|
|
public static function checkCancel($order): bool |
|
|
|
|
{ |
|
|
|
|
if (!empty($order['order_status']) && $order['order_status'] != ServerEnum::COMPLETED || $order['order_status'] != ServerEnum::CANCELLED) { |
|
|
|
|
|
|
|
|
|
if (!empty($order['order_status']) && !in_array($order['order_status'], [ServerEnum::COMPLETED, ServerEnum::CANCELLED])) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
@ -144,7 +145,7 @@ class Order extends BaseService |
|
|
|
|
public static function checkPay($order): bool |
|
|
|
|
{ |
|
|
|
|
$userId = UserService::getCurrentLoginUserId(); |
|
|
|
|
if (!empty($order) && $order['pay_status'] == PayStatus::PENDING && $order['user_id'] == $userId) { |
|
|
|
|
if (!empty($order) && $order['pay_status'] == PayStatus::PENDING && $order['user_id'] == $userId && $order['order_status'] == ServerEnum::APPLYPAY) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|