|
@@ -35,8 +35,8 @@ public class SmsService {
|
|
|
* @param phone
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- public boolean sendCode(String phone, String appkey, String scene,
|
|
|
- String token, String sessionId, String sig, String ip) throws Exception {
|
|
|
+ public boolean sendCode(String phone, String appkey, String scene, String token,
|
|
|
+ String sessionId, String sig, String ip, int type) throws Exception {
|
|
|
// 检查验证码
|
|
|
logger.info("安全验证: appkey={}, scene={}, token={}, sessionId={}, sig={}, ip={}", appkey, scene, token, sessionId, sig, ip);
|
|
|
if (debug) {
|
|
@@ -56,7 +56,7 @@ public class SmsService {
|
|
|
String code = String.valueOf(CodeUtil.ints(4));
|
|
|
RedisUtil.set(phone + "_" + code, "", 10, TimeUnit.MINUTES); // 有效期10分钟
|
|
|
logger.info("发送验证码: {}", code);
|
|
|
- aliyunService.sms(phone, code); // 第三方发送短信
|
|
|
+ aliyunService.sms(phone, code, type); // 第三方发送短信(异步)
|
|
|
return true;
|
|
|
}
|
|
|
|