diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/com/eactive/apim/portal/apps/community/notice/service/PortalNoticeFacadeImpl.java b/src/main/java/com/eactive/apim/portal/apps/community/notice/service/PortalNoticeFacadeImpl.java index 4867ed5..fe8db9c 100644 --- a/src/main/java/com/eactive/apim/portal/apps/community/notice/service/PortalNoticeFacadeImpl.java +++ b/src/main/java/com/eactive/apim/portal/apps/community/notice/service/PortalNoticeFacadeImpl.java @@ -44,7 +44,15 @@ public class PortalNoticeFacadeImpl implements PortalNoticeFacade { Specification spec = Specification.where(search.buildSpecification()) .and((root, query, criteriaBuilder) -> criteriaBuilder.equal(root.get("useYn"),"Y")); - Page noticesPage = portalNoticeService.getNotices(spec, pageable); + // 상단고정(fixYn='Y') 우선 정렬 — 호출자의 sort 앞에 결합 (admin Service 와 일관) + Sort fixYnFirst = Sort.by(Sort.Direction.DESC, "fixYn"); + Pageable fixedPageable = PageRequest.of( + pageable.getPageNumber(), + pageable.getPageSize(), + fixYnFirst.and(pageable.getSort()) + ); + + Page noticesPage = portalNoticeService.getNotices(spec, fixedPageable); return noticesPage.map(portalNoticeMapper::map); } diff --git a/src/main/resources/templates/views/apps/community/mainNoticeList.html b/src/main/resources/templates/views/apps/community/mainNoticeList.html index 3e13c02..b030a72 100644 --- a/src/main/resources/templates/views/apps/community/mainNoticeList.html +++ b/src/main/resources/templates/views/apps/community/mainNoticeList.html @@ -58,6 +58,9 @@