Skip to content

Commit

Permalink
fix: 감잡은디자이너 api수정
Browse files Browse the repository at this point in the history
  • Loading branch information
GaHee99 committed Jun 9, 2024
1 parent 0d3e60c commit 0388dad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface UserRepository extends JpaRepository<User, Long> {
Optional<User> getUserById(Long userId);
boolean existsByUserName(String userName);

List<User> findByUserStatusOrderByScrapCountDesc(UserStatus userStatus); // TODO - 기획
List<User> findByUserStatusAndFirstWorkIdIsNotNullOrderByScrapCountDesc(UserStatus userStatus);

@Query(value = "SELECT u FROM User u WHERE LOWER(u.userName) LIKE %:keyword% ORDER BY u.createdAt DESC")
List<User> findByUserName(@Param("keyword") String keyword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public UserProfileResponseDTO getUserProfile(Long myId, Long userId) {

@Override
public List<UserResponseDTO> getPopularDesigners(Long userId) { //TODO - 쿼리 지연
val users = userRepository.findByUserStatusOrderByScrapCountDesc(UserStatus.PERMITTED);
val users = userRepository.findByUserStatusAndFirstWorkIdIsNotNullOrderByScrapCountDesc(UserStatus.PERMITTED);

val me = findUser(userId);
removeBlockUsers(users, me);
Expand Down

0 comments on commit 0388dad

Please sign in to comment.