diff --git a/nflg-mobilebroken-gongfu/src/main/java/com/nflg/mobilebroken/gongfu/controller/DeviceTypeController.java b/nflg-mobilebroken-gongfu/src/main/java/com/nflg/mobilebroken/gongfu/controller/DeviceTypeController.java index 11b0e951..56792126 100644 --- a/nflg-mobilebroken-gongfu/src/main/java/com/nflg/mobilebroken/gongfu/controller/DeviceTypeController.java +++ b/nflg-mobilebroken-gongfu/src/main/java/com/nflg/mobilebroken/gongfu/controller/DeviceTypeController.java @@ -30,6 +30,7 @@ import javax.validation.Valid; import java.time.LocalDateTime; import java.util.Collections; import java.util.List; +import java.util.Set; import java.util.stream.Collectors; /** @@ -58,8 +59,9 @@ public class DeviceTypeController extends ControllerBase { .eq(GongfuDeviceType::getParentId, 0) .orderByDesc(GongfuDeviceType::getId) .page(new Page<>(query.getPage(), query.getPageSize())); + Set ids = result.getRecords().stream().map(GongfuDeviceType::getId).collect(Collectors.toSet()); List children = deviceTypeService.lambdaQuery() - .in(GongfuDeviceType::getParentId, result.getRecords().stream().map(GongfuDeviceType::getId).collect(Collectors.toList())) + .in(CollectionUtil.isNotEmpty(ids), GongfuDeviceType::getParentId, ids) .list(); return ApiResult.success(convert(query, result, children)); } else { @@ -70,8 +72,9 @@ public class DeviceTypeController extends ControllerBase { if (CollectionUtil.isEmpty(children)) { return ApiResult.success(new PageData<>()); } + Set ids = children.stream().map(GongfuDeviceType::getParentId).collect(Collectors.toSet()); Page result = deviceTypeService.lambdaQuery() - .in(GongfuDeviceType::getId, children.stream().map(GongfuDeviceType::getParentId).collect(Collectors.toSet())) + .in(CollectionUtil.isNotEmpty(ids), GongfuDeviceType::getId, ids) .orderByDesc(GongfuDeviceType::getId) .page(new Page<>(query.getPage(), query.getPageSize())); return ApiResult.success(convert(query, result, children)); diff --git a/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/AppVersionFilter.java b/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/AppVersionFilter.java index 7edb802e..00048443 100644 --- a/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/AppVersionFilter.java +++ b/nflg-mobilebroken-starter/src/main/java/com/nflg/mobilebroken/starter/filter/AppVersionFilter.java @@ -30,7 +30,7 @@ public class AppVersionFilter extends OncePerRequestFilter { /** * 因前端部分接口遗漏App-Version参数,ios打包重新审核需要很久,所以需要排除掉,否则会导致接口无法访问 */ - private static final Set WHITE_LIST = Set.of("getTicket", "uploadSingleFile", "getInfoById"); + private static final Set WHITE_LIST = Set.of("getTicket", "uploadSingleFile", "getInfoById", "hangUp", "exportPdf"); private static final String MIN_SUPPER_VERSION = "1.0.9";