mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-05-12 02:02:10 +00:00
* feat: 支持CMPPv2.0协议短信网关 * 修改翻译 Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
25 lines
476 B
Python
25 lines
476 B
Python
from common.utils import get_logger
|
|
|
|
logger = get_logger(__file__)
|
|
|
|
|
|
class BaseSMSClient:
|
|
"""
|
|
短信终端的基类
|
|
"""
|
|
|
|
SIGN_AND_TMPL_SETTING_FIELD_PREFIX: str
|
|
|
|
@classmethod
|
|
def new_from_settings(cls):
|
|
raise NotImplementedError
|
|
|
|
def send_sms(self, phone_numbers: list, sign_name: str, template_code: str, template_param: dict, **kwargs):
|
|
raise NotImplementedError
|
|
|
|
@staticmethod
|
|
def need_pre_check():
|
|
return True
|
|
|
|
|