|
|
@@ -10,7 +10,7 @@ from app.core.logger import get_logger
|
|
|
from app.core.database_loader import get_db_connection
|
|
|
from app.utils.scheme import (
|
|
|
CardDetailResponse, CardListDetailResponse, CardType, SortBy,
|
|
|
- SortOrder, CardListResponseWrapper, CardListWithTotal
|
|
|
+ SortOrder, CardListResponseWrapper, CardListWithTotal, ReviewUpdate
|
|
|
)
|
|
|
from app.crud import crud_card
|
|
|
|
|
|
@@ -220,7 +220,7 @@ def delete_card(id: int, db_conn: PooledMySQLConnection = db_dependency):
|
|
|
@router.put("/review_state/{id}", status_code=200, summary="修改卡牌的审核状态")
|
|
|
def update_review_state(
|
|
|
id: int,
|
|
|
- review_state: int = Query(..., ge=1, le=4, description="审核状态 (1待复检, 2已复检, 3审核未通过, 4审核通过)"),
|
|
|
+ data: ReviewUpdate,
|
|
|
db_conn: PooledMySQLConnection = db_dependency
|
|
|
):
|
|
|
"""
|
|
|
@@ -232,6 +232,7 @@ def update_review_state(
|
|
|
- 3: 审核未通过
|
|
|
- 4: 审核通过
|
|
|
"""
|
|
|
+ review_state = data.review_state
|
|
|
try:
|
|
|
with db_conn.cursor() as cursor:
|
|
|
# 更新指定 card_id 的 review_state 字段
|