Merge branch 'feature/gongfu' into feature/quotation
This commit is contained in:
commit
e3ce76f466
|
|
@ -30,6 +30,7 @@ import javax.validation.Valid;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,8 +59,9 @@ public class DeviceTypeController extends ControllerBase {
|
||||||
.eq(GongfuDeviceType::getParentId, 0)
|
.eq(GongfuDeviceType::getParentId, 0)
|
||||||
.orderByDesc(GongfuDeviceType::getId)
|
.orderByDesc(GongfuDeviceType::getId)
|
||||||
.page(new Page<>(query.getPage(), query.getPageSize()));
|
.page(new Page<>(query.getPage(), query.getPageSize()));
|
||||||
|
Set<Long> ids = result.getRecords().stream().map(GongfuDeviceType::getId).collect(Collectors.toSet());
|
||||||
List<GongfuDeviceType> children = deviceTypeService.lambdaQuery()
|
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();
|
.list();
|
||||||
return ApiResult.success(convert(query, result, children));
|
return ApiResult.success(convert(query, result, children));
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -70,8 +72,9 @@ public class DeviceTypeController extends ControllerBase {
|
||||||
if (CollectionUtil.isEmpty(children)) {
|
if (CollectionUtil.isEmpty(children)) {
|
||||||
return ApiResult.success(new PageData<>());
|
return ApiResult.success(new PageData<>());
|
||||||
}
|
}
|
||||||
|
Set<Long> ids = children.stream().map(GongfuDeviceType::getParentId).collect(Collectors.toSet());
|
||||||
Page<GongfuDeviceType> result = deviceTypeService.lambdaQuery()
|
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)
|
.orderByDesc(GongfuDeviceType::getId)
|
||||||
.page(new Page<>(query.getPage(), query.getPageSize()));
|
.page(new Page<>(query.getPage(), query.getPageSize()));
|
||||||
return ApiResult.success(convert(query, result, children));
|
return ApiResult.success(convert(query, result, children));
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class AppVersionFilter extends OncePerRequestFilter {
|
||||||
/**
|
/**
|
||||||
* 因前端部分接口遗漏App-Version参数,ios打包重新审核需要很久,所以需要排除掉,否则会导致接口无法访问
|
* 因前端部分接口遗漏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";
|
private static final String MIN_SUPPER_VERSION = "1.0.9";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue