mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-06 20:38:35 +00:00
update 优化 替换过期方法
This commit is contained in:
@@ -145,6 +145,6 @@ public class SysClientServiceImpl implements ISysClientService {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
@@ -176,7 +176,7 @@ public class SysConfigServiceImpl implements ISysConfigService {
|
||||
}
|
||||
CacheUtils.evict(CacheNames.SYS_CONFIG, config.getConfigKey());
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(configIds));
|
||||
baseMapper.deleteByIds(Arrays.asList(configIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -137,7 +137,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService {
|
||||
}
|
||||
CacheUtils.evict(CacheNames.SYS_DICT, dictType.getDictType());
|
||||
}
|
||||
baseMapper.deleteBatchIds(Arrays.asList(dictIds));
|
||||
baseMapper.deleteByIds(Arrays.asList(dictIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -87,7 +87,7 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
|
||||
*/
|
||||
@Override
|
||||
public int deleteLogininforByIds(Long[] infoIds) {
|
||||
return baseMapper.deleteBatchIds(Arrays.asList(infoIds));
|
||||
return baseMapper.deleteByIds(Arrays.asList(infoIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -119,6 +119,6 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
|
||||
*/
|
||||
@Override
|
||||
public int deleteNoticeByIds(Long[] noticeIds) {
|
||||
return baseMapper.deleteBatchIds(Arrays.asList(noticeIds));
|
||||
return baseMapper.deleteByIds(Arrays.asList(noticeIds));
|
||||
}
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService {
|
||||
*/
|
||||
@Override
|
||||
public int deleteOperLogByIds(Long[] operIds) {
|
||||
return baseMapper.deleteBatchIds(Arrays.asList(operIds));
|
||||
return baseMapper.deleteByIds(Arrays.asList(operIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -202,7 +202,7 @@ public class SysPostServiceImpl implements ISysPostService {
|
||||
throw new ServiceException(String.format("%1$s已分配,不能删除!", post.getPostName()));
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteBatchIds(Arrays.asList(postIds));
|
||||
return baseMapper.deleteByIds(Arrays.asList(postIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -417,7 +417,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
||||
roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().in(SysRoleMenu::getRoleId, ids));
|
||||
// 删除角色与部门关联
|
||||
roleDeptMapper.delete(new LambdaQueryWrapper<SysRoleDept>().in(SysRoleDept::getRoleId, ids));
|
||||
return baseMapper.deleteBatchIds(ids);
|
||||
return baseMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -140,6 +140,6 @@ public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
|
||||
throw new ServiceException("租户套餐已被使用");
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
@@ -294,7 +294,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
||||
throw new ServiceException("超管租户不能删除");
|
||||
}
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -535,7 +535,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
// 删除用户与岗位表
|
||||
userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getUserId, ids));
|
||||
// 防止更新失败导致的数据删除
|
||||
int flag = baseMapper.deleteBatchIds(ids);
|
||||
int flag = baseMapper.deleteByIds(ids);
|
||||
if (flag < 1) {
|
||||
throw new ServiceException("删除用户失败!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user