!290 update SysUserServiceImpl.java.

Merge pull request !290 from sun2008mt/N/A
This commit is contained in:
lbw 2022-12-02 08:48:25 +00:00 committed by Gitee
commit 82e5e52556
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -168,6 +168,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#sysUser.username")
public Boolean removeUserById(SysUser sysUser) {
sysUserRoleMapper.deleteByUserId(sysUser.getUserId());
// 删除用户职位关系
sysUserPostMapper.delete(Wrappers.<SysUserPost>lambdaQuery().eq(SysUserPost::getUserId, sysUser.getUserId()));
this.removeById(sysUser.getUserId());
return Boolean.TRUE;
}