Compare commits
12 Commits
s-morimto
...
f5c410b352
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c410b352 | ||
|
|
31d80388af | ||
|
|
bce2d01e48 | ||
|
|
6ee8a3aa59 | ||
|
|
84e55d7606 | ||
|
|
aad285f9ba | ||
|
|
f1e48b02f9 | ||
|
|
60e0694731 | ||
|
|
b09fd95c31 | ||
|
|
65282cdcb2 | ||
|
|
0687a1837e | ||
|
|
2a4150c883 |
@@ -52,18 +52,14 @@ public class GlobalExceptionHandler {
|
||||
|
||||
return "error";
|
||||
}
|
||||
|
||||
|
||||
@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";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class GoalModel {
|
||||
goalModel.getTargetAmount(),
|
||||
goalModel.getDeadline(),
|
||||
0,
|
||||
userEntity, 0);
|
||||
userEntity);
|
||||
}
|
||||
|
||||
public static GoalModel convertFrom(GoalForm goalForm) {
|
||||
|
||||
@@ -25,6 +25,8 @@ public class LoginServiceImpl implements LoginService {
|
||||
|
||||
if (userEntity == null) {
|
||||
return null;
|
||||
} else if (userEntity.getDeleteFlag() == 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean isValidPassword = false;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
@@ -46,7 +46,5 @@ public class GoalEntity {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserEntity userEntity;
|
||||
|
||||
private Integer deleteFlag;
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -11,4 +11,5 @@ public class ErrorController {
|
||||
public String showError() {
|
||||
return TransitionTargetPageNameKeyword.ERROR_HTML;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -16,5 +16,4 @@ public class ProfileEditForm {
|
||||
private Integer saving;
|
||||
private Integer annualIncome;
|
||||
private Integer monthlyBudget;
|
||||
private LocalDate birthDate;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user