兴安访客小程序访客改造
This commit is contained in:
@@ -85,6 +85,7 @@ public class TokenController
|
||||
String s = RsaUiUtils.decryptByPrivateKey(form.getEncrypt());
|
||||
JSONObject jsonObject = JSONObject.parseObject(s);
|
||||
userInfo = sysLoginService.login(jsonObject.getString("username"), jsonObject.getString("password"));
|
||||
// userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||
}
|
||||
// 获取登录token
|
||||
return R.ok(tokenService.createToken(userInfo));
|
||||
|
||||
@@ -356,15 +356,16 @@ public class SysLoginService
|
||||
|
||||
//生成六位验证码
|
||||
String smsCode = SmsUtils.generateSmsCode();
|
||||
log.info("{}短信二维码{}", register.getPhone(), smsCode);
|
||||
|
||||
SmsDTO smsDTO = new SmsDTO();
|
||||
smsDTO.setTemplateId(smsProperties.getTemplate11());
|
||||
smsDTO.setCaptcha(smsCode);
|
||||
smsDTO.setPhone(register.getPhone());
|
||||
AjaxResult ajaxResult = remoteUserService.sendMessage(smsDTO, SecurityConstants.INNER);
|
||||
if (!ajaxResult.isSuccess()) {
|
||||
throw new ServiceException(ajaxResult.get("msg").toString());
|
||||
}
|
||||
// AjaxResult ajaxResult = remoteUserService.sendMessage(smsDTO, SecurityConstants.INNER);
|
||||
// if (!ajaxResult.isSuccess()) {
|
||||
// throw new ServiceException(ajaxResult.get("msg").toString());
|
||||
// }
|
||||
|
||||
//缓存次数
|
||||
int i = 1;
|
||||
|
||||
Reference in New Issue
Block a user