From b4bc2d6a4ca5b0a0020b19e73952da77164cf036 Mon Sep 17 00:00:00 2001 From: sangminee <81500474+sangminee@users.noreply.github.com> Date: Mon, 26 Feb 2024 09:14:55 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EB=B0=B1=EC=97=94=EB=93=9C=20api=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EC=98=88=EC=99=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FIX] /api/v1 추가 * [FEAT] cors 에러 추가 * [FIX] 예외처리 추가 * [CHORE] /api/v1 추가 * [CHORE] 사업체 리스트에 사업자등록번호 추가 * [CHORE] 사용자 리스트 -> 최신순 정렬 추가 * [CHORE] 토큰 기간 변경 --- .../community/service/CommunityService.java | 1 + .../oya/kr/global/config/WebCorsConfig.java | 20 +++++++++++++++++++ .../config/security/SecurityConfig.java | 2 +- .../security/TokenAuthenticationFilter.java | 4 ++-- .../com/oya/kr/global/jwt/TokenProvider.java | 4 ++-- .../kr/user/controller/KaKaoController.java | 2 ++ .../kr/user/controller/UserController.java | 3 ++- .../dto/response/BusinessUserResponse.java | 2 ++ .../dto/response/BusinessMapperResponse.java | 4 +++- .../com/oya/kr/user/mapper/UserMapper.xml | 7 +++++-- 10 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/oya/kr/global/config/WebCorsConfig.java diff --git a/src/main/java/com/oya/kr/community/service/CommunityService.java b/src/main/java/com/oya/kr/community/service/CommunityService.java index c30f7d2..0314357 100644 --- a/src/main/java/com/oya/kr/community/service/CommunityService.java +++ b/src/main/java/com/oya/kr/community/service/CommunityService.java @@ -173,6 +173,7 @@ private CommunityResponse mapToCommunityResponses(User loginUser, List> login(@RequestBody * @since 2024.02.13 */ @PostMapping("/users/reissue") - public ResponseEntity> reissue(Principal principal) { + public ResponseEntity> reissue(Principal principal, @RequestBody AccessTokenRequest accessToken) { return ResponseEntity.ok(ApplicationResponse.success(userService.reissueAccessToken(principal.getName(), getAccessToken()))); } diff --git a/src/main/java/com/oya/kr/user/controller/dto/response/BusinessUserResponse.java b/src/main/java/com/oya/kr/user/controller/dto/response/BusinessUserResponse.java index 3004a28..2058f0d 100644 --- a/src/main/java/com/oya/kr/user/controller/dto/response/BusinessUserResponse.java +++ b/src/main/java/com/oya/kr/user/controller/dto/response/BusinessUserResponse.java @@ -9,6 +9,7 @@ public class BusinessUserResponse extends BasicUserResponse{ private final Long businessId; + private final String businessRegistrationNumber; private final String nameOfCompany; // 상호 private final String nameOfRepresentative; // 대표자 private final String dateOfBusinessCommencement; // 개업일 @@ -33,5 +34,6 @@ public BusinessUserResponse(BusinessMapperResponse businessMapperResponse){ this.businessAddress = businessMapperResponse.getBusinessAddress(); this.planCount = businessMapperResponse.getPlanCount(); this.popupCount = businessMapperResponse.getPopupCount(); + this.businessRegistrationNumber = businessMapperResponse.getBusinessRegistrationNumber(); } } diff --git a/src/main/java/com/oya/kr/user/mapper/dto/response/BusinessMapperResponse.java b/src/main/java/com/oya/kr/user/mapper/dto/response/BusinessMapperResponse.java index a5f2ddf..3e150aa 100644 --- a/src/main/java/com/oya/kr/user/mapper/dto/response/BusinessMapperResponse.java +++ b/src/main/java/com/oya/kr/user/mapper/dto/response/BusinessMapperResponse.java @@ -18,6 +18,7 @@ public class BusinessMapperResponse extends BasicMapperResponse{ private final String faxNumber; private final String zipCode; private final String businessAddress; // 사업장 소재지 + private final String businessRegistrationNumber; private final int planCount; private final int popupCount; @@ -26,7 +27,7 @@ public BusinessMapperResponse(Long userId, String nickname, String email, LocalD String registrationType, String userType, String profileUrl, LocalDateTime userCreatedDate, LocalDateTime userModifiedDate, boolean userDeleted, int communityCount, Long businessId, String nameOfCompany, String nameOfRepresentative, LocalDate dateOfBusinessCommencement, String businessItem, String connectedNumber, - String faxNumber, String zipCode, String businessAddress, int planCount, int popupCount) { + String faxNumber, String zipCode, String businessAddress, int planCount, int popupCount, String businessRegistrationNumber) { super(userId, nickname, email, birthDate, gender, registrationType, userType, profileUrl, userCreatedDate, userModifiedDate, userDeleted, communityCount); this.businessId = businessId; @@ -40,5 +41,6 @@ public BusinessMapperResponse(Long userId, String nickname, String email, LocalD this.businessAddress = businessAddress; this.planCount = planCount; this.popupCount = popupCount; + this.businessRegistrationNumber = businessRegistrationNumber; } } diff --git a/src/main/resources/com/oya/kr/user/mapper/UserMapper.xml b/src/main/resources/com/oya/kr/user/mapper/UserMapper.xml index 4f51a6a..1e266bb 100644 --- a/src/main/resources/com/oya/kr/user/mapper/UserMapper.xml +++ b/src/main/resources/com/oya/kr/user/mapper/UserMapper.xml @@ -123,6 +123,7 @@ +