pull/1/head
wanghousheng 10 months ago
parent 34d5087fb2
commit be30483a7d
  1. 5
      app/common/service/server/Order.php

@ -95,7 +95,8 @@ class Order extends BaseService
*/ */
public static function checkCancel($order): bool 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 true;
} }
return false; return false;
@ -144,7 +145,7 @@ class Order extends BaseService
public static function checkPay($order): bool public static function checkPay($order): bool
{ {
$userId = UserService::getCurrentLoginUserId(); $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 true;
} }
return false; return false;

Loading…
Cancel
Save