fix(export): 修复Excel导出zipstream库PHP8兼容性与临时文件安全流式输出

这个提交包含在:
chen
2026-09-21 15:19:30 +08:00
父节点 d664c7eb85
当前提交 452c2f22a2
共有 15 个文件被更改,包括 132 次插入 和 100 次删除

查看文件

@@ -1,5 +1,5 @@
/**
* 累计收益统计口径与用户商城余额统一专项测试
* 累计收益统计口径与用户钱包余额统一专项测试
* 覆盖范围:
* 1. IdentityService attachAgent / attachProfile 累计收益口径统一与兜底
* 2. User profile 接口统一映射 balance = money 及累计收益补偿
@@ -7,9 +7,9 @@
* 4. WalletLog 收益统计扣除互转重复项,真实反映收益与扣减(防误导)
* 5. uniapp 视图端全面对齐:
* - rewards.vue 累计已结算收益卡片与本月统计
* - account-info.vue 累计收益与商城余额
* - commission.vue 累计总收益、周期收益与商城可用余额
* - withdraw.vue 商城可用余额提示与收益入账说明
* - account-info.vue 累计收益与钱包余额
* - commission.vue 累计总收益、周期收益与钱包可用余额
* - withdraw.vue 钱包可用余额提示与收益入账说明
* 6. 算法逻辑模拟:无重复统计、真实收益判定与资金守恒
*/
@@ -30,7 +30,7 @@ function assert(condition, message) {
}
console.log('========================================================');
console.log(' 累计收益统计口径与用户商城余额统一专项测试');
console.log(' 累计收益统计口径与用户钱包余额统一专项测试');
console.log('========================================================\n');
// ----------------------------------------------------
@@ -56,7 +56,7 @@ const userControllerPath = path.resolve(__dirname, '../../addons/shopro/controll
assert(fs.existsSync(userControllerPath), 'addons/shopro/controller/user/User.php 文件存在');
if (fs.existsSync(userControllerPath)) {
const content = fs.readFileSync(userControllerPath, 'utf-8');
assert(content.includes("$data['balance'] = $user->money"), 'profile 明确将 balance 映射为商城余额 money');
assert(content.includes("$data['balance'] = $user->money"), 'profile 明确将 balance 映射为钱包余额 money');
assert(content.includes('$userRewardCash > 0'), '非分销商身份但有分成收益时,执行累计收益兜底统计');
}
@@ -108,7 +108,7 @@ assert(fs.existsSync(accountInfoVuePath), 'account-info.vue 文件存在');
if (fs.existsSync(accountInfoVuePath)) {
const content = fs.readFileSync(accountInfoVuePath, 'utf-8');
assert(content.includes("agentInfo?.total_income || userInfo?.total_income"), '累计收益具备 agentInfo 与 userInfo 双重对齐兜底');
assert(content.includes("userInfo?.money || '0.00'"), '商城余额绑定 userInfo.money');
assert(content.includes("userInfo?.money || '0.00'"), '钱包余额绑定 userInfo.money');
}
// 5.3 commission.vue
@@ -125,8 +125,8 @@ const withdrawVuePath = path.resolve(__dirname, '../../uniapp/pages/pay/withdraw
assert(fs.existsSync(withdrawVuePath), 'withdraw.vue 文件存在');
if (fs.existsSync(withdrawVuePath)) {
const content = fs.readFileSync(withdrawVuePath, 'utf-8');
assert(content.includes('商城可用余额:¥{{ userInfo.money'), 'withdraw.vue 同步展示商城可用余额');
assert(content.includes('收益分成已全额直接入账商城余额'), 'withdraw.vue 显著提示收益已全额直接入账商城余额');
assert(content.includes('钱包可用余额:¥{{ userInfo.money'), 'withdraw.vue 同步展示钱包可用余额');
assert(content.includes('收益分成已全额直接入账钱包余额'), 'withdraw.vue 显著提示收益已全额直接入账钱包余额');
}
// ----------------------------------------------------