Skip to content

Commit

Permalink
Merge pull request #96 from Kusitms-29th-Meetup-TeamE/feat/95/onboard…
Browse files Browse the repository at this point in the history
…ing-info

Fix: 활동 조회 api
  • Loading branch information
Jeongho427 authored Jun 5, 2024
2 parents e9f0b76 + 41da51b commit 5997402
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ public List<Activity> findActivitiesForUser(User user) {
public List<Activity> findByAgencyAndPersonalities(long offset, long limit, User user, List<AgencyType> agencyTypes, List<Personality> personalities) {
BooleanBuilder builder = new BooleanBuilder();

if (user != null && !user.getPersonalities().isEmpty()) {
builder.and(activity.personalities.any().in(user.getPersonalities()));
}

if (personalities != null && !personalities.isEmpty()) {
builder.or(activity.personalities.any().in(personalities));
}
Expand Down Expand Up @@ -95,10 +91,6 @@ public List<Activity> findLikedActivities(Long userId, long offset, long limit,
public Long countActivities(List<AgencyType> agencyTypes, List<Personality> personalities, User user) {
BooleanBuilder builder = new BooleanBuilder();

if (user != null && !user.getPersonalities().isEmpty()) {
builder.and(activity.personalities.any().in(user.getPersonalities()));
}

// agencyTypes나 personalities가 입력된 경우 해당 값으로 필터링
if (agencyTypes != null && !agencyTypes.isEmpty()) {
builder.and(activity.agencyType.in(agencyTypes));
Expand Down

0 comments on commit 5997402

Please sign in to comment.