# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent: true
cc.flyflow.biz.api.impl.loginWeb
// String pwd = SecureUtil.md5(password);
// User u = userService.lambdaQuery()
// .eq(User::getPhone, account)
// .eq(User::getPassword, pwd)
// .eq(User::getStatus, StatusEnum.ENABLE.getValue())
//
// .one();
// if (u != null) {
// return String.valueOf(u.getId());
// }
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
String pwd =passwordEncoder.encode(password);
User u = userService.lambdaQuery()
.eq(User::getPhone, account)
.eq(User::getStatus, StatusEnum.ENABLE.getValue())
.one();
if (u != null) {
if(passwordEncoder.matches(password,u.getPassword())){
return String.valueOf(u.getId());
}else{
return null;
}
}
return null;