[FIX] JQPLの変数名とテーブル名を修正しました。
This commit is contained in:
@@ -13,19 +13,20 @@ public interface AllocationRepository extends JpaRepository<AllocationEntity, Al
|
||||
|
||||
List<AllocationEntity> findByCourseEntity_CourseId(Long courseId);
|
||||
|
||||
@Query(" SELECT co.course_id, "
|
||||
+ " co.course_name, "
|
||||
+ " ca.category_id, "
|
||||
+ " ca.categpry_name, "
|
||||
+ " a.allocation_ratio "
|
||||
+ " FROM allocation_m a "
|
||||
+ " INNER JOIN course_m co "
|
||||
+ " ON a.course_id = co.course_id "
|
||||
+ " INNER JOIN category_t ca "
|
||||
+ " on a.category_id = ca.category_id "
|
||||
+ " WHERE ca.transaction_type = 0 "
|
||||
+ " ORDER BY a.course_id ASC, "
|
||||
+ " a.category_id ASC ")
|
||||
@Query(" SELECT new com.example.demo.app.domain.model.CourseInfoModel("
|
||||
+ "co.courseId, "
|
||||
+ " co.courseName, "
|
||||
+ " ca.categoryId, "
|
||||
+ " ca.categoryName, "
|
||||
+ " a.allocationRatio )"
|
||||
+ " FROM AllocationEntity a"
|
||||
+ " INNER JOIN CourseEntity co "
|
||||
+ " ON a.courseEntity.courseId = co.courseId "
|
||||
+ " INNER JOIN CategoryEntity ca "
|
||||
+ " on a.categoryEntity.categoryId = ca.categoryId "
|
||||
+ " WHERE ca.transactionType = 0 "
|
||||
+ " ORDER BY a.courseEntity.courseId ASC, "
|
||||
+ " a.categoryEntity.categoryId ASC ")
|
||||
List<CourseInfoModel> findAllJoinedAllocation();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user