fix: 提现管理店铺余额保留最近5天 #349

Merged
yutu merged 1 commits from feature/92451-withdrawal-balance-retention into main 2026-10-16 19:00:50 +08:00
Collaborator

做了什么

店铺余额快照按导入日期保留最近 5 个自然日:

  • 页面优先显示这 5 天内最新导入的余额日期;
  • 当天还没有导入新数据时,继续沿用最近一次可用余额,不再直接显示待同步;
  • 超过 5 天的快照在每次导入成功时清理;页面查询也按相同窗口过滤,避免未清理时显示旧数据;
  • 提现金额导入、导出和达标判断统一绑定当前页面实际使用的余额日期。

列头仍沿用页面当天日期,实际余额日期保留在列头悬停提示和导出说明中。

修改文件

  • modules/EcommerceFinance/Repositories/JushuitanShopBalanceRepository.php
  • modules/EcommerceFinance/Services/JushuitanShopBalanceImporter.php
  • pp/Console/Commands/ImportJushuitanShopBalances.php
  • pp/Business/WithdrawalManagementReport.php
  • pp/Business/WithdrawalManagementSpreadsheet.php
  • 相关单元测试和功能测试

验证

  • JushuitanShopBalanceRepositoryTest + WithdrawalManagementImportExportTest:24 tests / 135 assertions 通过
  • ManagementCrudTest:14 tests / 480 assertions 通过
  • 测试环境强制使用内存 SQLite,未访问共享系统数据库或业务镜像
  • 本地语法检查通过

影响范围

涉及金额显示和提现金额日期绑定;无权限变更,无数据库结构迁移,无配置文件变更。

## 做了什么 店铺余额快照按**导入日期**保留最近 5 个自然日: - 页面优先显示这 5 天内最新导入的余额日期; - 当天还没有导入新数据时,继续沿用最近一次可用余额,不再直接显示待同步; - 超过 5 天的快照在每次导入成功时清理;页面查询也按相同窗口过滤,避免未清理时显示旧数据; - 提现金额导入、导出和达标判断统一绑定当前页面实际使用的余额日期。 列头仍沿用页面当天日期,实际余额日期保留在列头悬停提示和导出说明中。 ## 修改文件 - modules/EcommerceFinance/Repositories/JushuitanShopBalanceRepository.php - modules/EcommerceFinance/Services/JushuitanShopBalanceImporter.php - pp/Console/Commands/ImportJushuitanShopBalances.php - pp/Business/WithdrawalManagementReport.php - pp/Business/WithdrawalManagementSpreadsheet.php - 相关单元测试和功能测试 ## 验证 - JushuitanShopBalanceRepositoryTest + WithdrawalManagementImportExportTest:24 tests / 135 assertions 通过 - ManagementCrudTest:14 tests / 480 assertions 通过 - 测试环境强制使用内存 SQLite,未访问共享系统数据库或业务镜像 - 本地语法检查通过 ## 影响范围 涉及金额显示和提现金额日期绑定;无权限变更,无数据库结构迁移,无配置文件变更。
yutu added 1 commit 2026-10-16 19:00:38 +08:00
yutu merged commit 37c11f4e8e into main 2026-10-16 19:00:50 +08:00
yutu deleted branch feature/92451-withdrawal-balance-retention 2026-10-16 19:00:50 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#349
No description provided.