Merge branch 'feature/gongfu' into feature/quotation

This commit is contained in:
曹鹏飞 2026-01-16 10:12:12 +08:00
commit e3ce76f466
2 changed files with 6 additions and 3 deletions

View File

@ -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<Long> ids = result.getRecords().stream().map(GongfuDeviceType::getId).collect(Collectors.toSet());
List<GongfuDeviceType> 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<Long> ids = children.stream().map(GongfuDeviceType::getParentId).collect(Collectors.toSet());
Page<GongfuDeviceType> 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));

View File

@ -30,7 +30,7 @@ public class AppVersionFilter extends OncePerRequestFilter {
/**
* 因前端部分接口遗漏App-Version参数ios打包重新审核需要很久所以需要排除掉否则会导致接口无法访问
*/
private static final Set<String> WHITE_LIST = Set.of("getTicket", "uploadSingleFile", "getInfoById");
private static final Set<String> WHITE_LIST = Set.of("getTicket", "uploadSingleFile", "getInfoById", "hangUp", "exportPdf");
private static final String MIN_SUPPER_VERSION = "1.0.9";