| | |
| | | // 2. 删除用户部门关系 |
| | | line += sysUserDepartMapper.delete(new LambdaQueryWrapper<SysUserDepart>().in(SysUserDepart::getUserId, userIds)); |
| | | // 3. 删除用户产线关系 |
| | | line += mdcUserProductionMapper.delete(new LambdaQueryWrapper<MdcUserProduction>().in(MdcUserProduction::getUserId, userIds)); |
| | | line += userFactoryMapper.delete(new LambdaQueryWrapper<UserFactory>().in(UserFactory::getUserId, userIds)); |
| | | //3. 删除用户角色关系 |
| | | line += sysUserRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, userIds)); |
| | | //4.同步删除第三方App的用户 |
| | |
| | | if (oConvertUtils.isNotEmpty(selectedProductions)) { |
| | | arr = selectedProductions.split(","); |
| | | for (String productionId : arr) { |
| | | MdcUserProduction mdcUserProduction = new MdcUserProduction(user.getId(), productionId); |
| | | mdcUserProductionMapper.insert(mdcUserProduction); |
| | | UserFactory mdcUserProduction = new UserFactory(productionId, user.getId()); |
| | | userFactoryMapper.insert(mdcUserProduction); |
| | | } |
| | | } |
| | | //step.5 保存设备权限 |
| | |
| | | array = productions.split(","); |
| | | } |
| | | //先删后加 |
| | | mdcUserProductionMapper.delete(new QueryWrapper<MdcUserProduction>().lambda().eq(MdcUserProduction::getUserId, user.getId())); |
| | | userFactoryMapper.delete(new QueryWrapper<UserFactory>().lambda().eq(UserFactory::getUserId, user.getId())); |
| | | if (oConvertUtils.isNotEmpty(productions)) { |
| | | for (String productionId : array) { |
| | | MdcUserProduction mdcUserProduction = new MdcUserProduction(user.getId(), productionId); |
| | | mdcUserProductionMapper.insert(mdcUserProduction); |
| | | UserFactory mdcUserProduction = new UserFactory(productionId, user.getId()); |
| | | userFactoryMapper.insert(mdcUserProduction); |
| | | } |
| | | } |
| | | |
| | | //step.5 修改设备权限 |
| | | //先删后加 |
| | | // dncDevicePermissionMapper.delete(new QueryWrapper<DncDevicePermission>().lambda().eq(DncDevicePermission::getUserId, user.getId())); |