Skip to content

Commit

Permalink
Merge pull request #103 from depromeet/feature/#95
Browse files Browse the repository at this point in the history
[feat][#95] 인성 태그 조회 조건 추가
  • Loading branch information
JeongSangByuk authored Aug 30, 2024
2 parents 05e334c + 6802047 commit 0fc55e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public interface TagRepository extends JpaRepository<Tag, Long> {

List<Tag> findAllByJob(Job job);
List<Tag> findAllByJobIsIn(List<Job> jobList);

List<Tag> findAllByIdIsNotIn(List<Long> idList);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.server.bbo_gak.domain.card.entity.Card;
import com.server.bbo_gak.domain.card.entity.CardTag;
import com.server.bbo_gak.domain.card.entity.Tag;
import com.server.bbo_gak.domain.user.entity.Job;
import com.server.bbo_gak.domain.user.entity.User;
import com.server.bbo_gak.global.error.exception.BusinessException;
import com.server.bbo_gak.global.error.exception.ErrorCode;
Expand All @@ -27,7 +28,7 @@ public class TagService {
@Transactional(readOnly = true)
public List<TagGetResponse> getAllTagList(User user) {

return tagRepository.findAllByJob(user.getJob()).stream()
return tagRepository.findAllByJobIsIn(List.of(user.getJob(), Job.ALL)).stream()
.map(TagGetResponse::from)
.toList();
}
Expand Down

0 comments on commit 0fc55e3

Please sign in to comment.