|
@ -142,4 +142,14 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity> |
|
|
//发送短信
|
|
|
//发送短信
|
|
|
service.sendSms(formDto.getMobile(), map, "市北e家亲", "SMS_174807227"); |
|
|
service.sendSms(formDto.getMobile(), map, "市北e家亲", "SMS_174807227"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void sendSms(String mobile, String keyword) { |
|
|
|
|
|
String smsCode = RandomUtil.getNewRandomCode(NumConstant.SIX); |
|
|
|
|
|
// 缓存手机验证码
|
|
|
|
|
|
smsRedis.setSmsCode(keyword, smsCode); |
|
|
|
|
|
JSONObject param = new JSONObject(); |
|
|
|
|
|
param.put("code", smsCode); |
|
|
|
|
|
this.send(mobile, param.toJSONString()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|