diff --git a/src/main/java/net/causw/adapter/persistence/repository/user/UserAdmissionRepository.java b/src/main/java/net/causw/adapter/persistence/repository/user/UserAdmissionRepository.java index 3f78f6da9..c0c3d9560 100644 --- a/src/main/java/net/causw/adapter/persistence/repository/user/UserAdmissionRepository.java +++ b/src/main/java/net/causw/adapter/persistence/repository/user/UserAdmissionRepository.java @@ -20,9 +20,10 @@ public interface UserAdmissionRepository extends JpaRepository 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 findAllWithName(@Param("user_state") String userState, @Param("name") String name, Pageable pageable); } \ No newline at end of file