feat(admin,api,player): 返水流程优化、账单详情与数据库重置
优化返水预览/确认/作废,新增玩家账变详情与后台一键重置为 seed 数据,并修复 dev 启动时 3000 端口占用。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -259,6 +259,28 @@ export class WalletService {
|
||||
return this.prisma.$transaction(run);
|
||||
}
|
||||
|
||||
async getTransactionDetail(userId: bigint, transactionId: string) {
|
||||
const tx = await this.prisma.walletTransaction.findFirst({
|
||||
where: { userId, transactionId },
|
||||
});
|
||||
if (!tx) return null;
|
||||
|
||||
return {
|
||||
transactionId: tx.transactionId,
|
||||
transactionType: tx.transactionType,
|
||||
amount: tx.amount.toString(),
|
||||
balanceBefore: tx.balanceBefore.toString(),
|
||||
balanceAfter: tx.balanceAfter.toString(),
|
||||
frozenBefore: tx.frozenBefore.toString(),
|
||||
frozenAfter: tx.frozenAfter.toString(),
|
||||
referenceType: tx.referenceType,
|
||||
referenceId: tx.referenceId,
|
||||
remark: tx.remark,
|
||||
createdAt: tx.createdAt.toISOString(),
|
||||
betNo: tx.referenceType === 'BET' ? tx.referenceId : null,
|
||||
};
|
||||
}
|
||||
|
||||
async getTransactions(userId: bigint, page = 1, pageSize = 20) {
|
||||
const skip = (page - 1) * pageSize;
|
||||
const [items, total] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user