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

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

查看文件

@@ -3,6 +3,7 @@
namespace app\admin\command;
use app\common\library\CouponService;
use app\common\library\OrderClose;
use think\console\Command;
use think\console\Input;
use think\console\Output;
@@ -40,27 +41,20 @@ class FcSettle extends Command
]);
$output->writeln('==> 佣金结算:' . $settled . ' 笔');
/* 2. 关闭超时未支付订单(24 小时) */
/* 2. 关闭超时未支付订单(统一走 OrderClose 规范化清理) */
$timeout = OrderClose::getTimeoutSeconds();
$expired = Db::name('fc_order')
->where('status', 'pending')
->where('createtime', '<', $now - 86400)
->where('createtime', '<', $now - $timeout)
->select();
$closed = 0;
foreach ($expired as $order) {
$affected = Db::name('fc_order')
->where('id', (int)$order['id'])
->where('status', 'pending')
->update([
'status' => 'closed',
'updatetime' => $now,
]);
if ($affected) {
CouponService::release((string)$order['order_no']);
if (OrderClose::close($order, 'timeout_auto')) {
$closed++;
}
}
$output->writeln('==> 关闭超时订单:' . $closed . ' 笔');
$output->writeln('==> 关闭超时订单:' . $closed . ' 笔(超时阈值:' . round($timeout / 60) . ' 分钟)');
/* 3. 同步转账中的提现单(最多 20 笔) */
$synced = 0;