fix: 同步手续费归集账户到所有相关服务
- identity-service: seed.ts 添加 S0000000005 和 S0000000006 - authorization-service: 枚举添加 SHARE_RIGHT_POOL 和 FEE_COLLECTION - authorization-service: 初始化固定账户列表添加新账户 - reporting-service: 修复账户类型映射 (PLATFORM_FEE -> FEE_COLLECTION) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
84fb6b8500
commit
898521d236
|
|
@ -84,10 +84,12 @@ export class SystemAccountApplicationService implements OnModuleInit {
|
||||||
*/
|
*/
|
||||||
async initializeFixedAccounts(): Promise<void> {
|
async initializeFixedAccounts(): Promise<void> {
|
||||||
const fixedAccountTypes = [
|
const fixedAccountTypes = [
|
||||||
|
SystemAccountType.HQ_COMMUNITY,
|
||||||
SystemAccountType.COST_ACCOUNT,
|
SystemAccountType.COST_ACCOUNT,
|
||||||
SystemAccountType.OPERATION_ACCOUNT,
|
SystemAccountType.OPERATION_ACCOUNT,
|
||||||
SystemAccountType.HQ_COMMUNITY,
|
|
||||||
SystemAccountType.RWAD_POOL_PENDING,
|
SystemAccountType.RWAD_POOL_PENDING,
|
||||||
|
SystemAccountType.SHARE_RIGHT_POOL,
|
||||||
|
SystemAccountType.FEE_COLLECTION,
|
||||||
]
|
]
|
||||||
|
|
||||||
for (const accountType of fixedAccountTypes) {
|
for (const accountType of fixedAccountTypes) {
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,12 @@ export enum RegionType {
|
||||||
|
|
||||||
// 系统账户类型
|
// 系统账户类型
|
||||||
export enum SystemAccountType {
|
export enum SystemAccountType {
|
||||||
COST_ACCOUNT = 'COST_ACCOUNT', // 成本账户
|
COST_ACCOUNT = 'COST_ACCOUNT', // 成本账户 (S0000000002)
|
||||||
OPERATION_ACCOUNT = 'OPERATION_ACCOUNT', // 运营账户
|
OPERATION_ACCOUNT = 'OPERATION_ACCOUNT', // 运营账户 (S0000000003)
|
||||||
HQ_COMMUNITY = 'HQ_COMMUNITY', // 总部社区账户
|
HQ_COMMUNITY = 'HQ_COMMUNITY', // 总部社区账户 (S0000000001)
|
||||||
RWAD_POOL_PENDING = 'RWAD_POOL_PENDING', // RWAD矿池待注入
|
RWAD_POOL_PENDING = 'RWAD_POOL_PENDING', // RWAD矿池待注入 (S0000000004)
|
||||||
|
SHARE_RIGHT_POOL = 'SHARE_RIGHT_POOL', // 分享权益池 (S0000000005)
|
||||||
|
FEE_COLLECTION = 'FEE_COLLECTION', // 手续费归集账户 (S0000000006)
|
||||||
SYSTEM_PROVINCE = 'SYSTEM_PROVINCE', // 系统省账户(无授权时)
|
SYSTEM_PROVINCE = 'SYSTEM_PROVINCE', // 系统省账户(无授权时)
|
||||||
SYSTEM_CITY = 'SYSTEM_CITY', // 系统市账户(无授权时)
|
SYSTEM_CITY = 'SYSTEM_CITY', // 系统市账户(无授权时)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const prisma = new PrismaClient();
|
||||||
|
|
||||||
// ============================================
|
// ============================================
|
||||||
// 系统账户定义
|
// 系统账户定义
|
||||||
// 系统账户使用特殊序列号格式: S + 00000 + 序号 (S0000000001 ~ S0000000004)
|
// 系统账户使用特殊序列号格式: S + 00000 + 序号 (S0000000001 ~ S0000000006)
|
||||||
// ============================================
|
// ============================================
|
||||||
// ============================================
|
// ============================================
|
||||||
// 管理员账户定义
|
// 管理员账户定义
|
||||||
|
|
@ -51,6 +51,20 @@ const SYSTEM_ACCOUNTS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
userId: BigInt(5),
|
userId: BigInt(5),
|
||||||
|
accountSequence: 'S0000000005', // 分享权益池账户
|
||||||
|
nickname: '分享权益池账户',
|
||||||
|
referralCode: 'SHARE005',
|
||||||
|
status: 'SYSTEM',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
userId: BigInt(6),
|
||||||
|
accountSequence: 'S0000000006', // 手续费归集账户
|
||||||
|
nickname: '手续费归集账户',
|
||||||
|
referralCode: 'FEE00006',
|
||||||
|
status: 'SYSTEM',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
userId: BigInt(7),
|
||||||
accountSequence: 'D25129999999', // 种子用户 (特殊序号,区别于真实用户)
|
accountSequence: 'D25129999999', // 种子用户 (特殊序号,区别于真实用户)
|
||||||
nickname: '种子用户',
|
nickname: '种子用户',
|
||||||
referralCode: 'SEED01',
|
referralCode: 'SEED01',
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,12 @@ export interface SystemAccountReportResponse {
|
||||||
* 固定账户类型映射
|
* 固定账户类型映射
|
||||||
*/
|
*/
|
||||||
const FIXED_ACCOUNT_TYPES: Record<string, string> = {
|
const FIXED_ACCOUNT_TYPES: Record<string, string> = {
|
||||||
|
HQ_COMMUNITY: 'hqCommunity',
|
||||||
COST_ACCOUNT: 'costAccount',
|
COST_ACCOUNT: 'costAccount',
|
||||||
OPERATION_ACCOUNT: 'operationAccount',
|
OPERATION_ACCOUNT: 'operationAccount',
|
||||||
HQ_COMMUNITY: 'hqCommunity',
|
|
||||||
RWAD_POOL_PENDING: 'rwadPoolPending',
|
RWAD_POOL_PENDING: 'rwadPoolPending',
|
||||||
PLATFORM_FEE: 'platformFee',
|
SHARE_RIGHT_POOL: 'shareRightPool',
|
||||||
|
FEE_COLLECTION: 'feeCollection',
|
||||||
};
|
};
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue