tb_user 제거, 분석결과 목록 조회 sort삭제
This commit is contained in:
@@ -59,12 +59,9 @@ public class InferenceResultApiController {
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size,
|
||||
@Parameter(description = "정렬 조건 (형식: 필드명,방향)", example = "name,asc")
|
||||
@RequestParam(required = false)
|
||||
String sort) {
|
||||
int size) {
|
||||
InferenceResultDto.SearchReq searchReq =
|
||||
new InferenceResultDto.SearchReq(statCode, title, page, size, sort);
|
||||
new InferenceResultDto.SearchReq(statCode, title, page, size);
|
||||
Page<InferenceResultDto.AnalResList> analResList =
|
||||
inferenceResultService.getInferenceResultList(searchReq);
|
||||
return ApiResponseDto.ok(analResList);
|
||||
|
||||
@@ -345,16 +345,8 @@ public class InferenceResultDto {
|
||||
// 페이징 파라미터
|
||||
private int page = 0;
|
||||
private int size = 20;
|
||||
private String sort;
|
||||
|
||||
public Pageable toPageable() {
|
||||
if (sort != null && !sort.isEmpty()) {
|
||||
String[] sortParams = sort.split(",");
|
||||
String property = sortParams[0];
|
||||
Sort.Direction direction =
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||
}
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user