File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
dbm-ui/backend/components/cmsi Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1111
1212from django .utils .translation import gettext_lazy as _
1313
14- from ...core .notify .constants import MsgType
1514from ..base import BaseApi
1615from ..domains import CMSI_APIGW_DOMAIN
1716
@@ -21,12 +20,16 @@ class _CmsiApi(BaseApi):
2120 BASE = CMSI_APIGW_DOMAIN
2221
2322 # 消息类型映射定义
24- MSG_TYPE_MAP = {
25- MsgType .VOICE .value : "send_voice" ,
26- MsgType .SMS .value : "send_sms" ,
27- MsgType .WEIXIN .value : "send_weixin" ,
28- MsgType .MAIL .value : "send_mail" ,
29- }
23+ @property
24+ def MSG_TYPE_MAP (self ):
25+ from ...core .notify .constants import MsgType
26+
27+ return {
28+ MsgType .VOICE .value : "send_voice" ,
29+ MsgType .SMS .value : "send_sms" ,
30+ MsgType .WEIXIN .value : "send_weixin" ,
31+ MsgType .MAIL .value : "send_mail" ,
32+ }
3033
3134 def __init__ (self ):
3235 self .get_msg_type = self .generate_data_api (
You can’t perform that action at this time.
0 commit comments