Skip to content

Commit

Permalink
Merge pull request #88 from teamSynapse6/develop
Browse files Browse the repository at this point in the history
feat: OFF-CAMPUS 공고 조회 AI분석, 문의처 여부 컬럼 추가 (#87)
  • Loading branch information
sejineer authored May 11, 2024
2 parents a7286dd + 13c9b27 commit 4b838f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public List<AnnouncementRes> findThreeRandomAnnouncement(final Long userId) {
announcement.title,
Expressions.stringTemplate("COALESCE({0}, {1})", announcement.startDate.stringValue(), announcement.nonDate),
Expressions.stringTemplate("COALESCE({0}, {1})", announcement.endDate.stringValue(), announcement.nonDate),
roadmapAnnouncement.announcement.id.isNotNull()
roadmapAnnouncement.announcement.id.isNotNull(),
announcement.contact.isNotNull(),
announcement.isFileUploaded
))
.from(announcement)
.leftJoin(roadmapAnnouncement).on(announcement.id.eq(roadmapAnnouncement.announcement.id).and(roadmapAnnouncement.roadmap.user.id.eq(userId)))
Expand Down Expand Up @@ -109,7 +111,9 @@ public Slice<AnnouncementRes> findAnnouncements(final Long userId, final Pageabl
announcement.title,
Expressions.stringTemplate("COALESCE({0}, {1})", announcement.startDate.stringValue(), announcement.nonDate),
Expressions.stringTemplate("COALESCE({0}, {1})", announcement.endDate.stringValue(), announcement.nonDate),
roadmapAnnouncement.announcement.id.isNotNull()
roadmapAnnouncement.announcement.id.isNotNull(),
announcement.contact.isNotNull(),
announcement.isFileUploaded
)
)
.from(announcement)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ public class AnnouncementRes {
private String startDate;
private String endDate;
private Boolean isBookmarked;
private Boolean isContactExist;
private Boolean isFileUploaded;

@QueryProjection
public AnnouncementRes(Long announcementId, String departmentName, String title, String startDate, String endDate, Boolean isBookmarked) {
public AnnouncementRes(Long announcementId, String departmentName, String title, String startDate, String endDate, Boolean isBookmarked, Boolean isContactExist, Boolean isFileUploaded) {
this.announcementId = announcementId;
this.departmentName = departmentName;
this.title = title;
this.startDate = startDate;
this.endDate = endDate;
this.isBookmarked = isBookmarked;
this.isContactExist = isContactExist;
this.isFileUploaded = isFileUploaded;
}

}

0 comments on commit 4b838f6

Please sign in to comment.