[FIX] JQPLの変数名とテーブル名を修正しました。

This commit is contained in:
s-choi
2026-09-17 14:51:11 +09:00
parent 2e64d623b5
commit 804e4a6fdd

View File

@@ -13,19 +13,20 @@ public interface AllocationRepository extends JpaRepository<AllocationEntity, Al
List<AllocationEntity> findByCourseEntity_CourseId(Long courseId); List<AllocationEntity> findByCourseEntity_CourseId(Long courseId);
@Query(" SELECT co.course_id, " @Query(" SELECT new com.example.demo.app.domain.model.CourseInfoModel("
+ " co.course_name, " + "co.courseId, "
+ " ca.category_id, " + " co.courseName, "
+ " ca.categpry_name, " + " ca.categoryId, "
+ " a.allocation_ratio " + " ca.categoryName, "
+ " FROM allocation_m a " + " a.allocationRatio )"
+ " INNER JOIN course_m co " + " FROM AllocationEntity a"
+ " ON a.course_id = co.course_id " + " INNER JOIN CourseEntity co "
+ " INNER JOIN category_t ca " + " ON a.courseEntity.courseId = co.courseId "
+ " on a.category_id = ca.category_id " + " INNER JOIN CategoryEntity ca "
+ " WHERE ca.transaction_type = 0 " + " on a.categoryEntity.categoryId = ca.categoryId "
+ " ORDER BY a.course_id ASC, " + " WHERE ca.transactionType = 0 "
+ " a.category_id ASC ") + " ORDER BY a.courseEntity.courseId ASC, "
+ " a.categoryEntity.categoryId ASC ")
List<CourseInfoModel> findAllJoinedAllocation(); List<CourseInfoModel> findAllJoinedAllocation();
} }