@@ -26,21 +26,6 @@ public CafeteriaServiceV2(
2626 this .campusServiceV2 = campusServiceV2 ;
2727 }
2828
29- // 사용자의 campusId와 동일한 식당리스트 찾기
30- public List <Object []> getCafeteriaList (int campusId ) {
31- return cafeteriaRepositoryV2 .findCafeteriaListByCampusId (campusId );
32- }
33-
34- // 캠퍼스에 식당이 존재한다면 cafeteriaId 찾기
35- public int getCafeteriaId (String cafeteriaName , int campusId ) {
36- return cafeteriaRepositoryV2 .findCafeteriaId (cafeteriaName , campusId ).orElse (-1 );
37- }
38-
39- // 식당 imgUrl 찾기
40- public String getImgUrl (int cafeteriaId ) {
41- return cafeteriaRepositoryV2 .findImgUrlByCafeteriaId (cafeteriaId );
42- }
43-
4429 // 반환 조건 설정
4530 public String campusOrCafeteria (int campusId , int sysCampusId ) {
4631 // 더보기 버튼 누른 경우
@@ -54,7 +39,7 @@ public String campusOrCafeteria(int campusId, int sysCampusId) {
5439 }
5540
5641 // 사용자가 원하는 캠퍼스가 없을 때
57- return (campusId != -1 )
42+ return (campusId != -1 ) // 사용자 존재 여부
5843 ? makeCafeteriaListCard (campusId )
5944 : campusServiceV2 .makeCampusListCard ();
6045 }
@@ -97,4 +82,19 @@ public List<ButtonDto> mappingButtonDto() {
9782 buttonDto .add (button );
9883 return buttonDto ;
9984 }
85+
86+ // 사용자의 campusId와 동일한 식당리스트 찾기
87+ public List <Object []> getCafeteriaList (int campusId ) {
88+ return cafeteriaRepositoryV2 .findCafeteriaListByCampusId (campusId );
89+ }
90+
91+ // 캠퍼스에 식당이 존재한다면 cafeteriaId 찾기
92+ public int getCafeteriaId (String cafeteriaName , int campusId ) {
93+ return cafeteriaRepositoryV2 .findCafeteriaId (cafeteriaName , campusId ).orElse (-1 );
94+ }
95+
96+ // 식당 imgUrl 찾기
97+ public String getImgUrl (int cafeteriaId ) {
98+ return cafeteriaRepositoryV2 .findImgUrlByCafeteriaId (cafeteriaId );
99+ }
100100}
0 commit comments