|
@@ -459,6 +459,22 @@ public class SysUserServiceImpl extends AbstractCrudService<SysUserMapper, SysUs
|
|
|
return userMapper.deleteUserByIds(userIds);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public int deleteUserByPwd(Long userId,String password) {
|
|
|
+ checkUserAllowed(new SysUser(userId));
|
|
|
+ SysUser user = this.selectUserById(userId);
|
|
|
+ if (user.getPassword().equals(password)){
|
|
|
+
|
|
|
+ userRoleMapper.deleteUserRoleByUserId(userId);
|
|
|
+
|
|
|
+ userPostMapper.deleteUserPostByUserId(userId);
|
|
|
+ return userMapper.deleteUserById(userId);
|
|
|
+ }else {
|
|
|
+ throw new BusinessException("密码错误");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public LoginUser getUserInfo(String username) {
|