From bac40ff0b0807317e1872b4cd41e1e5c17f408d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Tue, 15 Jul 2025 16:12:08 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EA=B0=9C=EC=9D=B8=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=8B=9C=20=EC=9D=B4=EB=A6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/application/security/FrontHouseholdUser.java | 2 ++ .../updateUserUI/adapters/web/UpdateUserController.java | 8 ++++++++ front/src/main/resources/templates/info/user/user.html | 2 -- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/front/src/main/java/app/module/front/config/application/security/FrontHouseholdUser.java b/front/src/main/java/app/module/front/config/application/security/FrontHouseholdUser.java index a3dc23f6..439918b3 100644 --- a/front/src/main/java/app/module/front/config/application/security/FrontHouseholdUser.java +++ b/front/src/main/java/app/module/front/config/application/security/FrontHouseholdUser.java @@ -2,9 +2,11 @@ package app.module.front.config.application.security; import java.util.Collection; import lombok.Getter; +import lombok.Setter; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.User; +@Setter @Getter public class FrontHouseholdUser extends User { diff --git a/front/src/main/java/app/module/front/usecase/info/userUI/updateUserUI/adapters/web/UpdateUserController.java b/front/src/main/java/app/module/front/usecase/info/userUI/updateUserUI/adapters/web/UpdateUserController.java index d5332c63..981795d9 100644 --- a/front/src/main/java/app/module/front/usecase/info/userUI/updateUserUI/adapters/web/UpdateUserController.java +++ b/front/src/main/java/app/module/front/usecase/info/userUI/updateUserUI/adapters/web/UpdateUserController.java @@ -3,6 +3,7 @@ package app.module.front.usecase.info.userUI.updateUserUI.adapters.web; import app.module.core.config.application.util.CommonUtil; import app.module.core.config.application.util.CoreUtil; import app.module.front.config.application.response.ApiResponse; +import app.module.front.config.application.security.FrontHouseholdUser; import app.module.front.usecase.info.userFront.getUserFront.ports.GetUserFrontPortIn; import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFront; import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFrontCmd; @@ -14,6 +15,9 @@ import app.module.front.usecase.info.userUI.updateUserUI.adapters.web.model.Upda import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PostMapping; @@ -45,6 +49,10 @@ class UpdateUserController { getHousehold.getOwnerName(), "PERSONAL" )); + + Authentication currentAuth = SecurityContextHolder.getContext().getAuthentication(); + FrontHouseholdUser householdUser = (FrontHouseholdUser) currentAuth.getPrincipal(); + householdUser.setOwnerName(reqVO.getOwnerName()); } updateUserPortIn.operate(new UpdateUserFrontCmd( getHousehold.getSeq(), diff --git a/front/src/main/resources/templates/info/user/user.html b/front/src/main/resources/templates/info/user/user.html index 4157850d..8c0d95bc 100644 --- a/front/src/main/resources/templates/info/user/user.html +++ b/front/src/main/resources/templates/info/user/user.html @@ -420,13 +420,11 @@ f.tel1.value = ENV.select.selectTel.getValue(); f.phone1.value = ENV.select.selectPhone.getValue(); - const obj = $(f).serializeObject(); ajaxUtil._ajaxAsync( ENV.httpUrl.user, $(f).serializeObject(), function (rstData, status) { if (rstData.code === 'SUCCESS') { - // 유효성 검사를 모두 통과한 후 ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => { location.href = '/info'; }); From 9296dd4575c4eb20c09428797a9cc3707af298a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Tue, 15 Jul 2025 16:35:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?FO=20=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/main/resources/static/ui/uiUtil.js | 2 +- .../src/main/resources/templates/info/notice/notices.html | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/front/src/main/resources/static/ui/uiUtil.js b/front/src/main/resources/static/ui/uiUtil.js index 14f766d6..ba2b121d 100644 --- a/front/src/main/resources/static/ui/uiUtil.js +++ b/front/src/main/resources/static/ui/uiUtil.js @@ -6,7 +6,7 @@ */ function goPageable(page, size, orderBy, orderDir) { let uri = new Uri(location.href); - uri.replaceQueryParam('pageNumber', page).replaceQueryParam('pageSize', size) + uri.replaceQueryParam('page', page).replaceQueryParam('pageSize', size) .replaceQueryParam('orderBy', orderBy).replaceQueryParam('orderDir', orderDir); diff --git a/front/src/main/resources/templates/info/notice/notices.html b/front/src/main/resources/templates/info/notice/notices.html index 855484a1..0bf5ee93 100644 --- a/front/src/main/resources/templates/info/notice/notices.html +++ b/front/src/main/resources/templates/info/notice/notices.html @@ -113,15 +113,10 @@ */ goSearch() { const f = document.reqForm; - + f.page.value = 0; f.searchField.value = document.getElementById('searchFieldId').value; f.submit(); }, - goPageable(page, size, sort) { - const f = document.reqForm; - f.page.value = page; - f.submit(); - } } From 05a1a0f3300cc0637024d777250740dd7bdac6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Tue, 15 Jul 2025 16:36:57 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=95=2010=EA=B0=9C?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../getNoticesUI/adapters/web/GetNoticesUIController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/main/java/app/module/front/usecase/info/noticeUI/getNoticesUI/adapters/web/GetNoticesUIController.java b/front/src/main/java/app/module/front/usecase/info/noticeUI/getNoticesUI/adapters/web/GetNoticesUIController.java index 47ce01df..ed76cc5d 100644 --- a/front/src/main/java/app/module/front/usecase/info/noticeUI/getNoticesUI/adapters/web/GetNoticesUIController.java +++ b/front/src/main/java/app/module/front/usecase/info/noticeUI/getNoticesUI/adapters/web/GetNoticesUIController.java @@ -20,7 +20,7 @@ class GetNoticesUIController { private final GetNoticesPortIn getNoticesPortIn; @GetMapping(path = "/info/notice") - String operate(Model model, @PageableDefault(sort = "createdAt", direction = Sort.Direction.DESC, page = 0, size = 5) Pageable pageable + String operate(Model model, @PageableDefault(sort = "createdAt", direction = Sort.Direction.DESC, page = 0, size = 10) Pageable pageable , GetNoticesReqVO reqVO) { reqVO.setSearchOpen("true");