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 @@ -25,6 +25,7 @@ public class CafeteriaMenu extends BaseEntity {
private String kind;

@Getter
@Setter
@Column(nullable = false, length = 500) // 식단 내용
private String menu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,17 @@ else if(placeId == 2490) {
// 메뉴가 존재하는 경우
if(!content.equals(NO_MENU_INFO)) {

// 메뉴가 변경된 경우
if (savedMenu == null || !savedMenu.getMenu().equals(content)) {
// 메뉴가 추가된 경우
if (savedMenu == null) {
// 학식 메뉴 저장
cafeteriaMenuRepository.save(new CafeteriaMenu(date, kind, content, placeId));
}

// 메뉴가 변경된 경우
else if(!savedMenu.getMenu().equals(content)) {
savedMenu.setMenu(content);
}

// 당일에 해당하는 경우 식당 설명 수정
if(date.equals(LocalDate.now())) {
if(!updated) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ public class SearchPlaceRes {

public SearchPlaceRes(Place place, String imageUrl) {
this.id = place.getId();
this.buildingId = place.getBuilding().getId();
this.buildingName = place.getBuilding().getName();
this.buildingId = place.getBuilding() != null ? place.getBuilding().getId() : null;
this.buildingName = place.getBuilding() != null ? place.getBuilding().getName() : "";
this.name = place.getName();
this.imageUrl = imageUrl != null ? imageUrl : place.getImageUrl();
this.detail = place.getDetail();
this.weekdayOperatingTime = place.getWeekdayOperatingTime();
this.saturdayOperatingTime = place.getSaturdayOperatingTime();
this.sundayOperatingTime = place.getSundayOperatingTime();
this.isOperating = place.isOperating();
this.needStudentCard = place.getBuilding().isNeedStudentCard();
this.needStudentCard = place.getBuilding() != null ? place.getBuilding().isNeedStudentCard() : false;
this.floor = place.getFloor();
this.address = place.getBuilding().getAddress();
this.address = place.getBuilding() != null ? place.getBuilding().getAddress() : "";
this.plugAvailability = place.isPlugAvailability();
this.longitude = place.getNode().getLongitude();
this.latitude = place.getNode().getLatitude();
this.xCoord = place.getNode().getXCoord();
this.yCoord = place.getNode().getYCoord();
this.longitude = place.getNode() != null ? place.getNode().getLongitude() : null;
this.latitude = place.getNode() != null ? place.getNode().getLatitude() : null;
this.xCoord = place.getNode() != null ? place.getNode().getXCoord() : null;
this.yCoord = place.getNode() != null ? place.getNode().getYCoord() : null;
this.locationType = LocationType.PLACE;
this.placeType = place.getType();
this.description = place.getDescription();
Expand Down