mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【user】完善删除用户的回调
parent
634fe64b8a
commit
832c3680b3
|
@ -6,6 +6,7 @@ import cn.stylefeng.roses.kernel.db.api.factory.PageFactory;
|
|||
import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory;
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
import cn.stylefeng.roses.kernel.sys.api.callback.RemoveUserCallbackApi;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.entity.SysUserDataScope;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.enums.SysUserDataScopeExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.mapper.SysUserDataScopeMapper;
|
||||
|
@ -17,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户数据范围业务实现层
|
||||
|
@ -25,9 +27,9 @@ import java.util.List;
|
|||
* @date 2023/06/10 21:26
|
||||
*/
|
||||
@Service
|
||||
public class SysUserDataScopeServiceImpl extends ServiceImpl<SysUserDataScopeMapper, SysUserDataScope> implements SysUserDataScopeService {
|
||||
public class SysUserDataScopeServiceImpl extends ServiceImpl<SysUserDataScopeMapper, SysUserDataScope> implements SysUserDataScopeService, RemoveUserCallbackApi {
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void add(SysUserDataScopeRequest sysUserDataScopeRequest) {
|
||||
SysUserDataScope sysUserDataScope = new SysUserDataScope();
|
||||
BeanUtil.copyProperties(sysUserDataScopeRequest, sysUserDataScope);
|
||||
|
@ -65,6 +67,18 @@ public class SysUserDataScopeServiceImpl extends ServiceImpl<SysUserDataScopeMap
|
|||
return this.list(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateHaveUserBind(Set<Long> beRemovedUserIdList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUserAction(Set<Long> beRemovedUserIdList) {
|
||||
LambdaQueryWrapper<SysUserDataScope> sysUserDataScopeLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
sysUserDataScopeLambdaQueryWrapper.in(SysUserDataScope::getUserId, beRemovedUserIdList);
|
||||
this.remove(sysUserDataScopeLambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*
|
||||
|
|
|
@ -8,6 +8,7 @@ import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
|||
import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
import cn.stylefeng.roses.kernel.sys.api.callback.RemoveOrgCallbackApi;
|
||||
import cn.stylefeng.roses.kernel.sys.api.callback.RemoveUserCallbackApi;
|
||||
import cn.stylefeng.roses.kernel.sys.api.enums.HrOrganizationExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.entity.SysUserOrg;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.enums.SysUserOrgExceptionEnum;
|
||||
|
@ -30,7 +31,7 @@ import java.util.Set;
|
|||
* @date 2023/06/10 21:26
|
||||
*/
|
||||
@Service
|
||||
public class SysUserOrgServiceImpl extends ServiceImpl<SysUserOrgMapper, SysUserOrg> implements SysUserOrgService, RemoveOrgCallbackApi {
|
||||
public class SysUserOrgServiceImpl extends ServiceImpl<SysUserOrgMapper, SysUserOrg> implements SysUserOrgService, RemoveOrgCallbackApi, RemoveUserCallbackApi {
|
||||
|
||||
@Override
|
||||
public void add(SysUserOrgRequest sysUserOrgRequest) {
|
||||
|
@ -103,6 +104,18 @@ public class SysUserOrgServiceImpl extends ServiceImpl<SysUserOrgMapper, SysUser
|
|||
this.remove(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateHaveUserBind(Set<Long> beRemovedUserIdList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUserAction(Set<Long> beRemovedUserIdList) {
|
||||
LambdaQueryWrapper<SysUserOrg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(SysUserOrg::getUserId, beRemovedUserIdList);
|
||||
this.remove(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*
|
||||
|
|
|
@ -6,6 +6,7 @@ import cn.stylefeng.roses.kernel.db.api.factory.PageFactory;
|
|||
import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory;
|
||||
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
import cn.stylefeng.roses.kernel.sys.api.callback.RemoveUserCallbackApi;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.entity.SysUserRole;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.enums.SysUserRoleExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.user.mapper.SysUserRoleMapper;
|
||||
|
@ -17,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户角色关联业务实现层
|
||||
|
@ -25,9 +27,9 @@ import java.util.List;
|
|||
* @date 2023/06/10 21:26
|
||||
*/
|
||||
@Service
|
||||
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {
|
||||
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService, RemoveUserCallbackApi {
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void add(SysUserRoleRequest sysUserRoleRequest) {
|
||||
SysUserRole sysUserRole = new SysUserRole();
|
||||
BeanUtil.copyProperties(sysUserRoleRequest, sysUserRole);
|
||||
|
@ -65,6 +67,18 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
|
|||
return this.list(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateHaveUserBind(Set<Long> beRemovedUserIdList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUserAction(Set<Long> beRemovedUserIdList) {
|
||||
LambdaQueryWrapper<SysUserRole> sysUserRoleLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
sysUserRoleLambdaQueryWrapper.in(SysUserRole::getUserId, beRemovedUserIdList);
|
||||
this.remove(sysUserRoleLambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue