fix 修复用户昵称修改后未清除对应缓存问题
This commit is contained in:
parent
a3f43f8ea3
commit
ea23e604f9
@ -37,6 +37,7 @@ import org.dromara.system.domain.vo.SysUserExportVo;
|
|||||||
import org.dromara.system.domain.vo.SysUserVo;
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
import org.dromara.system.mapper.*;
|
import org.dromara.system.mapper.*;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -338,6 +339,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@CacheEvict(cacheNames = CacheNames.SYS_NICKNAME, key = "#user.userId")
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int updateUser(SysUserBo user) {
|
public int updateUser(SysUserBo user) {
|
||||||
// 新增用户与角色管理
|
// 新增用户与角色管理
|
||||||
@ -386,6 +388,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
|||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@CacheEvict(cacheNames = CacheNames.SYS_NICKNAME, key = "#user.userId")
|
||||||
@Override
|
@Override
|
||||||
public int updateUserProfile(SysUserBo user) {
|
public int updateUserProfile(SysUserBo user) {
|
||||||
return baseMapper.update(null,
|
return baseMapper.update(null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user