fix: 优化导入和验证码逻辑
This commit is contained in:
parent
9a90569ec5
commit
2ecb68fbb6
@ -53,6 +53,7 @@ public class SecurityConfig {
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/user/login").anonymous()
|
||||
.requestMatchers("/user/code").permitAll()
|
||||
.requestMatchers("/sms/resetPassword").permitAll()
|
||||
.requestMatchers("/system/user/auditUser").permitAll()
|
||||
.requestMatchers("/eng/**").permitAll()
|
||||
.requestMatchers("/env/**").permitAll()
|
||||
|
||||
@ -439,7 +439,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
return STATION_NAME_CACHE.get(lowerName);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : STATION_NAME_CACHE.entrySet()) {
|
||||
if (entry.getKey().contains(lowerName) || lowerName.contains(entry.getKey())) {
|
||||
if (entry.getKey().contains(lowerName)) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
@ -455,7 +455,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
return FPSS_BH_CACHE.get(lowerName);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : FPSS_BH_CACHE.entrySet()) {
|
||||
if (entry.getKey().contains(lowerName) || lowerName.contains(entry.getKey())) {
|
||||
if (entry.getKey().contains(lowerName)) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
@ -487,7 +487,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
return BASE_NAME_CACHE.get(lowerName);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : BASE_NAME_CACHE.entrySet()) {
|
||||
if (entry.getKey().contains(lowerName) || lowerName.contains(entry.getKey())) {
|
||||
if (entry.getKey().contains(lowerName)) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
@ -503,7 +503,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
return RIVER_NAME_CACHE.get(lowerName);
|
||||
}
|
||||
for (Map.Entry<String, String> entry : RIVER_NAME_CACHE.entrySet()) {
|
||||
if (entry.getKey().contains(lowerName) || lowerName.contains(entry.getKey())) {
|
||||
if (entry.getKey().contains(lowerName)) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,7 +199,11 @@ public class SmsVerifyCodeController {
|
||||
if (existUser == null) {
|
||||
return ResponseResult.error("该手机号未注册");
|
||||
}
|
||||
|
||||
try {
|
||||
password = RsaUtils.decryptByPrivateKey(privateKey, smsVerifyCodeRequest.getPassword());
|
||||
} catch (Exception e) {
|
||||
return ResponseResult.error("密码解密失败");
|
||||
}
|
||||
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
||||
String encryptedPassword = passwordEncoder.encode(password);
|
||||
|
||||
|
||||
@ -577,8 +577,7 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
|
||||
updateWrapper.eq("phone", phone)
|
||||
.set("password", encryptedPassword)
|
||||
.set("pwdresettime", new Timestamp(System.currentTimeMillis()))
|
||||
.set("lastmodifydate", new Timestamp(System.currentTimeMillis()))
|
||||
.set("lastmodifier", getUsername());
|
||||
.set("lastmodifydate", new Timestamp(System.currentTimeMillis()));
|
||||
return this.update(updateWrapper);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user