fix: 部分收付累计释额并扩展结算 E2E 与 CI
账期收付改为按累计已付同步 credit_ledger,修复多笔 partial_paid 与坏账核销重复释额;新增 API E2E(占成、权限、部分收付/坏账)与 GitHub Actions e2e-api job。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
adminCtxOf,
|
||||
fetchOpenDrawNo,
|
||||
playerLoginViaBypass,
|
||||
openSettlementPeriod,
|
||||
setupCreditPlayer,
|
||||
} from './_helper';
|
||||
import { runWalletDrawSettlement } from './helpers/draw-settlement';
|
||||
@@ -20,21 +21,7 @@ test('信用下注结算后关账 → 生成玩家 settlement_bill', async () =>
|
||||
|
||||
const adminSession = await adminLoginViaBypass();
|
||||
const admin = await adminCtxOf(adminSession.accessToken);
|
||||
|
||||
const start = new Date(Date.now() - 3600_000).toISOString().replace('T', ' ').slice(0, 19);
|
||||
const end = new Date(Date.now() + 3600_000).toISOString().replace('T', ' ').slice(0, 19);
|
||||
|
||||
const open = await admin.post('/api/v1/admin/settlement-periods', {
|
||||
data: {
|
||||
admin_site_id: credit.admin_site_id,
|
||||
period_start: start,
|
||||
period_end: end,
|
||||
},
|
||||
});
|
||||
expect(open.ok(), `open period status=${open.status()}`).toBeTruthy();
|
||||
const openBody = (await open.json()) as any;
|
||||
expect(openBody.code).toBe(0);
|
||||
const periodId = openBody.data.id;
|
||||
const periodId = await openSettlementPeriod(admin, credit.admin_site_id, credit.site_code);
|
||||
|
||||
const playerSession = await playerLoginViaBypass({
|
||||
site_code: credit.site_code,
|
||||
|
||||
Reference in New Issue
Block a user