|
@@ -59,12 +59,12 @@ public class MyController extends BaseController {
|
|
packTableAndInsertToRedis(tableList, genTableColumns);
|
|
packTableAndInsertToRedis(tableList, genTableColumns);
|
|
|
|
|
|
List<GenTableRelation> relationList = genTableRelationService.selectGenTableRelationList(new GenTableRelation());
|
|
List<GenTableRelation> relationList = genTableRelationService.selectGenTableRelationList(new GenTableRelation());
|
|
- requireNonNull(relationList);
|
|
|
|
- // load gen_table_relation表数据到redis
|
|
|
|
- redisService.setCacheObject(RedisKey.RELATION_INFO, relationList, 12L, TimeUnit.DAYS);
|
|
|
|
-
|
|
|
|
- // load tableRelation
|
|
|
|
- packRelationAndInsertToRedis(tableList, relationList, genTableColumns);
|
|
|
|
|
|
+ if (relationList.size() > 0) {
|
|
|
|
+ // load gen_table_relation表数据到redis
|
|
|
|
+ redisService.setCacheObject(RedisKey.RELATION_INFO, relationList, 12L, TimeUnit.DAYS);
|
|
|
|
+ // load tableRelation
|
|
|
|
+ packRelationAndInsertToRedis(tableList, relationList, genTableColumns);
|
|
|
|
+ }
|
|
return AjaxResult.success(tableList);
|
|
return AjaxResult.success(tableList);
|
|
}
|
|
}
|
|
|
|
|