260109_01_ENH : RequestBody에 Valid 누락 추가 및 PageResponse, PageRequest Common으로 이동

This commit is contained in:
2026-01-09 14:18:48 +09:00
parent 09e0b4ca05
commit e6f33bf331
13 changed files with 34 additions and 66 deletions

View File

@@ -1,10 +1,9 @@
package com.kri.contact.server.service;
import com.kri.common.datetime.DateTimeUtil;
import com.kri.common.web.BusinessException;
import com.kri.common.webmvc.page.*;
import com.kri.contact.server.common.consts.ContactConstant;
import com.kri.contact.server.dto.*;
import com.kri.contact.server.dto.common.PageResponseDto;
import com.kri.contact.server.dto.*;;
import com.kri.contact.server.persistence.entity.TPrjctEntity;
import com.kri.contact.server.persistence.query.ProjectSorts;
import com.kri.contact.server.persistence.query.ProjectSpecs;
@@ -93,11 +92,8 @@ public class ProjectService {
spec = spec.and(ProjectSpecs.assignedToUserAndNotExcluded(userId));
}
Pageable pageable = PageRequest.of(
req.getPageIndex(),
req.getPageSize(),
ProjectSorts.toSort(req.getSortBy(), req.getSortDir())
);
PageRequestDto pageReq = req.getPageRequest();
Pageable pageable = Pageables.of(pageReq, TPrjctEntity.class);
Page<ProjectInfoDto> page = projectRepository.findAll(spec, pageable)
.map(ProjectInfoDto::from);