[KC-168] 라벨링 툴 > 목록 - 기본 페이징 API 사이즈 수정
This commit is contained in:
@@ -77,7 +77,7 @@ public class TrainingDataLabelCoreService {
|
|||||||
return trainingDataLabelRepository.getDetail(assignmentUid);
|
return trainingDataLabelRepository.getDetail(assignmentUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultPaging getDefaultPagingNumber(String userId) {
|
public DefaultPaging getDefaultPagingNumber(String userId, Integer size) {
|
||||||
return trainingDataLabelRepository.getDefaultPagingNumber(userId);
|
return trainingDataLabelRepository.getDefaultPagingNumber(userId, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,5 +30,5 @@ public interface TrainingDataLabelRepositoryCustom {
|
|||||||
|
|
||||||
DetailRes getDetail(UUID assignmentUid);
|
DetailRes getDetail(UUID assignmentUid);
|
||||||
|
|
||||||
DefaultPaging getDefaultPagingNumber(String userId);
|
DefaultPaging getDefaultPagingNumber(String userId, Integer size);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DefaultPaging getDefaultPagingNumber(String userId) {
|
public DefaultPaging getDefaultPagingNumber(String userId, Integer size) {
|
||||||
|
|
||||||
ZoneId KST = ZoneId.of("Asia/Seoul");
|
ZoneId KST = ZoneId.of("Asia/Seoul");
|
||||||
ZonedDateTime todayStart = ZonedDateTime.now(KST).toLocalDate().atStartOfDay(KST);
|
ZonedDateTime todayStart = ZonedDateTime.now(KST).toLocalDate().atStartOfDay(KST);
|
||||||
@@ -621,7 +621,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
labelingAssignmentEntity.workerUid.eq(userId), beforeCondition.and(stateCondition))
|
labelingAssignmentEntity.workerUid.eq(userId), beforeCondition.and(stateCondition))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
int page = (int) (beforeCnt / 20); // 기본 사이즈 20
|
int page = (int) (beforeCnt / size); // 기본 사이즈 20
|
||||||
return DefaultPaging.builder().page(page).assignmentUid(firstAssignedUid).build();
|
return DefaultPaging.builder().page(page).assignmentUid(firstAssignedUid).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,9 @@ public class TrainingDataLabelApiController {
|
|||||||
})
|
})
|
||||||
@GetMapping("/default-page")
|
@GetMapping("/default-page")
|
||||||
public ApiResponseDto<TrainingDataLabelDto.DefaultPaging> getDefaultPagingNumber(
|
public ApiResponseDto<TrainingDataLabelDto.DefaultPaging> getDefaultPagingNumber(
|
||||||
@Parameter(description = "사번", example = "01022223333") @RequestParam String userId) {
|
@Parameter(description = "사번", example = "01022223333") @RequestParam String userId,
|
||||||
return ApiResponseDto.ok(trainingDataLabelService.getDefaultPagingNumber(userId));
|
@Parameter(description = "페이징 사이즈", example = "20") @RequestParam(defaultValue = "20")
|
||||||
|
Integer size) {
|
||||||
|
return ApiResponseDto.ok(trainingDataLabelService.getDefaultPagingNumber(userId, size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class TrainingDataLabelService {
|
|||||||
return trainingDataLabelCoreService.getDetail(assignmentUid);
|
return trainingDataLabelCoreService.getDetail(assignmentUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DefaultPaging getDefaultPagingNumber(String userId) {
|
public DefaultPaging getDefaultPagingNumber(String userId, Integer size) {
|
||||||
return trainingDataLabelCoreService.getDefaultPagingNumber(userId);
|
return trainingDataLabelCoreService.getDefaultPagingNumber(userId, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user