feat: 新增发布额度权益与订单管理功能,优化多端交互细节
这个提交包含在:
@@ -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('订单已超时关闭,请重新下单');
|
||||
}
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户