Skip to content

Commit

Permalink
Fix : UserAdmission 쿼리문 500에러 수정 (#746) (#747)
Browse files Browse the repository at this point in the history
### 🚩 관련사항
[fix : 가입 대기 사용자 확인 api 500에러 수정
#746](#746)

### 📢 전달사항
엔티티 변경 후 쿼리문이 변경되지 않아 500에러가 발생하고 있어 수정하였습니다


### 📸 스크린샷



### 📃 진행사항
- [ ] done1
- [ ] done2 (진행되었어야 하는데 미처 하지 못한 부분 혹은 관련하여 앞으로 진행되어야 하는 부분도 전부 적어서 체크
표시로 관리해주세요.)


### ⚙️ 기타사항
기타 참고사항을 적어주세요.

개발기간:
  • Loading branch information
OH-GITAEK authored Nov 7, 2024
2 parents fa04ca7 + 3650f55 commit c188780
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ public interface UserAdmissionRepository extends JpaRepository<UserAdmission, St
"WHERE u.state = :user_state ORDER BY ua.created_at DESC", nativeQuery = true)
Page<UserAdmission> findAll(@Param("user_state") String userState, Pageable pageable);

@Query(value = "SELECT ua.id AS id, ua.user_id,ua.image,ua.reject_reason,ua.description,ua.updated_at,ua.created_at, u.name, u.state " +
@Query(value = "SELECT ua.id AS id, ua.user_id,uai.uuid_file_id AS user_admission_attach_image ,ua.description,ua.updated_at,ua.created_at, u.name, u.state " +
"FROM tb_user_admission AS ua " +
"LEFT JOIN tb_user AS u ON ua.user_id = u.id " +
"LEFT JOIN tb_user_admission_attach_image_uuid_file AS uai ON ua.id = uai.user_admission_id " +
"WHERE u.state = :user_state AND (:name IS NULL OR u.name LIKE %:name%) ORDER BY ua.created_at DESC", nativeQuery = true)
Page<UserAdmission> findAllWithName(@Param("user_state") String userState, @Param("name") String name, Pageable pageable);
}

0 comments on commit c188780

Please sign in to comment.