mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 21:29:02 +08:00
refactor(mybatis-plus): 将 selectBatchIds 方法替换为 selectByIds
- 在多个模块中,将 baseMapper.selectBatchIds 替换为 baseMapper.selectByIds- 在多个模块中,将 removeByDsId 中的 deleteBatchIds 替换为 deleteByIds- 在多个模块中,将 list 方法中的 in 条件的参数从数组转换为列表
This commit is contained in:
1 parent
5b5aac37d0
commit
a825de905a
20 files changed
+41
-32
No files matched your search
+2
-2
@@ -109,9 +109,9 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||
@Override
|
||||
public Boolean removeByDsId(Long[] dsIds) {
|
||||
DynamicRoutingDataSource dynamicRoutingDataSource = SpringContextHolder.getBean(DynamicRoutingDataSource.class);
|
||||
this.baseMapper.selectBatchIds(CollUtil.toList(dsIds))
|
||||
this.baseMapper.selectByIds(CollUtil.toList(dsIds))
|
||||
.forEach(ds -> dynamicRoutingDataSource.removeDataSource(ds.getName()));
|
||||
this.baseMapper.deleteBatchIds(CollUtil.toList(dsIds));
|
||||
this.baseMapper.deleteByIds(CollUtil.toList(dsIds));
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class GenGroupServiceImpl extends ServiceImpl<GenGroupMapper, GenGroupEnt
|
||||
this.removeBatchByIds(CollUtil.toList(ids));
|
||||
// 删除关系
|
||||
genTemplateGroupService
|
||||
.remove(Wrappers.<GenTemplateGroupEntity>lambdaQuery().in(GenTemplateGroupEntity::getGroupId, ids));
|
||||
.remove(Wrappers.<GenTemplateGroupEntity>lambdaQuery().in(GenTemplateGroupEntity::getGroupId, CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user