30 lines
888 B
Python
30 lines
888 B
Python
class ReminderService:
|
|
# 提醒相关接口统一通过 service 聚合,便于后续切到任务调度或数据库实现。
|
|
def list_reminders(self) -> dict:
|
|
return {
|
|
"total": 1,
|
|
"page_no": 1,
|
|
"page_size": 20,
|
|
"list": [
|
|
{
|
|
"reminder_id": 6001,
|
|
"title": "订单待审批",
|
|
"type": "order_approve",
|
|
"status": "pending",
|
|
"created_at": "2026-05-14 11:00:00",
|
|
}
|
|
],
|
|
}
|
|
|
|
def read_reminder(self, reminder_id: int) -> dict:
|
|
return {"reminder_id": reminder_id, "status": "read"}
|
|
|
|
def check_arrears(self) -> dict:
|
|
return {"checked": True}
|
|
|
|
def check_inactive_customers(self) -> dict:
|
|
return {"checked": True}
|
|
|
|
|
|
reminder_service = ReminderService()
|