feat(抽奖): 后台"抽奖记录"页 — 中奖/发放流水列表

- draws-panel(新): ProTable 列出中奖人/奖品/发放状态/发放结果,按 是否中奖/发放状态/用户ID 过滤
- activity-detail: 新增"抽奖记录"Tab
- service+types: getLotteryDrawList + AdminLotteryDraw
- i18n: draw.* zh/en

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-16 23:41:47 -07:00
parent 6e1e424eb2
commit ccb81d62a3
6 changed files with 306 additions and 2 deletions
+18
View File
@@ -373,3 +373,21 @@ export async function markPaidLotteryClaim(
}
);
}
/**
* 抽奖记录(发放流水)
* GET /v1/admin/lottery/draws
*/
export async function getLotteryDrawList(
params: API.GetLotteryDrawListParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.ListLotteryDrawsResponse }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/lottery/draws`,
{
method: "GET",
params: { ...params },
...(options || {}),
}
);
}
+46
View File
@@ -3496,4 +3496,50 @@ declare namespace API {
delivery_ref?: string;
paid_at?: number;
};
// ---- Stage 3 抽奖记录(发放流水)-----------------------------------------
type GetLotteryDrawListParams = {
activity_id?: number;
user_id?: number;
prize_type?: LotteryPrizeType;
dispatch_state?: string;
win?: "1" | "0";
from?: number;
to?: number;
page: number;
size: number;
};
type AdminLotteryDrawUser = {
id: number;
email?: string;
};
type AdminLotteryDrawPrize = {
slot: number;
type: LotteryPrizeType;
name: string;
config: Record<string, any>;
};
type AdminLotteryDraw = {
draw_id: number;
activity_id: number;
user: AdminLotteryDrawUser;
is_win: boolean;
prize?: AdminLotteryDrawPrize;
dispatch_state: string;
dispatch_error?: string;
grant_amount?: number;
grant_message?: string;
drawn_at: number;
dispatched_at?: number;
created_at: number;
};
type ListLotteryDrawsResponse = {
total: number;
list: AdminLotteryDraw[];
};
}