修改代码兼容Oracle和Pgsql
This commit is contained in:
parent
3ec5dfd113
commit
0d4df398f0
|
|
@ -123,10 +123,11 @@ public class GardsSampleDataServiceImpl
|
|||
String ORIGINAL = "ORIGINAL";
|
||||
String RNAUTO = "RNAUTO";
|
||||
String RNMAN = "RNMAN";
|
||||
List<String> suitable = ListUtil.toList(ORIGINAL, RNAUTO, RNMAN);
|
||||
Set<String> suitableSet = new HashSet<>(Arrays.asList(ORIGINAL, RNAUTO, RNMAN));
|
||||
List<OwnerDto> ownerDtos = baseMapper.containSampleId("SAMPLE_ID").stream()
|
||||
.filter(owner -> CollUtil.contains(suitable, owner.getOwner()))
|
||||
.filter(owner -> StrUtil.contains(owner.getTableName(), "GARDS"))
|
||||
.filter(owner -> Objects.nonNull(owner.getOwner()))
|
||||
.filter(owner ->suitableSet.contains(owner.getOwner().toUpperCase()))
|
||||
.filter(owner -> StrUtil.contains(owner.getTableName().toUpperCase(), "GARDS"))
|
||||
.collect(Collectors.toList());
|
||||
String DOT = StrUtil.DOT;
|
||||
|
||||
|
|
@ -149,7 +150,7 @@ public class GardsSampleDataServiceImpl
|
|||
if (rnAuto) {
|
||||
// 收集自动处理库所有表名
|
||||
List<String> autoTables = ownerDtos.stream()
|
||||
.filter(owner -> StrUtil.equals(owner.getOwner(), RNAUTO))
|
||||
.filter(owner -> StrUtil.equals(owner.getOwner().toUpperCase(), RNAUTO))
|
||||
.map(owner -> owner.getOwner() + DOT + owner.getTableName())
|
||||
.collect(Collectors.toList());
|
||||
// 收集待删除文件路径
|
||||
|
|
@ -163,7 +164,7 @@ public class GardsSampleDataServiceImpl
|
|||
if (rnMan) {
|
||||
// 收集人工交互库所有表名
|
||||
List<String> manTables = ownerDtos.stream()
|
||||
.filter(owner -> StrUtil.equals(owner.getOwner(), RNMAN))
|
||||
.filter(owner -> StrUtil.equals(owner.getOwner().toUpperCase(), RNMAN))
|
||||
.map(owner -> owner.getOwner() + DOT + owner.getTableName())
|
||||
.collect(Collectors.toList());
|
||||
// 收集待删除文件路径
|
||||
Loading…
Reference in New Issue
Block a user