fix(business-loop): complete arbitration balance refund, withdrawal rejection compensation, admin activity takedown, and companion violation alerts
这个提交包含在:
@@ -101,6 +101,35 @@ describe('ClientFeatures (TDD 测试套件: 用户端功能闭环)', () => {
|
||||
expect(content).toContain('arbitrations');
|
||||
});
|
||||
|
||||
it('仲裁全额退款用户时,必须原子将订单金额退还买家钱包余额并记录入账流水', () => {
|
||||
const repoPath = path.join(serverSrcDir, 'db', 'repository.ts');
|
||||
const content = fs.readFileSync(repoPath, 'utf-8');
|
||||
|
||||
expect(content).toContain('UPDATE users SET balance = balance + ?');
|
||||
expect(content).toContain('仲裁退款');
|
||||
expect(content).toContain('finance_records');
|
||||
});
|
||||
|
||||
it('提现申请被管理员驳回时,必须原子将预扣佣金原路退还用户佣金账户并记录冲正流水', () => {
|
||||
const repoPath = path.join(serverSrcDir, 'db', 'repository.ts');
|
||||
const content = fs.readFileSync(repoPath, 'utf-8');
|
||||
|
||||
expect(content).toContain('UPDATE users SET commission = commission + ?');
|
||||
expect(content).toContain('提现驳回退还');
|
||||
});
|
||||
|
||||
it('后端 repository 与管理后台必须支持平台管理员强制违规下架组局并原路退款搭子', () => {
|
||||
const repoPath = path.join(serverSrcDir, 'db', 'repository.ts');
|
||||
const content = fs.readFileSync(repoPath, 'utf-8');
|
||||
expect(content).toContain('cancelActivity');
|
||||
expect(content).toContain('isAdmin');
|
||||
|
||||
const adminActListPath = path.join(rootDir, 'admin', 'arco-design-pro-vite', 'src', 'views', 'activity', 'list', 'index.vue');
|
||||
const adminActContent = fs.readFileSync(adminActListPath, 'utf-8');
|
||||
expect(adminActContent).toContain('handleCancelActivity');
|
||||
expect(adminActContent).toContain('违规下架');
|
||||
});
|
||||
|
||||
it('后端 index.ts POST /api/orders/:id/refund 必须接收理由与说明并执行风控拦截', () => {
|
||||
const indexPath = path.join(serverSrcDir, 'index.ts');
|
||||
const content = fs.readFileSync(indexPath, 'utf-8');
|
||||
|
||||
在新工单中引用
屏蔽一个用户