From d8c36cb7b1fc93efad6ece90db250e39b9126b80 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Tue, 7 Apr 2026 11:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84(wechat=5Fservice):=20ALARM?= =?UTF-8?q?=5FTYPE=5FNAMES/LEVEL=5FNAMES=20=E6=94=B9=E7=94=A8=20constants?= =?UTF-8?q?=20=E7=BB=9F=E4=B8=80=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/wechat_service.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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: """企微通知服务(单例)"""