Skip to content

Commit

Permalink
formatted files
Browse files Browse the repository at this point in the history
  • Loading branch information
Warded120 committed Dec 2, 2024
1 parent e58a3f8 commit 1aa90ce
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions dao/src/main/java/greencity/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,19 @@ WITH current_user_friends AS (
SELECT COUNT(*)
FROM users_friends uf1
WHERE (
(uf1.friend_id = u.id AND uf1.user_id IN (SELECT user_id FROM current_user_friends) AND uf1.status = 'FRIEND')
OR
(uf1.friend_id IN (SELECT user_id FROM current_user_friends) AND uf1.user_id = u.id AND uf1.status = 'FRIEND')
(uf1.friend_id = u.id AND uf1.user_id IN
(
SELECT user_id
FROM current_user_friends) AND uf1.status = 'FRIEND'
)
OR
(
uf1.friend_id IN
(
SELECT user_id FROM current_user_friends
)
AND uf1.user_id = u.id AND uf1.status = 'FRIEND'
)
)
) AS mutualFriends,
u.profile_picture AS profilePicturePath,
Expand Down

0 comments on commit 1aa90ce

Please sign in to comment.