|
|
@@ -178,6 +178,20 @@ public class LimitRequestServiceImpl implements LimitRequestService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Integer getTotalPageCount(Integer pageSize) {
|
|
|
+ if (isInvalidPageSize(pageSize)) {
|
|
|
+ return 0;
|
|
|
+ } else {
|
|
|
+ long count = limitRequestRepository.count();
|
|
|
+ if (count % pageSize == 0) {
|
|
|
+ return Math.toIntExact(count / pageSize);
|
|
|
+ } else {
|
|
|
+ return Math.toIntExact(count / pageSize + 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private boolean isParsableLong(String keyword) {
|
|
|
try {
|
|
|
Long.parseLong(keyword);
|