Skip to content

Commit

Permalink
style: #151 회원 등급 정책 로직 수정 중
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrationn committed May 17, 2024
1 parent 51744d3 commit 8e312c0
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 247 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
package com.t3t.bookstoreapi.member.repository;

import com.t3t.bookstoreapi.member.model.entity.MemberGrade;
import com.t3t.bookstoreapi.member.model.entity.MemberGradePolicy;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Optional;

public interface MemberGradeRepository extends JpaRepository<MemberGrade, Integer> {
Optional<MemberGrade> findByName(String name);

@Query("SELECT m.policy FROM MemberGrade m JOIN FETCH MemberGradePolicy mg WHERE m.policy.policyId = mg.policyId")
List<MemberGrade> findAll();

@Query("SELECT m.policy FROM MemberGrade m JOIN FETCH MemberGradePolicy mg WHERE m.policy.policyId = mg.policyId")
Optional<MemberGrade> findByPolicyId(Long policyId);
}
}

This file was deleted.

0 comments on commit 8e312c0

Please sign in to comment.