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:
@@ -27,12 +27,15 @@ export async function runWalletDrawSettlement(params: {
|
||||
playerToken: string;
|
||||
drawNo: string;
|
||||
betNumber?: string;
|
||||
/** 公布头奖号码;默认与 betNumber 相同(必中)。传不同值可测玩家输单。 */
|
||||
publishWinNumber?: string;
|
||||
betAmount?: number;
|
||||
balanceBefore?: number;
|
||||
expectWalletIncrease?: boolean;
|
||||
}): Promise<DrawSettlementResult> {
|
||||
const drawNo = params.drawNo;
|
||||
const betNumber = params.betNumber ?? '1234';
|
||||
const publishWinNumber = params.publishWinNumber ?? betNumber;
|
||||
const betAmount = params.betAmount ?? 10_000;
|
||||
|
||||
const player = await pwPlayerCtx(params.playerToken);
|
||||
@@ -63,7 +66,7 @@ export async function runWalletDrawSettlement(params: {
|
||||
const drawId = await resolveDrawId(admin, drawNo);
|
||||
|
||||
const store = await admin.post(`/api/v1/admin/draws/${drawId}/result-batches`, {
|
||||
data: { items: buildAllResultItems(betNumber) },
|
||||
data: { items: buildAllResultItems(publishWinNumber) },
|
||||
});
|
||||
expect(store.ok(), `store batch status=${store.status()}`).toBeTruthy();
|
||||
const storeBody = (await store.json()) as any;
|
||||
|
||||
Reference in New Issue
Block a user