```
feat(split): 新增分账订单线下结案功能 - 添加 SplitCloseService 类用于处理订单结案逻辑 - 实现订单结案状态检查和标记功能 - 在汇付分账重试逻辑中加入结案状态验证,防止已结案订单继续重试 - 更新分账手动服务,添加结案操作类型 - 扩展钱包结算类,增加结案相关诊断方法 - 修改测试脚本,支持批量标记订单为已结案状态 - 添加数据库升级脚本,增加结案相关字段和菜单权限 ```
这个提交包含在:
@@ -3,6 +3,7 @@
|
||||
namespace addons\shopro_huifu\command;
|
||||
|
||||
use addons\shopro\library\split\Config;
|
||||
use addons\shopro\library\split\SplitCloseService;
|
||||
use addons\shopro\model\split\SplitOrder;
|
||||
use addons\shopro_huifu\library\HuifuSplitService;
|
||||
use think\console\Command;
|
||||
@@ -60,6 +61,11 @@ class SplitRetry extends Command
|
||||
$output->writeln("[OK] 已分账成功: {$sn}");
|
||||
continue;
|
||||
}
|
||||
if ((int) $split['status'] === SplitCloseService::STATUS_CLOSED
|
||||
|| (new SplitCloseService())->isClosed((int) $order['id'])) {
|
||||
$output->writeln("[SKIP] 已线下结案: {$sn}");
|
||||
continue;
|
||||
}
|
||||
$rows[] = $split;
|
||||
}
|
||||
} else {
|
||||
@@ -79,7 +85,13 @@ class SplitRetry extends Command
|
||||
|
||||
$ok = 0;
|
||||
$fail = 0;
|
||||
$closeService = new SplitCloseService();
|
||||
foreach ($rows as $row) {
|
||||
if ((int) $row['status'] === SplitCloseService::STATUS_CLOSED
|
||||
|| $closeService->isClosed((int) $row['order_id'])) {
|
||||
$output->writeln('[SKIP] 已线下结案 order_sn=' . ($row['order_sn'] ?? ''));
|
||||
continue;
|
||||
}
|
||||
$output->writeln('retry split#' . $row['id'] . ' order_sn=' . ($row['order_sn'] ?? ''));
|
||||
$result = $service->retry($row['id']);
|
||||
if ($result) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户