Compare commits
12 Commits
s-morimto
...
f5c410b352
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c410b352 | ||
|
|
31d80388af | ||
|
|
bce2d01e48 | ||
|
|
6ee8a3aa59 | ||
|
|
84e55d7606 | ||
|
|
aad285f9ba | ||
|
|
f1e48b02f9 | ||
|
|
60e0694731 | ||
|
|
b09fd95c31 | ||
|
|
65282cdcb2 | ||
|
|
0687a1837e | ||
|
|
2a4150c883 |
@@ -55,15 +55,11 @@ public class GlobalExceptionHandler {
|
|||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
public String AllException(Model model, Exception e, HttpSession session) {
|
public String AllException(Model model, Exception e, HttpSession session) {
|
||||||
model.addAttribute("error", SEVERE_ERROR_MESSAGE_BAD_REQUEST);
|
|
||||||
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE_ILLEGAL_TRANSITION, e);
|
System.out.println("session invalidated exception");
|
||||||
|
session.invalidate();
|
||||||
System.out.println("session invalidated");
|
|
||||||
session.invalidate();
|
|
||||||
|
|
||||||
return "error";
|
return "error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class GoalModel {
|
|||||||
goalModel.getTargetAmount(),
|
goalModel.getTargetAmount(),
|
||||||
goalModel.getDeadline(),
|
goalModel.getDeadline(),
|
||||||
0,
|
0,
|
||||||
userEntity, 0);
|
userEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GoalModel convertFrom(GoalForm goalForm) {
|
public static GoalModel convertFrom(GoalForm goalForm) {
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
|
|
||||||
if (userEntity == null) {
|
if (userEntity == null) {
|
||||||
return null;
|
return null;
|
||||||
|
} else if (userEntity.getDeleteFlag() == 1) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isValidPassword = false;
|
boolean isValidPassword = false;
|
||||||
|
|||||||
@@ -53,13 +53,13 @@ public class UserServiceImpl implements UserService {
|
|||||||
|
|
||||||
userEntity.setQuestionEntity(questionEntity);
|
userEntity.setQuestionEntity(questionEntity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
userEntity.setCourseEntity(courseEntity);
|
userEntity.setCourseEntity(courseEntity);
|
||||||
|
|
||||||
userEntity.setDeleteFlag(0);
|
userEntity.setDeleteFlag(0);
|
||||||
|
|
||||||
userRepository.save(userEntity);
|
goalEntity.setUserEntity(userRepository.save(userEntity));
|
||||||
|
|
||||||
|
goalRepository.save(goalEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class CategoryEntity {
|
|||||||
@Column(name = "category_id")
|
@Column(name = "category_id")
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
@Column(name = "category_name", nullable = false)
|
@Column(name = "category_name", nullable = false, length = 50)
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
@Column(name = "transaction_type", nullable = false)
|
@Column(name = "transaction_type", nullable = false)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class CourseEntity {
|
|||||||
@Column(name = "course_id")
|
@Column(name = "course_id")
|
||||||
private Long courseId;
|
private Long courseId;
|
||||||
|
|
||||||
@Column(name = "course_name", nullable = false)
|
@Column(name = "course_name", nullable = false, length = 50)
|
||||||
private String courseName;
|
private String courseName;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class FixedCostEntity {
|
|||||||
@JoinColumn(name = "category_id")
|
@JoinColumn(name = "category_id")
|
||||||
private CategoryEntity categoryEntity;
|
private CategoryEntity categoryEntity;
|
||||||
|
|
||||||
@Column(name = "fixed_cost_name", nullable = false)
|
@Column(name = "fixed_cost_name", nullable = false, length = 50)
|
||||||
private String fixedCostName;
|
private String fixedCostName;
|
||||||
|
|
||||||
@Column(name = "amount", nullable = false)
|
@Column(name = "amount", nullable = false)
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ public class GoalEntity {
|
|||||||
private Long goalId;
|
private Long goalId;
|
||||||
|
|
||||||
@Column(name = "goal_title", nullable = true)
|
@Column(name = "goal_title", nullable = true)
|
||||||
private String goalTitle;
|
private String goalTitle = "名前を設定してください";
|
||||||
|
|
||||||
@Column(name = "goal_subtitle", nullable = true)
|
@Column(name = "goal_subtitle", nullable = true)
|
||||||
private String goalSubtitle;
|
private String goalSubtitle = "説明を書いてください";
|
||||||
|
|
||||||
@Column(name = "target_amount", nullable = true)
|
@Column(name = "target_amount", nullable = true)
|
||||||
private Integer targetAmount;
|
private Integer targetAmount;
|
||||||
@@ -47,6 +47,4 @@ public class GoalEntity {
|
|||||||
@JoinColumn(name = "user_id")
|
@JoinColumn(name = "user_id")
|
||||||
private UserEntity userEntity;
|
private UserEntity userEntity;
|
||||||
|
|
||||||
private Integer deleteFlag;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class UserEntity {
|
|||||||
@Column(name = "user_id")
|
@Column(name = "user_id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Column(name = "user_name", nullable = false)
|
@Column(name = "user_name", nullable = false, length = 100)
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
@Column(name = "mail_address", nullable = false)
|
@Column(name = "mail_address", nullable = false)
|
||||||
@@ -39,7 +39,7 @@ public class UserEntity {
|
|||||||
@Column(name = "password", nullable = false)
|
@Column(name = "password", nullable = false)
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Column(name = "secret_answer", nullable = false)
|
@Column(name = "secret_answer", nullable = false, length = 100)
|
||||||
private String secretQuestionAnswer;
|
private String secretQuestionAnswer;
|
||||||
|
|
||||||
@Column(name = "birth_date", nullable = false)
|
@Column(name = "birth_date", nullable = false)
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ public class ErrorController {
|
|||||||
public String showError() {
|
public String showError() {
|
||||||
return TransitionTargetPageNameKeyword.ERROR_HTML;
|
return TransitionTargetPageNameKeyword.ERROR_HTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ public class ProfileController {
|
|||||||
profileModel.getBirthDate(),
|
profileModel.getBirthDate(),
|
||||||
profileModel.getSaving(),
|
profileModel.getSaving(),
|
||||||
profileModel.getAnnualIncome(),
|
profileModel.getAnnualIncome(),
|
||||||
profileModel.getMonthlyBudget(),
|
profileModel.getMonthlyBudget());
|
||||||
profileModel.getBirthDate());
|
|
||||||
|
|
||||||
model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm);
|
model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm);
|
||||||
return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML;
|
return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML;
|
||||||
|
|||||||
@@ -16,5 +16,4 @@ public class ProfileEditForm {
|
|||||||
private Integer saving;
|
private Integer saving;
|
||||||
private Integer annualIncome;
|
private Integer annualIncome;
|
||||||
private Integer monthlyBudget;
|
private Integer monthlyBudget;
|
||||||
private LocalDate birthDate;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<title>コース選択</title>
|
<title>コース選択</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="padding-bottom: 120px">
|
<body style="padding-bottom: 120px; padding-top: 60px;">
|
||||||
<div th:replace="~{header :: header}"></div>
|
<div th:replace="~{header :: header}"></div>
|
||||||
<h1 class="page-title">コース選択</h1>
|
<h1 class="page-title">コース選択</h1>
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<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>
|
<input type="number" id="goalId" class="form-control" th:field="*{goalId}" min="0" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user