feat: 新增发布额度权益与订单管理功能,优化多端交互细节

这个提交包含在:
2026-10-23 15:42:55 +08:00
父节点 3a2fcf7142
当前提交 691747726b
共有 208 个文件被更改,包括 11880 次插入 和 2262 次删除

查看文件

@@ -138,13 +138,9 @@ class Pay extends V1
if ((string)$order['pay_type'] !== 'wxpay') {
$this->fail('该订单不是微信支付');
}
// 超时未支付自动关闭(24 小时),避免 pending 订单无限堆积
if (!empty($order['createtime']) && (int)$order['createtime'] < time() - 86400) {
Db::name('fc_order')->where('id', (int)$order['id'])->where('status', 'pending')->update([
'status' => 'closed',
'updatetime' => time(),
]);
\app\common\library\CouponService::release((string)$order['order_no']);
// 超时未支付自动关闭,避免已超时的订单继续被支付
if (\app\common\library\OrderClose::isExpired($order)) {
\app\common\library\OrderClose::close($order, 'timeout_auto');
$this->fail('订单已超时关闭,请重新下单');
}