From f6a647e0ff33ed8ca73aa3ce1e1540e7f405d840 Mon Sep 17 00:00:00 2001 From: zhx Date: Fri, 17 Jul 2026 11:44:36 +0800 Subject: [PATCH] databi --- contracts/admin-openapi.json | 4 ++-- databi/src/DatabiApp.test.jsx | 1 + databi/src/social/state.js | 2 +- databi/src/social/views/DataTableView.jsx | 13 +++++++++++++ src/shared/api/generated/schema.d.ts | 4 ++-- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/contracts/admin-openapi.json b/contracts/admin-openapi.json index 2e048cf..3e5dbc3 100644 --- a/contracts/admin-openapi.json +++ b/contracts/admin-openapi.json @@ -4447,7 +4447,7 @@ "name": "section", "schema": { "type": "string", - "enum": ["new_users", "revenue", "retention", "active", "gift", "game"] + "enum": ["new_users", "revenue", "retention", "active", "gift", "game", "lucky_gift_v3"] } }, { @@ -11868,7 +11868,7 @@ "properties": { "key": { "type": "string", - "enum": ["new_users", "revenue", "retention", "active", "gift", "game"] + "enum": ["new_users", "revenue", "retention", "active", "gift", "game", "lucky_gift_v3"] }, "label": { "type": "string" }, "filters": { diff --git a/databi/src/DatabiApp.test.jsx b/databi/src/DatabiApp.test.jsx index bd56eb0..e3292cd 100644 --- a/databi/src/DatabiApp.test.jsx +++ b/databi/src/DatabiApp.test.jsx @@ -768,6 +768,7 @@ test("renders social BI data requirements table with section filters and CSV exp "日活", "礼物", "游戏", + "幸运礼物V3", "留存" ]); expect(screen.getByRole("tab", { name: "充值" })).toHaveAttribute("aria-selected", "true"); diff --git a/databi/src/social/state.js b/databi/src/social/state.js index 3dadb04..639aefa 100644 --- a/databi/src/social/state.js +++ b/databi/src/social/state.js @@ -6,7 +6,7 @@ import { lastDaysRange, thisMonthRange, todayRange } from "../utils/time.js"; export const ALL = "all"; const TABLE_MODES = new Set(["wide", "requirements"]); -const REQUIREMENT_SECTIONS = new Set(["revenue", "new_users", "active", "gift", "game", "retention"]); +const REQUIREMENT_SECTIONS = new Set(["revenue", "new_users", "active", "gift", "game", "lucky_gift_v3", "retention"]); export function createDefaultTableState() { return { diff --git a/databi/src/social/views/DataTableView.jsx b/databi/src/social/views/DataTableView.jsx index 8a88dc0..4522004 100644 --- a/databi/src/social/views/DataTableView.jsx +++ b/databi/src/social/views/DataTableView.jsx @@ -115,6 +115,19 @@ const REQUIREMENT_SECTIONS = [ newUserFilter: true, roleFilter: true }, + { + csvName: "p6-lucky-gift-v3", + fallbackColumns: [ + { key: "draw_count", label: "抽奖次数", type: "count" }, + { key: "turnover_coin", label: "投入金币", type: "coin" }, + { key: "payout_coin", label: "返奖金币", type: "coin" }, + { key: "profit_coin", label: "利润金币", type: "coin" }, + { key: "payout_rate", label: "返奖率", type: "ratio" }, + { key: "profit_rate", label: "利润率", type: "ratio" } + ], + key: "lucky_gift_v3", + label: "幸运礼物V3" + }, { csvName: "p2-retention", fallbackColumns: [ diff --git a/src/shared/api/generated/schema.d.ts b/src/shared/api/generated/schema.d.ts index 867f4d1..4b5d81e 100644 --- a/src/shared/api/generated/schema.d.ts +++ b/src/shared/api/generated/schema.d.ts @@ -5855,7 +5855,7 @@ export interface components { }; SocialBiRequirementsSection: { /** @enum {string} */ - key: "new_users" | "revenue" | "retention" | "active" | "gift" | "game"; + key: "new_users" | "revenue" | "retention" | "active" | "gift" | "game" | "lucky_gift_v3"; label?: string; filters?: components["schemas"]["SocialBiRequirementsFilters"]; columns: components["schemas"]["SocialBiRequirementsColumn"][]; @@ -11364,7 +11364,7 @@ export interface operations { region_id?: number; /** @description 逗号分隔的大区 ID;用于 Social BI 顶栏多选区域。 */ region_ids?: string; - section?: "new_users" | "revenue" | "retention" | "active" | "gift" | "game"; + section?: "new_users" | "revenue" | "retention" | "active" | "gift" | "game" | "lucky_gift_v3"; user_role?: "all" | "host" | "user"; payer_type?: "all" | "paid" | "unpaid"; };