Skip to content

Commit

Permalink
Merge pull request #185 from Review-zip/dev
Browse files Browse the repository at this point in the history
[Refactor] ํ•ด์‹œํƒœ๊ทธ๋กœ ํ•ด์‹œํƒœ๊ทธ ๊ฒ€์ƒ‰ ์ˆ˜์ •
  • Loading branch information
hsuush authored Feb 7, 2024
2 parents 6c71005 + 7a78bb5 commit 9d09e70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

@RestController
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.example.ReviewZIP.domain.postHashtag.dto.response.PostHashtagResponseDto;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

public class PostHashtagsConverter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface PostHashtagsRepository extends JpaRepository<PostHashtags, Long
List<PostHashtags> findAllByHashtag(String hashtag);


@Query("SELECT DISTINCT ph FROM PostHashtags ph WHERE ph.hashtag LIKE %:name%")
@Query("SELECT ph FROM PostHashtags ph WHERE ph.hashtag LIKE %:name% GROUP BY ph.hashtag" )
List<PostHashtags> findByNameContaining(@Param("name") String name);

}

0 comments on commit 9d09e70

Please sign in to comment.