feat: batch update - gift card breakdown spec, backend APIs, miniprogram pages, ETL finance recharge, docs & migrations

This commit is contained in:
Neo
2026-03-20 01:43:48 +08:00
parent 075caf067f
commit 79f9a0e1da
437 changed files with 118603 additions and 976 deletions

View File

@@ -0,0 +1,37 @@
"""
配置路由CONFIG-1 技能类型。
前缀 /api/xcx/config由 main.py 注册。
"""
from __future__ import annotations
import logging
from fastapi import APIRouter, Depends
from app.auth.dependencies import CurrentUser
from app.middleware.permission import require_approved
from app.schemas.xcx_config import SkillTypeItem
from app.services import fdw_queries
logger = logging.getLogger(__name__)
router = APIRouter(prefix="/api/xcx/config", tags=["xcx-config"])
@router.get("/skill-types", response_model=list[SkillTypeItem])
async def get_skill_types(
user: CurrentUser = Depends(require_approved()),
):
"""技能类型配置CONFIG-1。查询失败降级返回空数组。"""
try:
from app.database import get_connection
conn = get_connection()
try:
return fdw_queries.get_skill_types(conn, user.site_id)
finally:
conn.close()
except Exception:
logger.warning("CONFIG-1 技能类型查询失败,降级为空数组", exc_info=True)
return []