#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

query.checkParam(); query.checkParam();
//开启分页 //开启分页
List<TenantVo> tenantVos = tenantMapper.findList(query); 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())); List<Platform> platforms = platformMapper.selectList(Wrappers.<Platform>lambdaQuery().eq(Platform::getMark, MarkTypeEnum.VALID.getCode()));
//公共数据预热 ,避免循环中复杂查询导致接口响应时间过长 //公共数据预热 ,避免循环中复杂查询导致接口响应时间过长
Map<Long, TenantItem> tenantItemMap = getTenantItemMap(tenantVos); Map<Long, TenantItem> tenantItemMap = getTenantItemMap(tenantVos);

Loading…
Cancel
Save