|
@@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.requireNonNull;
|
|
|
-import static com.boman.common.core.utils.obj.ObjectUtils.requiredNonNull;
|
|
|
|
|
|
/**
|
|
|
* @author shiqian
|
|
@@ -50,16 +49,16 @@ public class MyController extends BaseController {
|
|
|
@GetMapping("/loadTable")
|
|
|
public AjaxResult loadTable(GenTable genTable) {
|
|
|
List<GenTable> tableList = genTableService.selectGenTableList(genTable);
|
|
|
- requiredNonNull(tableList);
|
|
|
+ requireNonNull(tableList);
|
|
|
|
|
|
// load table and tableColumn
|
|
|
List<Long> tableIdList = tableList.stream().map(GenTable::getTableId).collect(Collectors.toList());
|
|
|
List<GenTableColumn> genTableColumns = genTableColumnService.listByTableIdList(tableIdList);
|
|
|
- requiredNonNull(genTableColumns);
|
|
|
+ requireNonNull(genTableColumns);
|
|
|
packTableAndInsertToRedis(tableList, genTableColumns);
|
|
|
|
|
|
List<GenTableRelation> relationList = genTableRelationService.selectGenTableRelationList(new GenTableRelation());
|
|
|
- requiredNonNull(relationList);
|
|
|
+ requireNonNull(relationList);
|
|
|
// load gen_table_relation表数据到redis
|
|
|
redisService.setCacheObject(RedisKey.RELATION_INFO, relationList, 12L, TimeUnit.DAYS);
|
|
|
|
|
@@ -86,7 +85,7 @@ public class MyController extends BaseController {
|
|
|
List<GenTable> collect = tableList.stream()
|
|
|
.filter(genTable -> genTable.getTableId().equals(childId))
|
|
|
.collect(Collectors.toList());
|
|
|
- tableListTemp.add(requireNonNull(collect).get(0));
|
|
|
+ tableListTemp.add(collect.get(0));
|
|
|
}
|
|
|
}
|
|
|
table.setRelationList(tableListTemp);
|