mirror of https://gitee.com/xiaonuobase/snowy
【更新】mybatisplus升级后removeBatchByIds改为removeByIds
parent
ce403d8528
commit
f06b637e47
|
@ -220,7 +220,7 @@ public class BizOrgServiceImpl extends ServiceImpl<BizOrgMapper, BizOrg> impleme
|
|||
throw new CommonException("请先删除机构下的岗位");
|
||||
}
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteOrgIdList);
|
||||
this.removeByIds(toDeleteOrgIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ public class BizPositionServiceImpl extends ServiceImpl<BizPositionMapper, BizPo
|
|||
}
|
||||
}
|
||||
// 执行删除
|
||||
this.removeBatchByIds(positionIdList);
|
||||
this.removeByIds(positionIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ public class BizUserServiceImpl extends ServiceImpl<BizUserMapper, BizUser> impl
|
|||
.set(BizUser::getPositionJson, JSONUtil.toJsonStr(handledJsonObjectList)));
|
||||
});
|
||||
// 执行删除
|
||||
this.removeBatchByIds(bizUserIdList);
|
||||
this.removeByIds(bizUserIdList);
|
||||
|
||||
// TODO 此处需要将这些人员踢下线,并永久注销这些人员
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public class ClientUserServiceImpl extends ServiceImpl<ClientUserMapper, ClientU
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void delete(List<ClientUserIdParam> clientUserIdParamList) {
|
||||
this.removeBatchByIds(CollStreamUtil.toList(clientUserIdParamList, ClientUserIdParam::getId));
|
||||
this.removeByIds(CollStreamUtil.toList(clientUserIdParamList, ClientUserIdParam::getId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -154,7 +154,7 @@ public class DevConfigServiceImpl extends ServiceImpl<DevConfigMapper, DevConfig
|
|||
commonCacheOperator.remove(CONFIG_CACHE_KEY + devConfig.getConfigKey());
|
||||
});
|
||||
// 执行删除
|
||||
this.removeBatchByIds(devConfigIdList);
|
||||
this.removeByIds(devConfigIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ public class DevDictServiceImpl extends ServiceImpl<DevDictMapper, DevDict> impl
|
|||
throw new CommonException("不可删除系统内置字典");
|
||||
}
|
||||
// 删除
|
||||
this.removeBatchByIds(devDictIdList);
|
||||
this.removeByIds(devDictIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ public class DevEmailServiceImpl extends ServiceImpl<DevEmailMapper, DevEmail> i
|
|||
|
||||
@Override
|
||||
public void delete(List<DevEmailIdParam> devEmailIdParamList) {
|
||||
this.removeBatchByIds(CollStreamUtil.toList(devEmailIdParamList, DevEmailIdParam::getId));
|
||||
this.removeByIds(CollStreamUtil.toList(devEmailIdParamList, DevEmailIdParam::getId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -114,7 +114,7 @@ public class DevFileServiceImpl extends ServiceImpl<DevFileMapper, DevFile> impl
|
|||
|
||||
@Override
|
||||
public void delete(List<DevFileIdParam> devFileIdParamList) {
|
||||
this.removeBatchByIds(CollStreamUtil.toList(devFileIdParamList, DevFileIdParam::getId));
|
||||
this.removeByIds(CollStreamUtil.toList(devFileIdParamList, DevFileIdParam::getId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -169,7 +169,7 @@ public class DevJobServiceImpl extends ServiceImpl<DevJobMapper, DevJob> impleme
|
|||
// 将运行中的停止
|
||||
devJobIdList.forEach(CronUtil::remove);
|
||||
// 执行删除
|
||||
this.removeBatchByIds(devJobIdList);
|
||||
this.removeByIds(devJobIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package vip.xiaonuo.dev.modular.log.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
|
@ -109,14 +110,14 @@ public class DevLogServiceImpl extends ServiceImpl<DevLogMapper, DevLog> impleme
|
|||
List<DevLogVisPieChartDataResult> resultList = CollectionUtil.newArrayList();
|
||||
DevLogVisPieChartDataResult devLogLoginPieChartDataResult = new DevLogVisPieChartDataResult();
|
||||
devLogLoginPieChartDataResult.setType("登录");
|
||||
devLogLoginPieChartDataResult.setValue(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.LOGIN.getValue())));
|
||||
devLogLoginPieChartDataResult.setValue(Convert.toLong(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.LOGIN.getValue()))));
|
||||
resultList.add(devLogLoginPieChartDataResult);
|
||||
|
||||
DevLogVisPieChartDataResult devLogLogoutPieChartDataResult = new DevLogVisPieChartDataResult();
|
||||
devLogLogoutPieChartDataResult.setType("登出");
|
||||
devLogLogoutPieChartDataResult.setValue(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.LOGOUT.getValue())));
|
||||
devLogLogoutPieChartDataResult.setValue(Convert.toLong(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.LOGOUT.getValue()))));
|
||||
resultList.add(devLogLogoutPieChartDataResult);
|
||||
return resultList;
|
||||
}
|
||||
|
@ -160,14 +161,14 @@ public class DevLogServiceImpl extends ServiceImpl<DevLogMapper, DevLog> impleme
|
|||
List<DevLogOpPieChartDataResult> resultList = CollectionUtil.newArrayList();
|
||||
DevLogOpPieChartDataResult devLogOperatePieChartDataResult = new DevLogOpPieChartDataResult();
|
||||
devLogOperatePieChartDataResult.setType("操作日志");
|
||||
devLogOperatePieChartDataResult.setValue(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.OPERATE.getValue())));
|
||||
devLogOperatePieChartDataResult.setValue(Convert.toLong(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.OPERATE.getValue()))));
|
||||
resultList.add(devLogOperatePieChartDataResult);
|
||||
|
||||
DevLogOpPieChartDataResult devLogExceptionPieChartDataResult = new DevLogOpPieChartDataResult();
|
||||
devLogExceptionPieChartDataResult.setType("异常日志");
|
||||
devLogExceptionPieChartDataResult.setValue(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.EXCEPTION.getValue())));
|
||||
devLogExceptionPieChartDataResult.setValue(Convert.toLong(this.count(new LambdaQueryWrapper<DevLog>()
|
||||
.eq(DevLog::getCategory, DevLogCategoryEnum.EXCEPTION.getValue()))));
|
||||
resultList.add(devLogExceptionPieChartDataResult);
|
||||
return resultList;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ public class DevMessageServiceImpl extends ServiceImpl<DevMessageMapper, DevMess
|
|||
devRelationService.remove(new LambdaUpdateWrapper<DevRelation>().eq(DevRelation::getCategory, DevRelationCategoryEnum.MSG_TO_USER.getValue())
|
||||
.in(DevRelation::getObjectId, devMessageIdList));
|
||||
// 执行删除
|
||||
this.removeBatchByIds(devMessageIdList);
|
||||
this.removeByIds(devMessageIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ public class DevSmsServiceImpl extends ServiceImpl<DevSmsMapper, DevSms> impleme
|
|||
|
||||
@Override
|
||||
public void delete(List<DevSmsIdParam> devSmsIdParamList) {
|
||||
this.removeBatchByIds(CollStreamUtil.toList(devSmsIdParamList, DevSmsIdParam::getId));
|
||||
this.removeByIds(CollStreamUtil.toList(devSmsIdParamList, DevSmsIdParam::getId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
|
|||
// 执行删除
|
||||
<% for(var i = 0; i < configList.~size; i++) { %>
|
||||
<% if(configList[i].needTableId) { %>
|
||||
this.removeBatchByIds(CollStreamUtil.toList(${classNameFirstLower}IdParamList, ${className}IdParam::get${configList[i].fieldNameCamelCaseFirstUpper}));
|
||||
this.removeByIds(CollStreamUtil.toList(${classNameFirstLower}IdParamList, ${className}IdParam::get${configList[i].fieldNameCamelCaseFirstUpper}));
|
||||
<% } %>
|
||||
<% } %>
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class MobileButtonServiceImpl extends ServiceImpl<MobileButtonMapper, Mob
|
|||
// 清除对应的角色与移动端菜单信息中的【授权的移动端按钮信息】
|
||||
sysRelationApi.removeRoleHasMobileButtonRelation(parentMenuIdList, buttonIdList);
|
||||
// 执行删除
|
||||
this.removeBatchByIds(buttonIdList);
|
||||
this.removeByIds(buttonIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ public class MobileMenuServiceImpl extends ServiceImpl<MobileMenuMapper, MobileM
|
|||
// 清除对应的角色与移动端资源信息
|
||||
sysRelationApi.removeRoleHasMobileMenuRelation(toDeleteMenuIdList);
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteMenuIdList);
|
||||
this.removeByIds(toDeleteMenuIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public class MobileModuleServiceImpl extends ServiceImpl<MobileModuleMapper, Mob
|
|||
// 清除对应的角色与移动端资源信息
|
||||
sysRelationApi.removeRoleHasMobileMenuRelation(toDeleteMenuIdList);
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteMenuIdList);
|
||||
this.removeByIds(toDeleteMenuIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public class SysIndexServiceImpl implements SysIndexService {
|
|||
List<String> scheduleIdList = sysIndexScheduleIdParamList.stream().map(SysIndexScheduleIdParam::getId)
|
||||
.collect(Collectors.toList());
|
||||
if(ObjectUtil.isNotEmpty(scheduleIdList)) {
|
||||
sysRelationService.removeBatchByIds(scheduleIdList);
|
||||
sysRelationService.removeByIds(scheduleIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||
throw new CommonException("请先删除组织下的职位");
|
||||
}
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteOrgIdList);
|
||||
this.removeByIds(toDeleteOrgIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ public class SysPositionServiceImpl extends ServiceImpl<SysPositionMapper, SysPo
|
|||
}
|
||||
}
|
||||
// 执行删除
|
||||
this.removeBatchByIds(positionIdList);
|
||||
this.removeByIds(positionIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ public class SysButtonServiceImpl extends ServiceImpl<SysButtonMapper, SysButton
|
|||
.set(SysRelation::getExtJson, JSONUtil.toJsonStr(extJsonObject)));
|
||||
});
|
||||
// 执行删除
|
||||
this.removeBatchByIds(buttonIdList);
|
||||
this.removeByIds(buttonIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
|||
sysRelationService.remove(new LambdaUpdateWrapper<SysRelation>().in(SysRelation::getTargetId, toDeleteMenuIdList)
|
||||
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_ROLE_HAS_RESOURCE.getValue()));
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteMenuIdList);
|
||||
this.removeByIds(toDeleteMenuIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ public class SysModuleServiceImpl extends ServiceImpl<SysModuleMapper, SysModule
|
|||
sysRelationService.remove(new LambdaUpdateWrapper<SysRelation>().in(SysRelation::getTargetId, toDeleteMenuIdList)
|
||||
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_ROLE_HAS_RESOURCE.getValue()));
|
||||
// 执行删除
|
||||
this.removeBatchByIds(toDeleteMenuIdList);
|
||||
this.removeByIds(toDeleteMenuIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public class SysSpaServiceImpl extends ServiceImpl<SysSpaMapper, SysSpa> impleme
|
|||
throw new CommonException("不可删除系统内置单页面");
|
||||
}
|
||||
// 删除
|
||||
this.removeBatchByIds(sysSpaIdList);
|
||||
this.removeByIds(sysSpaIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|||
sysRelationService.remove(new LambdaUpdateWrapper<SysRelation>().in(SysRelation::getObjectId, sysRoleIdList)
|
||||
.eq(SysRelation::getCategory, SysRelationCategoryEnum.SYS_ROLE_HAS_PERMISSION.getValue()));
|
||||
// 执行删除
|
||||
this.removeBatchByIds(sysRoleIdList);
|
||||
this.removeByIds(sysRoleIdList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||
.set(SysUser::getPositionJson, JSONUtil.toJsonStr(handledJsonObjectList)));
|
||||
});
|
||||
// 执行删除
|
||||
this.removeBatchByIds(sysUserIdList);
|
||||
this.removeByIds(sysUserIdList);
|
||||
|
||||
// TODO 此处需要将这些用户踢下线,并永久注销这些用户
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue