diff --git a/app/services/wechat_service.py b/app/services/wechat_service.py index 5d90593..c29c01e 100644 --- a/app/services/wechat_service.py +++ b/app/services/wechat_service.py @@ -13,19 +13,9 @@ import httpx import time from typing import Optional, List, Dict +from app.constants import ALARM_TYPE_NAMES, ALARM_LEVEL_NAMES from app.utils.logger import logger -# 告警类型中文映射(全局复用) -ALARM_TYPE_NAMES = { - "leave_post": "人员离岗", - "intrusion": "周界入侵", - "illegal_parking": "车辆违停", - "vehicle_congestion": "车辆拥堵", -} - -# 告警级别映射 -ALARM_LEVEL_NAMES = {0: "紧急", 1: "重要", 2: "普通", 3: "轻微"} - class WeChatService: """企微通知服务(单例)"""