3 Commits

2 changed files with 9 additions and 7 deletions

View File

@@ -33,7 +33,9 @@ public class AnalysisServiceImpl implements AnalysisService {
public AnalysisModel getAnalysis(Long userId) { public AnalysisModel getAnalysis(Long userId) {
// ユーザー情報取得、月別使用可能資金取得 // ユーザー情報取得、月別使用可能資金取得
UserEntity userEntity = userRepository.findById(userId).orElseThrow(); UserEntity userEntity = userRepository.findById(userId).orElseThrow(() ->
new RuntimeException(
"User not found."));
// コースID取得 // コースID取得
Long courseId = userEntity.getCourseEntity().getCourseId(); Long courseId = userEntity.getCourseEntity().getCourseId();

View File

@@ -24,8 +24,8 @@
0 0
</td> </td>
<td th:text="${analysisForm.totalDifferenceAmount >= 0} <td th:text="${analysisForm.totalDifferenceAmount >= 0}
? '+' + ${analysisForm.totalDifferenceAmount} ? '+' + ${analysisForm.totalDifferenceAmount}
: '-' + ${analysisForm.totalDifferenceAmount}" : ${analysisForm.totalDifferenceAmount}"
th:class="${analysisForm.totalDifferenceAmount >= 0} th:class="${analysisForm.totalDifferenceAmount >= 0}
? 'color-danger;' ? 'color-danger;'
: 'color-primary;'"> : 'color-primary;'">
@@ -63,16 +63,16 @@
<td> <td>
<span th:text="${category.monthDifferenceAmount >= 0} <span th:text="${category.monthDifferenceAmount >= 0}
? '+' + ${category.monthDifferenceAmount} ? '+' + ${category.monthDifferenceAmount}
: '-' + ${category.monthDifferenceAmount}" : ${category.monthDifferenceAmount}"
th:class="${category.monthDifferenceAmount >= 0} th:class="${category.monthDifferenceAmount >= 0}
? 'color-danger;' ? 'color-danger;'
: 'color-primary;'"> : 'color-primary;'">
</span> </span>
<br> <br>
<span th:text="${category.courseDifferenceAmount >= 0} <span th:text="${category.courseDifferenceAmount >= 0}
? '+' + ${category.courseDifferenceAmount} ? '+' + ${category.courseDifferenceAmount}
: '-' + ${category.courseDifferenceAmount}" : ${category.courseDifferenceAmount}"
th:class="${category.courseDifferenceAmount >= 0} th:class="${category.courseDifferenceAmount >= 0}
? 'color-danger;' ? 'color-danger;'
: 'color-primary;'"> : 'color-primary;'">