|  |  |  | 
|---|
|  |  |  | import com.matrix.system.app.dto.PwdResetDto; | 
|---|
|  |  |  | import com.matrix.system.app.dto.SmsCodeDto; | 
|---|
|  |  |  | import com.matrix.system.app.dto.UploadPhotoDto; | 
|---|
|  |  |  | import com.matrix.system.app.utils.Sms106Send; | 
|---|
|  |  |  | import com.matrix.system.app.vo.UserInfoVo; | 
|---|
|  |  |  | import com.matrix.system.common.authority.DefaultAuthorityManager; | 
|---|
|  |  |  | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String token = UUIDUtil.getRandomID(); | 
|---|
|  |  |  | redisClient.saveValueForever(token, JSONObject.toJSONString(user)); | 
|---|
|  |  |  | redisClient.saveValueForever(user.getSuId().toString(), token); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | userInfoVo.setId(user.getSuId()); | 
|---|
|  |  |  | userInfoVo.setName(user.getSuName()); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (StringUtils.isNotBlank(codeExist)) { | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("请勿重复发送验证码"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | redisClient.saveValue(smsCodeDto.getTelphone(), "123456", 120); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer code =(int) ((Math.random() * 9 + 1) * 100000); | 
|---|
|  |  |  | Sms106Send.sendVerifyCode(smsCodeDto.getTelphone(), code.toString(), 2); | 
|---|
|  |  |  | redisClient.saveValue(smsCodeDto.getTelphone(), code.toString(), 120); | 
|---|
|  |  |  | return AjaxResult.buildSuccessInstance("发送成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|