|
|
|
@ -44,7 +44,7 @@ public class LoginController { |
|
|
|
|
|
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(LoginController.class); |
|
|
|
|
|
|
|
|
|
private static final String SMS_TYPE_LOGIN = "LOGIN"; |
|
|
|
|
private static final String REGISTER_KEY = "user:sms:register:"; |
|
|
|
|
|
|
|
|
|
private static final int TIME_OUT=10; |
|
|
|
|
|
|
|
|
@ -108,10 +108,10 @@ public class LoginController { |
|
|
|
|
|
|
|
|
|
//第一次进入进行注册
|
|
|
|
|
String code=String.format("%06d",new Random().nextInt(1000000)); |
|
|
|
|
redisTemplate.opsForValue().set(SMS_TYPE_LOGIN.concat(tel),code,TIME_OUT, TimeUnit.MINUTES); |
|
|
|
|
redisTemplate.opsForValue().set(REGISTER_KEY.concat(tel),code,TIME_OUT, TimeUnit.MINUTES); |
|
|
|
|
yyyfLoginDto.setCode(code); |
|
|
|
|
|
|
|
|
|
String password=IdGenerator.uuid(); |
|
|
|
|
String password=String.format("%08d",new Random().nextInt(10000000)); |
|
|
|
|
String assessUserId = IdGenerator.uuid(); |
|
|
|
|
assessUser = new AssessUser(); |
|
|
|
|
assessUser.setId(assessUserId); |
|
|
|
@ -209,6 +209,7 @@ public class LoginController { |
|
|
|
|
|
|
|
|
|
redisTemplate.opsForValue().set(caseKey, map); |
|
|
|
|
redisTemplate.expire(caseKey, 2, TimeUnit.HOURS); |
|
|
|
|
yyyfLoginDto.setStatus(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|