wang-hao-jie
2021-10-19 e48043a2df9ca0c73fe18298bab3c4d42ca5c0c7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package cn.exrick.xboot.core.common.sms;
 
 
import cn.exrick.xboot.core.vo.SmsSetting;
 
/**
 * @author Exrick
 */
public interface Sms {
 
    /**
     * 获取配置
     * @return
     */
    SmsSetting getSmsSetting();
 
    /**
     * 发送短信
     * @param mobile 手机号 多个,逗号分隔 若为11位国内手机号无需加国家区号86
     *               国际号码需加上区号 [国家或地区码][手机号] 如8109012345678、86为日本、09012345678为手机号
     * @param params 参数 JSON格式,如{"code": "1234"}
     *               若启用腾讯短信会自动按顺序转换为逗号分隔的数组值如[1234]
     * @param templateCode 短信模板code/id
     */
    void sendSms(String mobile, String params, String templateCode);
}