#166 新增判空

Merged
xuziqing merged 1 commits from develop into release 10 months ago
  1. +3
    -0
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java

+ 3
- 0
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/TenantServiceImpl.java View File

@@ -336,6 +336,9 @@ public class TenantServiceImpl implements TenantService {
query.checkParam();
//开启分页
List<TenantVo> tenantVos = tenantMapper.findList(query);
if (CollectionUtil.isEmpty(tenantVos)) {
return JsonResult.success(new Page<>(query.getPage(), query.getLimit()));
}
List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery().eq(Platform::getMark, MarkTypeEnum.VALID.getCode()));
//公共数据预热 ,避免循环中复杂查询导致接口响应时间过长
Map<Long, TenantItem> tenantItemMap = getTenantItemMap(tenantVos);

Loading…
Cancel
Save