Merge branch 'dev' into deploy-dev-front

This commit is contained in:
주수현
2025-07-15 16:38:10 +09:00
6 changed files with 13 additions and 10 deletions

View File

@@ -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 {

View File

@@ -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");

View File

@@ -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(),

View File

@@ -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);

View File

@@ -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();
}
}
</script>

View File

@@ -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';
});