兴安访客小程序访客改造

This commit is contained in:
zc
2025-06-10 09:33:07 +08:00
parent 2d23219a0f
commit ccc1f08366
13 changed files with 603 additions and 95 deletions

View File

@@ -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));

View File

@@ -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;