Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public String campusOrCafeteria(int campusId, int sysCampusId) {
}

// 식당 리스트 반환 메소드
public String makeCafeteriaListCard(int campusId) {
private String makeCafeteriaListCard(int campusId) {
String campusName = campusServiceV2.getUserCampusName(campusId);
List<CafeteriaDto> cafeteriaList = cacheServiceV2.getCafeteriaList(campusId);

Expand All @@ -59,7 +59,7 @@ public String makeCafeteriaListCard(int campusId) {


// 식당 리스트 객체 생성
public List<ListItemDto> mappingCafeteriaList(String campusName, List<CafeteriaDto> cafeteriaList) {
private List<ListItemDto> mappingCafeteriaList(String campusName, List<CafeteriaDto> cafeteriaList) {
List<ListItemDto> listItems = new ArrayList<>();
for (CafeteriaDto cafeteria : cafeteriaList) {
String userMessage = campusName + " " + cafeteria.getCafeteriaNameKo();
Expand All @@ -74,7 +74,7 @@ public List<ListItemDto> mappingCafeteriaList(String campusName, List<CafeteriaD


// 더보기 버튼 리스트 생성
public List<ButtonDto> mappingButtonDto() {
private List<ButtonDto> mappingButtonDto() {
List<ButtonDto> buttonDto = new ArrayList<>();
Map<String, Object> extra = new HashMap<>();
extra.put("sys_campus_id", -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String makeCampusListCard() {
}

// 캠퍼스 리스트 객체 생성
public List<ListItemDto> mappingCampusList(List<CampusEntity> campusList) {
private List<ListItemDto> mappingCampusList(List<CampusEntity> campusList) {
List<ListItemDto> listItems = new ArrayList<>();
for (CampusEntity campus : campusList) {
String campusName = campus.getCampusNameKo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private Optional<String> extractValue(DetailParamsItemFieldDto fieldDto) {


// response 생성 로직
public String makeResponse(HandleRequestDto parameters) {
private String makeResponse(HandleRequestDto parameters) {
int campusId = campusServiceV2.getCampusId(parameters.getCampusName());
int cafeteriaId = cafeteriaServiceV2.getCafeteriaId(parameters.getCafeteriaName(), campusId);

Expand Down Expand Up @@ -112,7 +112,7 @@ private int checkThereIsDiet(HandleRequestDto parameters, int cafeteriaId) {


// 카테고리별 메뉴 리스트 생성하기
public MultiValueMap<String, String> getDiets(HandleRequestDto parameters, int cafeteriaId) {
private MultiValueMap<String, String> getDiets(HandleRequestDto parameters, int cafeteriaId) {
List<DietDto> dietDtos = dietCacheServiceV2.getDietList(parameters, cafeteriaId);
MultiValueMap<String, String> dietList = new LinkedMultiValueMap<>(); // 중복 키 허용(값을 리스트로 반환)

Expand All @@ -128,7 +128,7 @@ public MultiValueMap<String, String> getDiets(HandleRequestDto parameters, int c


// 카테고리별 메뉴 문자열로 나열하기
public StringBuilder processDietList(MultiValueMap<String, String> dietList) {
private StringBuilder processDietList(MultiValueMap<String, String> dietList) {
// 키 추출
Set<String> keys = new TreeSet<>(dietList.keySet()); // 순서 보장 - 오름차순
StringBuilder description = new StringBuilder();
Expand Down Expand Up @@ -163,7 +163,7 @@ private String makeContents(HandleRequestDto parameters, int cafeteriaId, String
}

// 응답 객체 매핑
public String mappingResponse(HandleRequestDto parameters, String imgUrl, String title, String description) {
private String mappingResponse(HandleRequestDto parameters, String imgUrl, String title, String description) {
// imgUrl 객체 생성
ThumbnailDto thumbnail = new ThumbnailDto(imgUrl);

Expand Down Expand Up @@ -214,7 +214,7 @@ private QuickReplyDto createQuickReply(String period, HandleRequestDto parameter

// 일반 파라미터 값 채우기
// sys_campus_name 파라미터 초기화
public String getCampusName(String kakaoId) {
private String getCampusName(String kakaoId) {
// 학과 등록 여부 확인
int campusId = userServiceV2.getUserCampusId(kakaoId);
// 학과 등록한 경우 campusId가 존재함
Expand All @@ -226,7 +226,7 @@ public String getCampusName(String kakaoId) {
}

// sys_date 파라미터 초기화 - 시간 범위에 따라 오늘, 내일 판별
public String getDay(LocalTime time) {
private String getDay(LocalTime time) {
if (time.isAfter(LocalTime.parse("00:00:00")) && time.isBefore(LocalTime.parse("19:00:00"))) {
return "오늘";
} else {
Expand All @@ -235,7 +235,7 @@ public String getDay(LocalTime time) {
}

// sys_period 파라미터 초기화 - 시간 범위에 따라 아침, 점심, 저녁을 판별
public static String getPeriodOfDay(LocalTime time) {
private String getPeriodOfDay(LocalTime time) {
if (time.isAfter(LocalTime.parse("19:00:00")) || time.isBefore(LocalTime.parse("09:30:00"))) {
return "아침";
} else if (!time.isBefore(LocalTime.parse("09:30:00")) && time.isBefore(LocalTime.parse("13:30:00"))) {
Expand All @@ -246,7 +246,7 @@ public static String getPeriodOfDay(LocalTime time) {
}

// 현재 시간 출력 함수
public LocalTime getCurrentTime() {
private LocalTime getCurrentTime() {
LocalDateTime currentDateTime = LocalDateTime.now(ZoneId.of("Asia/Seoul"));
String[] dateTimeParts = currentDateTime.toString().split("T");
String[] timeSplit = dateTimeParts[1].split("\\.");
Expand All @@ -256,7 +256,7 @@ public LocalTime getCurrentTime() {


// sysDay 파라미터 값으로 조회할 날짜 찾는 함수
public Date getCurrentDate(String sysDate) {
private Date getCurrentDate(String sysDate) {
// 현재 날짜
LocalDate today = LocalDate.now();
LocalDate tomorrow = today.plusDays(1); // 하루 뒤 날짜 계산
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String doesNotExistUserReturnBlock() {
}

// 공지가 존재하는 경우
public String mappingCarouselItems(List<NoticeCategoryEntity> categoryEntities, String departmentEng) {
private String mappingCarouselItems(List<NoticeCategoryEntity> categoryEntities, String departmentEng) {
// 카테고리 리스트 생성 (캐로셀 아이템 리스트)
List<CarouselItemDto> categoryList = new ArrayList<>();
for (NoticeCategoryEntity entity : categoryEntities) {
Expand All @@ -69,7 +69,7 @@ public String mappingCarouselItems(List<NoticeCategoryEntity> categoryEntities,
}

// 공지가 존재하지 않는 경우 예외처리
public String thereIsNoCategory() {
private String thereIsNoCategory() {
List<ButtonDto> buttonList = new ArrayList<>();
ButtonDto buttonDto = new ButtonDto("게시판 등록 요청", "webLink", "https://forms.gle/cSMheFmmGDe7P3RD6");
buttonList.add(buttonDto);
Expand All @@ -83,7 +83,7 @@ public List<ListItemDto> getNoticeList(int categoryId, String mi, String bbsId,
}

// 공지 아이템 리스트 dto 매핑
public List<ListItemDto> makeNoticeItemList(List<NoticeEntity> noticeEntities,
private List<ListItemDto> makeNoticeItemList(List<NoticeEntity> noticeEntities,
String mi, String bbsId, String departmentEng) {
List<ListItemDto> noticeItems = new ArrayList<>();

Expand All @@ -99,7 +99,7 @@ public List<ListItemDto> makeNoticeItemList(List<NoticeEntity> noticeEntities,
}

// 아이템 버튼 생성
public List<ButtonDto> makeButton(String departmentEng, String mi, String bbsId) {
private List<ButtonDto> makeButton(String departmentEng, String mi, String bbsId) {
List<ButtonDto> buttons = new ArrayList<>();
ButtonDto button = new ButtonDto("더보기", "webLink", noticeCategoryUrl(departmentEng, mi, bbsId));
buttons.add(button);
Expand All @@ -113,7 +113,7 @@ public String noticeDetailUrl(String departmentEng, String mi, String bbsId, int
}

// 공지 카테고리 주소
public String noticeCategoryUrl(String departmentEng, String mi, String bbsId) {
private String noticeCategoryUrl(String departmentEng, String mi, String bbsId) {
String baseUrl = "https://www.gnu.ac.kr/" + departmentEng + "/na/ntt/selectNttList.do?";
return baseUrl + "mi=" + mi + "&bbsId=" + bbsId;
}
Expand Down