You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
5 years ago
|
package com.fr.plugin.third.sms.fun;
|
||
|
|
||
|
import com.fr.json.JSONArray;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.log.FineLoggerFactory;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
/**
|
||
|
* @author richie
|
||
|
* @version 10.0
|
||
|
* Created by richie on 2019/11/8
|
||
|
* 这个是短信发送的客户端,调用各家实际短信发送平台,这里只通过输出日志的方式提供一个示例
|
||
|
*/
|
||
|
public class SmsClient {
|
||
|
|
||
|
private static SmsClient instance = new SmsClient();
|
||
|
|
||
|
public static SmsClient getInstance() {
|
||
|
return instance;
|
||
|
}
|
||
|
|
||
|
public boolean send(String mobile) {
|
||
|
System.out.println("发送测试短信成功");
|
||
|
FineLoggerFactory.getLogger().info("发送测试短信成功");
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public boolean send(String template, String mobile, JSONObject para, String receiver) {
|
||
|
System.out.println("发送普通短信成功");
|
||
|
FineLoggerFactory.getLogger().info("发送普通短信成功");
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public boolean batchSend(String template, List<String> mobiles, JSONArray params, List<String> receivers) {
|
||
|
System.out.println("发送批量短信成功");
|
||
|
FineLoggerFactory.getLogger().info("发送批量短信成功");
|
||
|
return true;
|
||
|
}
|
||
|
}
|