9 Commits

16 changed files with 81 additions and 82 deletions

View File

@@ -55,15 +55,11 @@ public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public String AllException(Model model, Exception e, HttpSession session) {
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST);
e.printStackTrace();
LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
System.out.println("session invalidated");
session.invalidate();
System.out.println("session invalidated exception");
session.invalidate();
return "error";
}
}

View File

@@ -57,7 +57,7 @@ public class GoalModel {
goalModel.getTargetAmount(),
goalModel.getDeadline(),
0,
userEntity, 0);
userEntity);
}
public static GoalModel convertFrom(GoalForm goalForm) {

View File

@@ -53,13 +53,13 @@ public class UserServiceImpl implements UserService {
userEntity.setQuestionEntity(questionEntity);
userEntity.setCourseEntity(courseEntity);
userEntity.setDeleteFlag(0);
userRepository.save(userEntity);
goalEntity.setUserEntity(userRepository.save(userEntity));
goalRepository.save(goalEntity);
}
@Override

View File

@@ -29,7 +29,7 @@ public class CategoryEntity {
@Column(name = "category_id")
private Long categoryId;
@Column(name = "category_name", nullable = false)
@Column(name = "category_name", nullable = false, length = 50)
private String categoryName;
@Column(name = "transaction_type", nullable = false)

View File

@@ -27,7 +27,7 @@ public class CourseEntity {
@Column(name = "course_id")
private Long courseId;
@Column(name = "course_name", nullable = false)
@Column(name = "course_name", nullable = false, length = 50)
private String courseName;

View File

@@ -34,7 +34,7 @@ public class FixedCostEntity {
@JoinColumn(name = "category_id")
private CategoryEntity categoryEntity;
@Column(name = "fixed_cost_name", nullable = false)
@Column(name = "fixed_cost_name", nullable = false, length = 50)
private String fixedCostName;
@Column(name = "amount", nullable = false)

View File

@@ -29,10 +29,10 @@ public class GoalEntity {
private Long goalId;
@Column(name = "goal_title", nullable = true)
private String goalTitle;
private String goalTitle = "名前を設定してください";
@Column(name = "goal_subtitle", nullable = true)
private String goalSubtitle;
private String goalSubtitle = "説明を書いてください";
@Column(name = "target_amount", nullable = true)
private Integer targetAmount;
@@ -47,6 +47,4 @@ public class GoalEntity {
@JoinColumn(name = "user_id")
private UserEntity userEntity;
private Integer deleteFlag;
}

View File

@@ -0,0 +1,5 @@
package com.example.demo.app.infra.entity;
public class TestController6 {
}

View File

@@ -30,7 +30,7 @@ public class UserEntity {
@Column(name = "user_id")
private Long userId;
@Column(name = "user_name", nullable = false)
@Column(name = "user_name", nullable = false, length = 100)
private String userName;
@Column(name = "mail_address", nullable = false)
@@ -39,7 +39,7 @@ public class UserEntity {
@Column(name = "password", nullable = false)
private String password;
@Column(name = "secret_answer", nullable = false)
@Column(name = "secret_answer", nullable = false, length = 100)
private String secretQuestionAnswer;
@Column(name = "birth_date", nullable = false)

View File

@@ -11,4 +11,9 @@ public class ErrorController {
public String showError() {
return TransitionTargetPageNameKeyword.ERROR_HTML;
}
@GetMapping(".well-known/appspecific/com.chrome.devtools")
public void nothing() {
}
}

View File

@@ -57,8 +57,7 @@ public class ProfileController {
profileModel.getBirthDate(),
profileModel.getSaving(),
profileModel.getAnnualIncome(),
profileModel.getMonthlyBudget(),
profileModel.getBirthDate());
profileModel.getMonthlyBudget());
model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm);
return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML;

View File

@@ -16,5 +16,4 @@ public class ProfileEditForm {
private Integer saving;
private Integer annualIncome;
private Integer monthlyBudget;
private LocalDate birthDate;
}

View File

@@ -138,8 +138,6 @@
</div>
</div>
<div class="card shadow-sm">

View File

@@ -8,9 +8,8 @@
<title>コース選択</title>
</head>
<body style="padding-bottom: 120px">
<body style="padding-bottom: 120px; padding-top: 60px;">
<div th:replace="~{header :: header}"></div>
<h1 class="page-title">コース選択</h1>
<th:block th:if="${mode == 'change'}">

View File

@@ -80,7 +80,7 @@
</div>
<div class="mb-3">
<label for="goalId" class="form-label">目標</label>
<label for="goalId" class="form-label">目標貯金額</label>
<input type="number" id="goalId" class="form-control" th:field="*{goalId}" min="0" required>
</div>