.
This commit is contained in:
@@ -25,11 +25,11 @@ public class MetadataService extends BaseService { //arango
|
||||
public JBean tableList(@RestParam(name = "platToken") String token, String catalog, String dbPlatId, String name) {
|
||||
JBean jBean = new JBean();
|
||||
|
||||
List<Kv> list = MetaKit.getMetaTables().stream().filter(x ->
|
||||
(isEmpty.test(catalog) || catalog.equals(x.getCatalog())) &&
|
||||
(isEmpty.test(dbPlatId) || dbPlatId.equals(x.getDbPlatId())) &&
|
||||
(isEmpty.test(name) || x.getName().contains(name)) &&
|
||||
(isEmpty.test(token) || x.getSysPlatId().equals(platId(token)))
|
||||
List<Kv> list = MetaKit.getMetaTables().stream().filter(x
|
||||
-> (isEmpty(catalog) || catalog.equals(x.getCatalog())) &&
|
||||
(isEmpty(dbPlatId) || dbPlatId.equals(x.getDbPlatId())) &&
|
||||
(isEmpty(name) || x.getName().contains(name)) &&
|
||||
(isEmpty(token) || x.getSysPlatId().equals(platId(token)))
|
||||
).map(x -> Kv.of("name", x.getName())
|
||||
.set("comment", x.getComment())
|
||||
.set("catalog", x.getCatalog())
|
||||
@@ -61,10 +61,10 @@ public class MetadataService extends BaseService { //arango
|
||||
JBean jBean = new JBean();
|
||||
|
||||
MetaTable metaTable = null;
|
||||
if (!isEmpty.test(name)) {
|
||||
if (!isEmpty(name)) {
|
||||
metaTable = MetaKit.getMetaTable(name, token);
|
||||
}
|
||||
if (metaTable == null && !isEmpty.test(alias)) {
|
||||
if (metaTable == null && !isEmpty(alias)) {
|
||||
metaTable = MetaKit.getMetaTableByAlias(alias);
|
||||
}
|
||||
|
||||
@@ -76,13 +76,13 @@ public class MetadataService extends BaseService { //arango
|
||||
JBean jBean = new JBean();
|
||||
do {
|
||||
// 标识码非空校验
|
||||
if (isEmpty.test(service.getTable())) {
|
||||
if (isEmpty(service.getTable())) {
|
||||
jBean.set(-1, "请选择业务主表");
|
||||
break;
|
||||
}
|
||||
|
||||
// 标识码非空校验
|
||||
if (isEmpty.test(service.getName())) {
|
||||
if (isEmpty(service.getName())) {
|
||||
jBean.set(-1, "业务标识码无效");
|
||||
break;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public class MetadataService extends BaseService { //arango
|
||||
|
||||
@RestMapping(name = "importsort", comment = "导入字段保存")
|
||||
public JBean importSort(String serviceKey, List<String> items, @RestParam(name = "platToken") String token) {
|
||||
if (isEmpty.test(items)) return null;
|
||||
if (isEmpty(items)) return null;
|
||||
|
||||
MetaTable metaTable = MetaKit.getMetaTable(serviceKey, token);
|
||||
//fixme: metaTable.setImports(items);
|
||||
@@ -229,7 +229,7 @@ public class MetadataService extends BaseService { //arango
|
||||
JBean jBean = new JBean();
|
||||
|
||||
List<Kv> list = MetaKit.getMetaTables().stream()
|
||||
.filter(x -> (isEmpty.test(token) || x.getSysPlatId().equals(platId(token))))
|
||||
.filter(x -> (isEmpty(token) || x.getSysPlatId().equals(platId(token))))
|
||||
.map(x -> {
|
||||
Kv kv = Kv.of("name", x.getName())
|
||||
.set("comment", x.getComment())
|
||||
@@ -275,7 +275,7 @@ public class MetadataService extends BaseService { //arango
|
||||
|
||||
List<MetaLink> links = MetaKit.getMetaLinks();
|
||||
|
||||
if (!isEmpty.test(alias)) {
|
||||
if (!isEmpty(alias)) {
|
||||
links = links.stream()
|
||||
.filter(x -> x.getTables()[0].equals(alias) || x.getTables()[1].equals(alias))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user