|
@@ -43,7 +43,7 @@ from app.schemas.payment_confirmation import VasPaymentConfirmationCreate, VasPa
|
|
|
from app.schemas.payment_qr import VasPaymentQrCreate, VasPaymentQrSetEnableIn, VasPaymentQrOut
|
|
from app.schemas.payment_qr import VasPaymentQrCreate, VasPaymentQrSetEnableIn, VasPaymentQrOut
|
|
|
from app.schemas.payment_provider import VasPaymentProviderCreate, VasPaymentProviderUpdate, VasPaymentProviderOut
|
|
from app.schemas.payment_provider import VasPaymentProviderCreate, VasPaymentProviderUpdate, VasPaymentProviderOut
|
|
|
from app.schemas.webhook import SMSHelperWebhookPayload
|
|
from app.schemas.webhook import SMSHelperWebhookPayload
|
|
|
-from app.schemas.vas_task import VasTaskCreate, VasTaskUpdate, VasTaskOut
|
|
|
|
|
|
|
+from app.schemas.vas_task import VasTaskCreate, VasTaskUpdate, VasExpiringTaskItem, VasTaskOut
|
|
|
from app.schemas.ticket import VasTicketCreate, VasTicketOut, VasTicketStatusUpdate, VasTicketMessageCreate, VasTicketMessageOut
|
|
from app.schemas.ticket import VasTicketCreate, VasTicketOut, VasTicketStatusUpdate, VasTicketMessageCreate, VasTicketMessageOut
|
|
|
from app.schemas.slot_snapshot import SlotSnapshotCreate, SlotSnapshotOut, SlotOverviewOut
|
|
from app.schemas.slot_snapshot import SlotSnapshotCreate, SlotSnapshotOut, SlotOverviewOut
|
|
|
from app.schemas.slot_refresh_status import RefreshBase, RefreshFail, RefreshStatusOut
|
|
from app.schemas.slot_refresh_status import RefreshBase, RefreshFail, RefreshStatusOut
|
|
@@ -522,7 +522,7 @@ async def email_authorizations_forward_email2(
|
|
|
|
|
|
|
|
@admin_required_router.post("/email-authorizations/sendmail", summary="发送邮件", tags=["邮箱接口"], response_model=ApiResponse[EmailContent])
|
|
@admin_required_router.post("/email-authorizations/sendmail", summary="发送邮件", tags=["邮箱接口"], response_model=ApiResponse[EmailContent])
|
|
|
async def email_authorizations_send_email(
|
|
async def email_authorizations_send_email(
|
|
|
- emailAccount: str = Query(..., description="收件邮箱账号, 格式: xxx@xxx.xxx"),
|
|
|
|
|
|
|
+ emailAccount: str = Query(..., description="发件账号, 格式: xxx@xxx.xxx"),
|
|
|
sendTo: str = Query(..., description="收件人邮箱账号"),
|
|
sendTo: str = Query(..., description="收件人邮箱账号"),
|
|
|
subject: str = Query(..., description="邮件主题"),
|
|
subject: str = Query(..., description="邮件主题"),
|
|
|
contentType: str = Query("text", description="内容格式,支持 text 和 html"),
|
|
contentType: str = Query("text", description="内容格式,支持 text 和 html"),
|
|
@@ -1222,6 +1222,15 @@ async def vas_task_list(
|
|
|
tasks = await VasTaskService.list_task(db, status, routing_key, script_version, keyword, page, size)
|
|
tasks = await VasTaskService.list_task(db, status, routing_key, script_version, keyword, page, size)
|
|
|
return success(data=tasks)
|
|
return success(data=tasks)
|
|
|
|
|
|
|
|
|
|
+@admin_required_router.get("/vas/task/expiring", summary="获取即将过期的任务列表", tags=["Visafly签证系统"], response_model=ApiResponse[List[VasExpiringTaskItem]])
|
|
|
|
|
+async def vas_task_get_expiring_tasks(
|
|
|
|
|
+ days: int = 3,
|
|
|
|
|
+ db: AsyncSession = Depends(get_db)
|
|
|
|
|
+):
|
|
|
|
|
+ """获取即将过期的任务列表"""
|
|
|
|
|
+ tasks = await VasTaskService.get_expiring_tasks(db, threshold_days=days)
|
|
|
|
|
+ return success(data=tasks)
|
|
|
|
|
+
|
|
|
@admin_required_router.post("/vas/task/update", summary="更新任务数据", tags=["Visafly签证系统"], response_model=ApiResponse[VasTaskOut])
|
|
@admin_required_router.post("/vas/task/update", summary="更新任务数据", tags=["Visafly签证系统"], response_model=ApiResponse[VasTaskOut])
|
|
|
async def vas_task_update(
|
|
async def vas_task_update(
|
|
|
id: int,
|
|
id: int,
|