短信发送方法签名重构
This commit is contained in:
parent
c597826849
commit
7bfc31e2a0
@ -22,13 +22,14 @@ public interface IXhpcSmsService {
|
|||||||
List<Map<String, Object>> getList(Integer status,String phone);
|
List<Map<String, Object>> getList(Integer status,String phone);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公共调用方法
|
* 发送短信通用方法
|
||||||
|
*
|
||||||
* @param phone 手机号
|
* @param phone 手机号
|
||||||
* @param content 内容
|
* @param content 内容
|
||||||
* @param random 验证码6位
|
* @param random 验证码6位 不为空则是获取验证码
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult getPhoneCode(String phone,String content,String random);
|
AjaxResult send(String phone, String content, String random);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
|
|||||||
public AjaxResult getLogonPhoneCode(String phone) {
|
public AjaxResult getLogonPhoneCode(String phone) {
|
||||||
String random = getRandom();
|
String random = getRandom();
|
||||||
String conten ="【小华充电】您的验证码是:"+random+",有效期为5分钟。如非本人操作,可不用理会。";
|
String conten ="【小华充电】您的验证码是:"+random+",有效期为5分钟。如非本人操作,可不用理会。";
|
||||||
return getPhoneCode(phone,conten,random);
|
return send(phone, conten, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -54,7 +54,7 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getPhoneCode(String phone, String content,String random) {
|
public AjaxResult send(String phone, String content, String random) {
|
||||||
|
|
||||||
//调用接口
|
//调用接口
|
||||||
String pattern = "^([1][0-9]{10})";
|
String pattern = "^([1][0-9]{10})";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user