From dafc06793ef11d988dce035fb6a9b00a2a15db1e Mon Sep 17 00:00:00 2001 From: hjhan Date: Tue, 11 Aug 2026 17:09:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20AddClientCashInCashOut=20=E5=8A=A0?= =?UTF-8?q?=20virtual=20+=20=E4=BF=AE=E6=AD=A3=E6=9E=B6=E6=9E=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AddClientCashInCashOut 从 public 改为 public virtual, 使测试可 override, 消除 RecordMarginCashFlow 迁出的阻塞。 AddClientCash 已是 virtual, 这是统一两者。 修正 ARCHITECTURE.md: 保证金有余额和返息(非'没有计息基数')。 验证: 编译0错误, 全量513测试7失败(基线一致)。 --- YLErpDAL/Modules/SwapModule/ARCHITECTURE.md | 2 +- YLErpDAL/Modules/SwapModule/SwapTradeBaseService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/ARCHITECTURE.md b/YLErpDAL/Modules/SwapModule/ARCHITECTURE.md index 4161dfb8..43f2b474 100644 --- a/YLErpDAL/Modules/SwapModule/ARCHITECTURE.md +++ b/YLErpDAL/Modules/SwapModule/ARCHITECTURE.md @@ -36,7 +36,7 @@ TRS 的三类业务各自独立,通过 SwapInterest 纯函数库共享计息 **命名规则(防歧义)**: - `Funding` = 融资成本(不用 Interest,避免和通用"利息"混) - `Return` = 标的总回报(不用 Float,避免和 FR007 浮动利率混) -- `Margin` = 保证金(不用 Notional/Principal,保证金没有"计息基数"概念) +- `Margin` = 保证金(客户交的抵押品,有余额和返息,不走融资腿的计息基数框架) - `FloatRate` = FR007 浮动利率(唯一含义) ## 目录结构 diff --git a/YLErpDAL/Modules/SwapModule/SwapTradeBaseService.cs b/YLErpDAL/Modules/SwapModule/SwapTradeBaseService.cs index 859824f8..529374a7 100644 --- a/YLErpDAL/Modules/SwapModule/SwapTradeBaseService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapTradeBaseService.cs @@ -322,7 +322,7 @@ namespace YLErp.Modules.SwapModule #endregion - public int AddClientCashInCashOut(OtcTradeBase td, double amount, string action, DateTime valueDate) + public virtual int AddClientCashInCashOut(OtcTradeBase td, double amount, string action, DateTime valueDate) { var cl = DataCacheProvider.GetClientDataSource().GetData(td.ClientId);