Class LuoSiMaoSmsImpl
- java.lang.Object
-
- org.dromara.sms4j.provider.service.AbstractSmsBlend<LuoSiMaoConfig>
-
- org.dromara.sms4j.luosimao.service.LuoSiMaoSmsImpl
-
- All Implemented Interfaces:
SmsBlend
public class LuoSiMaoSmsImpl extends AbstractSmsBlend<LuoSiMaoConfig>
类名: LuoSiMaoSmsImpl
说明: 螺丝帽短信差异配置
- Author:
- :bleachtred 2024/6/21 23:59
-
-
Field Summary
Fields Modifier and Type Field Description private int
retry
-
Fields inherited from class org.dromara.sms4j.provider.service.AbstractSmsBlend
delayed, http, pool
-
-
Constructor Summary
Constructors Constructor Description LuoSiMaoSmsImpl(LuoSiMaoConfig config)
LuoSiMaoSmsImpl(LuoSiMaoConfig config, Executor pool, DelayedTime delayedTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private SmsResponse
getResponse(cn.hutool.json.JSONObject resJson)
private SmsResponse
getSmsResponse(List<String> phones, String message, Date date, boolean batch, boolean status)
String
getSupplier()
获取供应商标识SmsResponse
massTexting(List<String> phones, String message)
说明:群发固定模板短信 massTextingSmsResponse
massTexting(List<String> phones, String templateId, LinkedHashMap<String,String> messages)
说明:使用自定义模板群发短信 massTextingSmsResponse
massTextingOnTime(List<String> phones, String message, Date date)
定时批量发送SmsResponse
queryAccountBalance()
查询账户余额 请将接口设置为 status.jsonprivate SmsResponse
requestRetry(List<String> phones, String message, Date date, boolean batch, boolean status)
SmsResponse
sendMessage(String phone, String message)
说明:发送固定消息模板短信SmsResponse
sendMessage(String phone, String templateId, LinkedHashMap<String,String> messages)
说明:使用自定义模板发送短信 sendMessageSmsResponse
sendMessage(String phone, LinkedHashMap<String,String> messages)
sendMessage-
Methods inherited from class org.dromara.sms4j.provider.service.AbstractSmsBlend
delayedMessage, delayedMessage, delayMassTexting, delayMassTexting, errorResp, getConfig, sendMessageAsync, sendMessageAsync, sendMessageAsync, sendMessageAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dromara.sms4j.api.SmsBlend
batchJoinBlacklist, batchRemovalFromBlacklist, getConfigId, joinInBlacklist, removeFromBlacklist
-
-
-
-
Constructor Detail
-
LuoSiMaoSmsImpl
public LuoSiMaoSmsImpl(LuoSiMaoConfig config, Executor pool, DelayedTime delayedTime)
-
LuoSiMaoSmsImpl
public LuoSiMaoSmsImpl(LuoSiMaoConfig config)
-
-
Method Detail
-
getSupplier
public String getSupplier()
Description copied from interface:SmsBlend
获取供应商标识- Returns:
-
sendMessage
public SmsResponse sendMessage(String phone, String message)
Description copied from class:AbstractSmsBlend
说明:发送固定消息模板短信
此方法将使用配置文件中预设的短信模板进行短信发送
该方法指定的模板变量只能存在一个(配置文件中)
如使用的是腾讯的短信,参数字符串中可以同时存在多个参数,使用 & 分隔例如:您的验证码为{1}在{2}分钟内有效,可以传为 message="xxxx"+"&"+"5" sendMessage
- Specified by:
sendMessage
in interfaceSmsBlend
- Specified by:
sendMessage
in classAbstractSmsBlend<LuoSiMaoConfig>
- Parameters:
phone
- 接收短信的手机号 message 消息内容
-
sendMessage
public SmsResponse sendMessage(String phone, LinkedHashMap<String,String> messages)
Description copied from class:AbstractSmsBlend
sendMessage说明:发送固定消息模板多模板参数短信
- Specified by:
sendMessage
in interfaceSmsBlend
- Specified by:
sendMessage
in classAbstractSmsBlend<LuoSiMaoConfig>
- Parameters:
phone
- 接收短信的手机号messages
- 模板内容
-
sendMessage
public SmsResponse sendMessage(String phone, String templateId, LinkedHashMap<String,String> messages)
Description copied from class:AbstractSmsBlend
说明:使用自定义模板发送短信 sendMessage
- Specified by:
sendMessage
in interfaceSmsBlend
- Specified by:
sendMessage
in classAbstractSmsBlend<LuoSiMaoConfig>
templateId
- 模板idmessages
- key为模板变量名称 value为模板变量值
-
massTexting
public SmsResponse massTexting(List<String> phones, String message)
Description copied from class:AbstractSmsBlend
说明:群发固定模板短信 massTexting
- Specified by:
massTexting
in interfaceSmsBlend
- Specified by:
massTexting
in classAbstractSmsBlend<LuoSiMaoConfig>
-
massTexting
public SmsResponse massTexting(List<String> phones, String templateId, LinkedHashMap<String,String> messages)
Description copied from class:AbstractSmsBlend
说明:使用自定义模板群发短信 massTexting
- Specified by:
massTexting
in interfaceSmsBlend
- Specified by:
massTexting
in classAbstractSmsBlend<LuoSiMaoConfig>
-
massTextingOnTime
public SmsResponse massTextingOnTime(List<String> phones, String message, Date date)
定时批量发送- Parameters:
phones
- 手机号message
- 信息date
- 时间- Returns:
- SmsResponse
-
queryAccountBalance
public SmsResponse queryAccountBalance()
查询账户余额 请将接口设置为 status.json- Returns:
- SmsResponse
-
getSmsResponse
private SmsResponse getSmsResponse(List<String> phones, String message, Date date, boolean batch, boolean status)
-
requestRetry
private SmsResponse requestRetry(List<String> phones, String message, Date date, boolean batch, boolean status)
-
getResponse
private SmsResponse getResponse(cn.hutool.json.JSONObject resJson)
-
-