From 7aa8e31bfd4530e68df263053fd2e47e45d3bbf3 Mon Sep 17 00:00:00 2001 From: s-choi Date: Mon, 28 Sep 2026 16:04:31 +0900 Subject: [PATCH] =?UTF-8?q?[EDIT]=20=E3=83=97=E3=83=AD=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E7=B7=A8=E9=9B=86=E7=94=BB=E9=9D=A2=E3=81=AE?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82=EF=BC=88=E3=83=91=E3=82=B9=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E2=86=92=E7=94=9F=E5=B9=B4=E6=9C=88=E6=97=A5?= =?UTF-8?q?=EF=BC=89=E3=80=81=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=AD=E3=82=B9=E3=83=88=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=97?= =?UTF-8?q?=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82=EF=BC=88=E7=A2=BA=E8=AA=8D?= =?UTF-8?q?=E2=86=92=E7=A2=BA=E5=AE=9A=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/domain/service/impl/ProfileServiceImpl.java | 1 + .../presentation/controller/ProfileController.java | 3 ++- .../demo/app/presentation/form/ProfileEditForm.java | 3 +++ src/main/resources/templates/profile_edit.html | 12 +++++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java index c356dc2..9832d9b 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/ProfileServiceImpl.java @@ -58,6 +58,7 @@ public class ProfileServiceImpl implements ProfileService{ userEntity.setSaving(profileEditForm.getSaving()); userEntity.setAnnualIncome(profileEditForm.getAnnualIncome()); userEntity.setMonthlyBudget(profileEditForm.getMonthlyBudget()); + userEntity.setBirthDate(profileEditForm.getBirthDate()); userRepository.save(userEntity); } } diff --git a/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java b/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java index a78c133..6c58578 100644 --- a/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java +++ b/src/main/java/com/example/demo/app/presentation/controller/ProfileController.java @@ -56,7 +56,8 @@ public class ProfileController { profileModel.getMailAddress(), profileModel.getSaving(), profileModel.getAnnualIncome(), - profileModel.getMonthlyBudget()); + profileModel.getMonthlyBudget(), + profileModel.getBirthDate()); model.addAttribute(PageReturnAttributeKeyword.PROFILE_EDIT_FORM, profileEditForm); return TransitionTargetPageNameKeyword.PROFILE_EDIT_HTML; diff --git a/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java b/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java index 78d3e81..f20762b 100644 --- a/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java +++ b/src/main/java/com/example/demo/app/presentation/form/ProfileEditForm.java @@ -1,5 +1,7 @@ package com.example.demo.app.presentation.form; +import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -13,4 +15,5 @@ public class ProfileEditForm { private Integer saving; private Integer annualIncome; private Integer monthlyBudget; + private LocalDate birthDate; } diff --git a/src/main/resources/templates/profile_edit.html b/src/main/resources/templates/profile_edit.html index 7902a3a..c0598f7 100644 --- a/src/main/resources/templates/profile_edit.html +++ b/src/main/resources/templates/profile_edit.html @@ -52,13 +52,15 @@
- + id="birthDate" + name="birthDate" + th:value="*{birthDate}" + required>
@@ -105,7 +107,7 @@