260109_01_ENH : RequestBody에 Valid 누락 추가 및 PageResponse, PageRequest Common으로 이동
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user