chore: 同步历史结转脚本与注释中文案统一

这个提交包含在:
chen
2026-09-21 15:13:32 +08:00
父节点 dbd0ac5e02
当前提交 d664c7eb85
共有 4 个文件被更改,包括 23 次插入 和 23 次删除

查看文件

@@ -1,7 +1,7 @@
<?php
/**
* 恒联数通 · 全量历史收益结转至商城余额独立执行脚本
* 恒联数通 · 全量历史收益结转至钱包余额独立执行脚本
*
* 生产环境执行命令:
* 1. 试算预览(不改动数据):
@@ -44,7 +44,7 @@ require_once ROOT_PATH . 'addons/shopro/helper/helper.php';
use addons\shopro\service\partner\WalletMigrationService;
echo "========================================================\n";
echo " 恒联数通 · 历史收益全量结转至商城余额独立脚本\n";
echo " 恒联数通 · 历史收益全量结转至钱包余额独立脚本\n";
echo "========================================================\n";
$args = $argv ?? [];
@@ -65,7 +65,7 @@ if ($preview['total_users'] === 0) {
echo "\n待结转会员抽样(前 10 名):\n";
foreach (array_slice($preview['samples'], 0, 10) as $i => $s) {
$idx = $i + 1;
echo " [{$idx}] 会员ID: {$s['id']} | 手机: {$s['mobile']} | 当前佣金: ¥{$s['current_commission']} -> 商城余额: ¥{$s['current_money']} (预计转后: ¥{$s['target_money']})\n";
echo " [{$idx}] 会员ID: {$s['id']} | 手机: {$s['mobile']} | 当前佣金: ¥{$s['current_commission']} -> 钱包余额: ¥{$s['current_money']} (预计转后: ¥{$s['target_money']})\n";
}
if ($dryRun) {
@@ -74,7 +74,7 @@ if ($dryRun) {
}
if (!$force) {
echo "\n【安全警告】即将对 {$preview['total_users']} 名会员执行结转,将 ¥{$preview['total_commission']} 元转入商城余额!\n";
echo "\n【安全警告】即将对 {$preview['total_users']} 名会员执行结转,将 ¥{$preview['total_commission']} 元转入钱包余额!\n";
echo "若确认执行,请增加参数 --force 或 -f,例如:\n";
echo "php scripts/transfer_all_commission_to_money.php --force\n";
exit(1);
@@ -87,7 +87,7 @@ $res = $service->transferAll(false, function ($current, $total, $userId, $amount
if ($err) {
echo " [{$current}/{$total}] 会员 {$userId} 结转失败: {$err}\n";
} else {
echo " [{$current}/{$total}] 会员 {$userId} 成功结转 ¥" . number_format($amount, 2, '.', '') . " 元至商城余额\n";
echo " [{$current}/{$total}] 会员 {$userId} 成功结转 ¥" . number_format($amount, 2, '.', '') . " 元至钱包余额\n";
}
});