redis key过期 业务处理
This commit is contained in:
@@ -61,6 +61,10 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
|
||||
@Query(value = "update sys_user set password = ?2 , pwd_reset_time = ?3 where username = ?1",nativeQuery = true)
|
||||
void updatePass(String username, String pass, Date lastPasswordResetTime);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "update sys_user set enabled = 0 where username = ?1",nativeQuery = true)
|
||||
void upEnableByusername(String username);
|
||||
|
||||
/**
|
||||
* 修改邮箱
|
||||
* @param username 用户名
|
||||
|
||||
@@ -80,6 +80,8 @@ public interface UserService {
|
||||
*/
|
||||
void updatePass(String username, String encryptPassword);
|
||||
|
||||
void upEnableByusername(String username);
|
||||
|
||||
/**
|
||||
* 修改头像
|
||||
* @param file 文件
|
||||
|
||||
@@ -196,6 +196,13 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void upEnableByusername(String username) {
|
||||
userRepository.upEnableByusername(username);
|
||||
flushCache(username);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updatePass(String username, String pass) {
|
||||
|
||||
Reference in New Issue
Block a user