Compare commits
5 Commits
fbec462f65
...
b9e6b5662b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9e6b5662b | ||
|
|
c091b0491a | ||
|
|
902167b663 | ||
|
|
4590c9e5fe | ||
|
|
aa5bf0c64e |
@@ -18,6 +18,7 @@ public class CourseServiceImpl implements CourseService {
|
|||||||
private final CourseRepository courseRepository;
|
private final CourseRepository courseRepository;
|
||||||
|
|
||||||
public List<CourseModel> findAll(){
|
public List<CourseModel> findAll(){
|
||||||
|
|
||||||
return CourseEntity.createCourseModelList(courseRepository.findAll());
|
return CourseEntity.createCourseModelList(courseRepository.findAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import jakarta.persistence.GeneratedValue;
|
|||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.OneToMany;
|
import jakarta.persistence.OneToMany;
|
||||||
import jakarta.persistence.OneToOne;
|
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.CourseModel;
|
import com.example.demo.app.domain.model.CourseModel;
|
||||||
@@ -39,10 +38,6 @@ public class CourseEntity {
|
|||||||
@OneToMany(mappedBy = "courseEntity")
|
@OneToMany(mappedBy = "courseEntity")
|
||||||
private List<UserEntity> userEntity;
|
private List<UserEntity> userEntity;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "courseEntity")
|
|
||||||
private AllocationEntity allocationEntity;
|
|
||||||
|
|
||||||
|
|
||||||
public static List<CourseModel> createCourseModelList(List<CourseEntity> courseEntityList) {
|
public static List<CourseModel> createCourseModelList(List<CourseEntity> courseEntityList) {
|
||||||
|
|
||||||
return courseEntityList
|
return courseEntityList
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class CourseController {
|
|||||||
model.addAttribute("courseList", CourseForm.convertFrom(courseService.findAll()));
|
model.addAttribute("courseList", CourseForm.convertFrom(courseService.findAll()));
|
||||||
model.addAttribute("courseInfoList", CourseInfoForm.convertFrom(courseInfoService.findAll()));
|
model.addAttribute("courseInfoList", CourseInfoForm.convertFrom(courseInfoService.findAll()));
|
||||||
|
|
||||||
return "select-course";
|
return "select_course";
|
||||||
|
|
||||||
//} catch (Exception e) {
|
//} catch (Exception e) {
|
||||||
// // ログイン情報の破棄
|
// // ログイン情報の破棄
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>カテゴリ名</th><tr>配分(%)</tr>
|
<th>カテゴリ名</th><tr>配分(%)</tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="courseInfo:${courseInfoList}" th:if="course.courseId=courseInfo.courseId">
|
<tr th:each="courseInfo:${courseInfoList}" th:if="course.courseId == courseInfo.courseId">
|
||||||
<td th:text="${courseInfo.categoryName}"></td>
|
<td th:text="${courseInfo.categoryName}"></td>
|
||||||
<td th:text="${courseInfo.allocationRatio}"></td>
|
<td th:text="${courseInfo.allocationRatio}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user