1. 修改 iwork 用户同步逻辑,不对非 iwork 来源的关联关系进行覆盖,不覆盖已关联的岗位信息
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -70,6 +70,13 @@ public interface UserDeptService {
|
|||||||
*/
|
*/
|
||||||
void deleteUserDeptByUserId(Long userId);
|
void deleteUserDeptByUserId(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID与部门ID集合删除用户与部门关系
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param deptIds 部门ID集合
|
||||||
|
*/
|
||||||
|
void deleteUserDeptByUserIdAndDeptIds(Long userId, Collection<Long> deptIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量创建用户与部门关系
|
* 批量创建用户与部门关系
|
||||||
* @param createReqVOList 创建信息列表
|
* @param createReqVOList 创建信息列表
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.system.service.userdept;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.security.core.LoginUser;
|
import com.zt.plat.framework.security.core.LoginUser;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import com.zt.plat.module.system.dal.dataobject.userdept.UserDeptDO;
|
import com.zt.plat.module.system.dal.dataobject.userdept.UserDeptDO;
|
||||||
import com.zt.plat.module.system.dal.mysql.userdept.UserDeptMapper;
|
import com.zt.plat.module.system.dal.mysql.userdept.UserDeptMapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@@ -128,10 +129,20 @@ public class UserDeptServiceImpl implements UserDeptService {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteUserDeptByUserId(Long userId) {
|
public void deleteUserDeptByUserId(Long userId) {
|
||||||
if (userId == null) return;
|
if (userId == null) return;
|
||||||
userDeptMapper.delete(new com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX<UserDeptDO>()
|
userDeptMapper.delete(new LambdaQueryWrapperX<UserDeptDO>()
|
||||||
.eq(UserDeptDO::getUserId, userId));
|
.eq(UserDeptDO::getUserId, userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteUserDeptByUserIdAndDeptIds(Long userId, Collection<Long> deptIds) {
|
||||||
|
if (userId == null || CollUtil.isEmpty(deptIds)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
userDeptMapper.delete(new LambdaQueryWrapperX<UserDeptDO>()
|
||||||
|
.eq(UserDeptDO::getUserId, userId)
|
||||||
|
.in(UserDeptDO::getDeptId, deptIds));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void batchCreateUserDept(List<UserDeptDO> createReqVOList) {
|
public void batchCreateUserDept(List<UserDeptDO> createReqVOList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user