优化订单状态逻辑

This commit is contained in:
技术老胡
2024-08-29 15:21:25 +08:00
parent 2447ebd52d
commit 7a7f690e6e
2 changed files with 10 additions and 2 deletions

View File

@@ -218,6 +218,9 @@ class PayController
$path = '../runtime/order.json';
if ($is_user) {
$orders = Order::scope('activeOrder')->field('id,pid,aid,cid')->select();
if (!file_exists($path)) {
file_put_contents($path, '[]');
}
$old_info = file_get_contents($path);
$num = count($orders);
if ($num > 0) {