Skip to content

Commit

Permalink
Merge pull request #136 from Modagbul/feat/mission-alarm
Browse files Browse the repository at this point in the history
Feat/mission alarm
  • Loading branch information
seungueonn authored Dec 11, 2023
2 parents c74debe + 8acb0a9 commit 5b1d85e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Optional<List<FireReceiveRes>> getFireReceivers(Long teamId, Long mission
teamMember.team.teamId.eq(teamId),
teamMember.member.memberId.ne(memberId),
teamMember.member.memberId.notIn(missionDonePeople),
teamMember.member.isDeleted.ne(Boolean.TRUE)
teamMember.isDeleted.ne(Boolean.TRUE)
)
.fetch());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Optional<List<GatherRepeatMissionRes>> findRepeatMissionByMemberId(Long m
)
.where(
mission.team.teamId.in(teams),
mission.status.eq(MissionStatus.ONGOING).or(mission.status.eq(MissionStatus.WAIT)),
mission.status.eq(MissionStatus.ONGOING),
mission.type.eq(MissionType.REPEAT)

)
Expand Down Expand Up @@ -148,7 +148,7 @@ public boolean findRepeatMissionsByTeamId(Long teamId) {
mission.team.teamId.eq(teamId),
mission.type.eq(MissionType.REPEAT),
mission.status.eq(MissionStatus.ONGOING)
).fetchCount() > 2;
).fetchCount() < 2;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,20 @@ public Optional<List<String>> findPeopleRemainMission() {
.join(teamMember.team, team)
.join(team.missions, mission)
.join(mission.missionStateList,missionState)
.where(missionState.isNull())
.fetch());
.on(
mission.eq(missionState.mission),
teamMember.member.eq(missionState.member),
mission.number.loe(missionState.count()))
// .on(missionState.isNull())
.where(
mission.status.eq(MissionStatus.END).or(mission.status.eq(MissionStatus.SUCCESS)).not()
// missionState.isNull())
).fetch());
// .where(
// // active 한 미션 필터링
// (((mission.status.eq(MissionStatus.ONGOING).or(mission.status.eq(MissionStatus.WAIT))).and(mission.type.eq(MissionType.ONCE)))
// .or((mission.status.eq(MissionStatus.ONGOING)).and(mission.type.eq(MissionType.REPEAT)))),

// // 인증하지 않은값
// missionState.id.isNull()

Expand Down

0 comments on commit 5b1d85e

Please sign in to comment.