用户删除部门删除

master
cheney 2 years ago
parent d6b620f945
commit 26d555a99f
  1. 7
      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<SysUser> queryWrapper = Wrappers.lambdaQuery();
queryWrapper.in(SysUser::getId, userIds);
userService.remove(queryWrapper);
//删除用户部门
userDeptMapper.delete(Wrappers.<UserDept>lambdaQuery().in(UserDept::getUserId, userIds));
return R.success();
}

Loading…
Cancel
Save