场景限定
1. Core Functionality:
Implement a service that can process financial transactions and update account balances in real-time.
Each transaction should include a unique transaction ID, source account number, destination account number, amount, and timestamp.
The service should handle concurrent transactions and update balances accordingly.
根据这段需求描述,本模块聚焦于底层的账户余额处理:根据交易数据实时进行账户余额计算。
其他业务场景如客户开卡、挂失、补卡等归属到其他领域
账户余额计算服务,不直接对外。因此可以弱化身份认证、权限认证等功能
账户余额计算为底层服务,它前面应该有直接对外的前置服务(如手续费扣减)、后面也应该有直接对外的后置服务(如短息通知等)。因此可以弱化前置服务与交易服务之间的中间人攻击等安全场景
与账户交易直接关联的业务场景如存钱、取钱、转账等由另外模块进行预处理之后,然后调用该模块完成账户余额变更。
存钱:【source account number】为null
取钱:【destination account number】为null
转账:【source account number】为转出账户,【destination account number】为转入账户
关于amount,本模块也限定为单一币种,多币种之间的账户交易、amount统一换算成币种最小面值的10000倍也由另外模块进行预处理。
点击空白处退出提示












评论