Skip to content

Commit

Permalink
Merge pull request #163 from survey-mate/develop
Browse files Browse the repository at this point in the history
오류 수정 배포
  • Loading branch information
JinhyeokFang authored Feb 18, 2024
2 parents d3f0d8b + 1fe552f commit d60e422
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Data getData(Long dataId) {
.orElseThrow(() -> new GeneralException(Status.DATA_NOT_FOUND));
}

public List<Data> getDataList() { return dataRepository.findAll(Sort.by(Sort.Direction.DESC, "createdAt")); }
public List<Data> getDataList() { return dataRepository.findAll(); }

public List<Data> getDataListAsBuyer(Member buyer) {
return dataRepository.findByBuyer(buyer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public interface DataRepository extends JpaRepository<Data, Long> {

Optional<Data> findByDataId(Long id);

@Query("select data from Data data "
+ "where data.isDeleted = false"
+ " order by data.createdAt desc")
List<Data> findAll();

@Query("select data from Data data "
+ "where data.seller = :member and data.isDeleted = false"
+ " order by data.createdAt desc")
Expand Down

0 comments on commit d60e422

Please sign in to comment.