diff --git a/src/main/java/com/huoran/iasf/controller/UserController.java b/src/main/java/com/huoran/iasf/controller/UserController.java index c235bb9..cfb07e7 100644 --- a/src/main/java/com/huoran/iasf/controller/UserController.java +++ b/src/main/java/com/huoran/iasf/controller/UserController.java @@ -6,6 +6,8 @@ import com.huoran.iasf.common.aop.annotation.LogAnnotation; import com.huoran.iasf.common.aop.annotation.NoRepeatSubmit; import com.huoran.iasf.common.utils.R; import com.huoran.iasf.entity.SysUser; +import com.huoran.iasf.entity.UserDept; +import com.huoran.iasf.mapper.UserDeptMapper; import com.huoran.iasf.service.HttpSessionService; import com.huoran.iasf.service.UserService; import com.huoran.iasf.vo.CheckVo; @@ -47,6 +49,9 @@ public class UserController { @Resource private UserService userService; + @Resource + private UserDeptMapper userDeptMapper; + @Resource private HttpSessionService httpSessionService; @@ -180,6 +185,8 @@ public class UserController { LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(); queryWrapper.in(SysUser::getId, userIds); userService.remove(queryWrapper); + //删除用户部门 + userDeptMapper.delete(Wrappers.lambdaQuery().in(UserDept::getUserId, userIds)); return R.success(); }