Skip to content

Commit d468f05

Browse files
20HyeonsuLeeHyeonsuLeeChoi-JJunhoChoon0414YunYongWoon
authored
develop -> main Merge (#652)
* fix: dto @NotNull 어노테이션 추가 * fix: 테스트코드 수정 * fix : 품절 알림 문구 점(.) 삭제 (#599) * fix : 품절 알림 문구 점 삭제 * fix : 품절 알림 문구 점 삭제 * feat : put /admin/members/{id} api 추가 (#595) * feat : put /admin/members/{id} api 추가 * fix: trackName 체크 메서드 생성 * fix: track 변경 체크 로직 및 track 수정 로직 수정 * �feat: 버스 필터링 (#586) * feat: 노선 정보 캐싱 - 정류장을 지나는 노선 정보들 캐싱 * refactor: 필터링 위치 변경 - 버스 시간 조회시 필터링 * feat: 크롤링 추가 * feat: 테스트 추가 * refactor: 피드백 반영 * chore: 주석 추가 * refactor: 피드백 반영 - save -> saveAll로 변경 * feat : 학생, 사장님, 영양사 로그인 분기처리 (#563) * feat : 사장님 / 영양사 로그인 분기 처리 추가 * chore : StudentUpdateResponse의 gender 검증 변수 제거 * feat : 테스트 추가 * feat: 가입 신청한 사장님 페이지네이션 조회(어드민계정) (#539) * feat: 응답객체 생성 * feat: controller 생성 * refactor: 접근제어 변경 * feat: 요청 모델앤뷰 dto * feat: 응답 객체 * feat: repository 생성 * feat: shop_id와 shop_name이 있는 owner객체 생성 * feat: service * feat: 테스트 추가 * fix: 필요없는 코드 제거 * refactor: required 관련 수정 * refactor: 컨벤션 적용 * refactor: 로직 수정 * refactor: 로직 수정 * refactor: AdminShopRepository 제거 * refactor: controller api 수정 * refactor: 충돌 해결 * refactor: 충돌 해결 * refactor: 주석 추가 * refactor: 빌더 삭제 및 코드 개선 * refactor: 요청dto requiredMode 전부 적용 * refactor: 빌더 생성 * refactor: Enum위치 변경 및 빌더 삭제 * refactor: controller api implement 추가 * refactor: dto 메서드 스웨거에서 숨기기 * feat: POST /admin/members API 추가 (#541) * feat: POST /admin/members API 추가 * fix: @Auth 추가 및 테스트 수정 * chore: 공백 제거 * refactor: GET /shops api 성능최적화 (#549) * feat: swwagger 인증번호 발송 관련 api명세 추가 * feat: 마크업으로 변경 * feat: 레디스 캐싱 * feat: save메소드 추가 * feat: 캐시가 없으면 캐시에 데이터를 올린다 * refactor: 필요없는 설정 정리 * feat: 리뷰반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat: 상점 사장님 휴대폰번호로 회원가입 api작성 (#564) * feat: 상점 사장님 휴대폰번호로 회원가입 api작성 * feat: 스웨거 이슈로 길어져버린 dto이름ㅠ * feat: 리뷰 반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * 버스 openApi 에러 수정 (#565) * fix: openApi scheduled에서 try catch * fix: Exception catch로 변경 * chore : 사장님 로그인 api 작성 * feat : 로그인 API(학생, 사장님, 영양사) 분리 * chore : UserFixture 원경_사장님 수정 * chore : UserFixture 중복 사항 제거 * chore : UserFixture 오류 수정 * chore : 리뷰 반영(메소드 이름 변경) * chore : 리뷰 반영(전화번호 숨김 및 이메일 형식 삭제) * chore : 리뷰 반영(메소드 위치 변경 및 Response userType 삭제) * chore : 사장님 로그인 테스트 위치 변경 * feat : flyway 추가 * feat : 영양사 테이블 추가 및 로그인 로직 수정 * feat : 사장님 테이블 컬럼 추가 및 로그인 로직 수정 * test : 테스트 코드 수정 * test : 테스트 오류 수정을 위한 기존 request 수정 * chore : 리뷰 반영(이메일 형식 확인 삭제) * chore : flyway 변경(V16 수정 및 V18 추가) * chore : User email @NotNull 제거(email null 허용) * chore : Owner 핸드폰 회원가입 email null 값 허용 * chore : Test 수정 및 User email @column(nullable = false) 제거 * chore : 전화번호 관련 로직 "01000000000" 로 수정 및 테스트 수정 * test : Admin User 테스트 수정 --------- Co-authored-by: 김원경 <148550522+kwoo28@users.noreply.github.com> Co-authored-by: YunYongWoon <46861704+YunYongWoon@users.noreply.github.com> Co-authored-by: Hyeonsu Lee <127578418+20HyeonsuLee@users.noreply.github.com> Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> Co-authored-by: 허준기 <112807640+dradnats1012@users.noreply.github.com> * hotfix: 비밀번호 검증 api 비밀번호 틀렸을시에 400 반환하는 것으로 수정(develop) (#607) * fix : notification FK 회원 삭제 오류 수정 (#514) * fix : notification/notification_subscribe DELETE CASCADE로 변경 * chore : Front 요청으로 인한 회원가입 에러코드 409 추가 * chore : DB 생략 * fix: 에러 반환값 수정 (#517) * hotfix: 학생 회원 가입 시에 전화번호 형식 추가 허용 (#530) * chore: 회원가입 전화번호 형식 추가 허용 * chore: 전화번호 가운데 세자리도 되게 허용 * chore: 비밀번호 틀렸을시에 400 반환하는 것으로 수정 * chore: swagger 400 추가 --------- Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> Co-authored-by: 최준호 <junho5336@gmail.com> Co-authored-by: 송선권 <songsunkook@gmail.com> * feat: POST /admin/members/{id}/undelete API 추가 (#600) * feat: Admin BCSDLab 트랙 API 구현 (#606) * feat: 기술스택 삭제 기능 구현 * test: admin으로 기술스택 제거 테스트 추가 * feat: admin 단일 트랙 조회 기능 추가 * test: admin으로 트랙 정보 단건 조회 테스트 추가 * feat: admin으로 트랙 생성 기능 추가 * test: admin으로 트랙 정보 생성 테스트 추가 * �feat: 버스 필터링 (#586) * feat: 노선 정보 캐싱 - 정류장을 지나는 노선 정보들 캐싱 * refactor: 필터링 위치 변경 - 버스 시간 조회시 필터링 * feat: 크롤링 추가 * feat: 테스트 추가 * refactor: 피드백 반영 * chore: 주석 추가 * refactor: 피드백 반영 - save -> saveAll로 변경 * feat : 학생, 사장님, 영양사 로그인 분기처리 (#563) * feat : 사장님 / 영양사 로그인 분기 처리 추가 * chore : StudentUpdateResponse의 gender 검증 변수 제거 * feat : 테스트 추가 * feat: 가입 신청한 사장님 페이지네이션 조회(어드민계정) (#539) * feat: 응답객체 생성 * feat: controller 생성 * refactor: 접근제어 변경 * feat: 요청 모델앤뷰 dto * feat: 응답 객체 * feat: repository 생성 * feat: shop_id와 shop_name이 있는 owner객체 생성 * feat: service * feat: 테스트 추가 * fix: 필요없는 코드 제거 * refactor: required 관련 수정 * refactor: 컨벤션 적용 * refactor: 로직 수정 * refactor: 로직 수정 * refactor: AdminShopRepository 제거 * refactor: controller api 수정 * refactor: 충돌 해결 * refactor: 충돌 해결 * refactor: 주석 추가 * refactor: 빌더 삭제 및 코드 개선 * refactor: 요청dto requiredMode 전부 적용 * refactor: 빌더 생성 * refactor: Enum위치 변경 및 빌더 삭제 * refactor: controller api implement 추가 * refactor: dto 메서드 스웨거에서 숨기기 * feat: POST /admin/members API 추가 (#541) * feat: POST /admin/members API 추가 * fix: @Auth 추가 및 테스트 수정 * chore: 공백 제거 * refactor: GET /shops api 성능최적화 (#549) * feat: swwagger 인증번호 발송 관련 api명세 추가 * feat: 마크업으로 변경 * feat: 레디스 캐싱 * feat: save메소드 추가 * feat: 캐시가 없으면 캐시에 데이터를 올린다 * refactor: 필요없는 설정 정리 * feat: 리뷰반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat: 상점 사장님 휴대폰번호로 회원가입 api작성 (#564) * feat: 상점 사장님 휴대폰번호로 회원가입 api작성 * feat: 스웨거 이슈로 길어져버린 dto이름ㅠ * feat: 리뷰 반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * 버스 openApi 에러 수정 (#565) * fix: openApi scheduled에서 try catch * fix: Exception catch로 변경 * chore : 사장님 로그인 api 작성 * feat : 로그인 API(학생, 사장님, 영양사) 분리 * chore : UserFixture 원경_사장님 수정 * chore : UserFixture 중복 사항 제거 * chore : UserFixture 오류 수정 * chore : 리뷰 반영(메소드 이름 변경) * chore : 리뷰 반영(전화번호 숨김 및 이메일 형식 삭제) * chore : 리뷰 반영(메소드 위치 변경 및 Response userType 삭제) * chore : 사장님 로그인 테스트 위치 변경 * feat : flyway 추가 * feat : 영양사 테이블 추가 및 로그인 로직 수정 * feat : 사장님 테이블 컬럼 추가 및 로그인 로직 수정 * test : 테스트 코드 수정 * test : 테스트 오류 수정을 위한 기존 request 수정 * chore : 리뷰 반영(이메일 형식 확인 삭제) * chore : flyway 변경(V16 수정 및 V18 추가) * chore : User email @NotNull 제거(email null 허용) * chore : Owner 핸드폰 회원가입 email null 값 허용 * chore : Test 수정 및 User email @column(nullable = false) 제거 * chore : 전화번호 관련 로직 "01000000000" 로 수정 및 테스트 수정 * test : Admin User 테스트 수정 --------- Co-authored-by: 김원경 <148550522+kwoo28@users.noreply.github.com> Co-authored-by: YunYongWoon <46861704+YunYongWoon@users.noreply.github.com> Co-authored-by: Hyeonsu Lee <127578418+20HyeonsuLee@users.noreply.github.com> Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> Co-authored-by: 허준기 <112807640+dradnats1012@users.noreply.github.com> * feat: admin으로 트랙 수정 기능 추가 * fix: legacy request의 불필요한 id 값 제거 * feat: 트랙명 중복 예외처리 추가 * test: admin 트랙 생성, 수정 중복 트랙명 예외 테스트 추가 * test: admin 트랙 수정 테스트 추가 * feat: admin으로 트랙 삭제 기능 추가 * test: admin 트랙 삭제 테스트 추가 * chore: 1차 피드백 반영 --------- Co-authored-by: 박성빈 <46699595+ImTotem@users.noreply.github.com> Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> Co-authored-by: 김원경 <148550522+kwoo28@users.noreply.github.com> Co-authored-by: YunYongWoon <46861704+YunYongWoon@users.noreply.github.com> Co-authored-by: Hyeonsu Lee <127578418+20HyeonsuLee@users.noreply.github.com> Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> Co-authored-by: 허준기 <112807640+dradnats1012@users.noreply.github.com> * Feature: 어드민 복덕방 삭제 (#612) * feat: AdminLandApi 구현 * feat: AdminLandController * feat: AdminLandRepository * feat: AdminLandService * feat: Land * refactor: Admin권한 추가 * feat: 복덕방 삭제 테스트 코드 추가 * refactor: 복덕방 삭제 테스트 공백 추가 --------- Co-authored-by: Jang Jun Young <police0022@naver.com> * refactor: 호환성 유지하기 위한 오너 회원가입 휴대폰번호 양식 롤백 (#614) * refactor: 회원가입 휴대폰번호 양식 롤백 * refactor: 오너 회원가입 휴대폰번호 양식 테스트코드 롤백 * refactor: 리뷰 반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat : coop_id 관련 flyway 추가 (#618) * feat : coop_id 관련 flyway 추가 * chore : 리뷰 반영(flyway 분리) * refactor: 시내버스 정류장 불일치 해결 (#601) * fix: 시내버스 노선 캐시 저장 로직 수정 * refactor: 정류장 추가 * refactor: 정류장 조회 로직 수정 * refactor: 테스트 수정 * fix : 품절 알림 처리 순서 수정 (#611) * fix : 품절 캐시 저장, 알림 발송 순서 수정 * fix : dining 응답 0 -> null 반환으로 수정 * refactor: sms회원가입 redis초기화 로직 변경 (#622) * refactor: sms회원가입 redi초기화 로직 변경 * refactor: eventListener 메소드 이름 변경 * refactor: 테스트 코드 변경 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * fix: 상점 수정, 삭제시 운영 요일 형식 검증 (#624) * feat: 상점 운영시간 요일 형식 검증 추가 * feat: Inner Record에 @Valid추가 * refactor: 필요없는 어노테이션 삭제 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat: 사업자번호, 아이디 중복검증 추가 (#610) * feat: 사업자등록번호 검증 추가 * feat: 전화번호 중복 검증 추가 * refactor: 전화번호 중복 사장님으로 이관 * refactor: phone_number -> account * test: 테스트 수정 * refactor: check -> exists * fix : Kcal가 null 일 경우 0을 반환하도록 롤백 (#626) * fix: CityBusRoute 저장시 null 제외 추가 (#629) * feat: 어드민권한 상점 관련 api작성 (#619) * feat: 컨트롤러 작성 * feat: 상점 메뉴관련 조회 api 구현 * feat: 상점 메뉴관련 조회 api 구현 2 * feat: 특정 상점 메뉴 조회 테스트코드 작성 * feat: 테스트코드 작성 * feat: 테스트코드 작성 * refactor: 불필요한 공백 제거 * refactor: 리뷰 반영 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat: 어드민 복덕방 조회,수정,삭제취소 (#631) * feat: 복덕방 조회 컨트롤러 구현 * feat: 복덕방 조회 서비스 구현 * feat: 복덕방 조회 테스트 구현 * feat: 복덕방 수정,삭제취소 구현 * feat: 복덕방 수정,삭제취소 서비스 구현 * refactor: land 모델 수정 * refactor: land 테스트 케이스 추가 * refactor: 어드민 dto 수정 * feat: 어드민 수정, 삭제취소 테스트 구현 * refactor: 라인 포맷팅 * refactor: 테스트 코드 수정 * refactor: dto반환형식 변경 * refactor: 라인포맷팅 --------- Co-authored-by: Jang Jun Young <police0022@naver.com> * feat: 어드민 82~86,89,90,93~95 (#621) * feat: 컨트롤러 구현 * feat: 사장님 인증권한 허용 * feat: 사장님 인증권한 허용 * feat: 테스트 추가 * feat: 테스트 import문 사용 * feat: 학생 리스트 조회 구현 * feat: 어드민 특정 사장님 수정 * feat: 어드민 사장님 페이지네이션 * feat: 어드민 회원 삭제 * feat: 어드민 로그인 구현 * feat: 어드민 로그아웃 구현 * feat: 어드민 리프레쉬 구현 * feat: 어드민 회원 조회 * fix: 페이지네이션 오류 수정 * test: 테스트 구현 * test: 나머지 모든 테스트 구현 * chore: 개행 처리 * chore: 개행 처리 * chore: 개행 처리 * chore: 이상한 설명 수정 * feat: ModelAttribute 파라미터로 전달되게 변경 * refactor: 사장님 인증 shop에 owner_id 할당되게 변경 * feat: 회원 탈퇴 취소 API 구현 * refactor: 83~86 충돌 수정 * refactor: 사장님인증 후 OwnerShop redis삭제 추가 * refactor: 사장님인증 테스트 수정 * refactor: AdminStudentResponse 메서드 of -> from 변경 * refactor: shopId null체크 * refactor: GrantShop 로직 수정, 로그인 save()제거 * refactor: 응답객체 수정 * refactor: 충돌 수정 * refactor: 충돌 수정 * refactor: 테스트 수정 * refactor: 응답반환수정 --------- Co-authored-by: seongjae6751 <seongjae6751@naver.com> * feat: 어드민권한 상점, 카테고리 api작성 (#627) * fix : notification FK 회원 삭제 오류 수정 (#514) * fix : notification/notification_subscribe DELETE CASCADE로 변경 * chore : Front 요청으로 인한 회원가입 에러코드 409 추가 * chore : DB 생략 * fix: 에러 반환값 수정 (#517) * hotfix: 학생 회원 가입 시에 전화번호 형식 추가 허용 (#530) * chore: 회원가입 전화번호 형식 추가 허용 * chore: 전화번호 가운데 세자리도 되게 허용 * chore: 비밀번호 틀렸을시에 400 반환하는 것으로 수정 (#605) * feat: controller 작성 * feat: service, repository 작성 * test: 어드민 shop, category 테스트 작성 * refactor: 1차 피드백 반영 * fix: 버그 수정 --------- Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> Co-authored-by: 최준호 <junho5336@gmail.com> Co-authored-by: 김성재 <103095432+seongjae6751@users.noreply.github.com> Co-authored-by: 송선권 <songsunkook@gmail.com> * refactor: ADMIN 권한 추가 (#638) * fix: 상점 생성,수정 / 메뉴 추가,수정 버그 해결 (#644) * feat: DTO수정 * feat: imageUrl이 null인경우를 위한 DTO 생성자 추가 * feat: 상점 운영시간 DTO validation 문구 추가 * feat: 상점 운영시간 DTO 개수 제한 수정 --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> * feat: new timetable api 구현 (#615) * feat: flyway 추가 * refactor: flyway 수정 * feat: timetable frame api 중 post, get, delete 구현 (#592) * feat : 기본 Model 및 Repository 생성 * chore : isMain 추가 * feat: timetablesFrame post, get delete 기능 구현 * chore: 겹치는 로직 수정 및 일부 버그 수정 * feat: 회원 탈퇴시 timetableframe 및 timetable 수동 삭제 * feat: 삭제 전 검증 로직 추가 * chore: api 오타 수정 * chore: frame 빌더 파라미터 추가 * chore: snakecase로 dto 변경 * feat: lecture repo 메서드 추가 * test: timetable v2 test 코드 작성 * chore: 오타 수정 * feat: 삭제되는 frame이 main일때 다른 frame을 main으로 설정 * chore: 개행 제거 * chore: 개행 추가 * chore: 어색한 말 수정 * chore: 오타 수정 * chore: 변수명 및 개행 수정 * chore: 피드백 반영 * chore: 메서드 명 변경 --------- Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> * feat: timetableFrame put, timetableLecture delete 구현 & reafactor: 기존 timetable delete, get 수정 (#594) * feat : 기본 Model 및 Repository 생성 * refactor: 기존 delete timetable 새로운 db와 연결 & v2 api 추가 * feat: tiemtable frame 수정 api 구현 * refactor: tiemtable frame 수정 api 반환값 dto 추가 * refactor: PUT timetable/frame에서 main으로 업데이트할 시 기존 main 테이블의 is_main을 false로 수정 * refactor: Get /timetables api 변경된 테이블 구조에 맞게 수정 * refactor: timeTable -> timetable로 변경 * refactor: deleteTimetableLecture() 유저 본인의 시간표에서 삭제하는지 검증 추가 * refactor: repository에서 main timetable을 가져오게 수정 * refactor: url 앞에 / 추가 & 기존에 없던 api url에 v2제거 * refactor: TimetableFrameUpdateRequest, TimetableFrameUpdateResponse에서 name Schema 수정 * refactor: TimetableFrameUpdateResponse에서 semester 대신 id를 반환하도록 수정 * refactor: timeTable -> timetable 이름 변경 * refactor: TimetableFrame에서 필요 없는 isMain()함수 제거 * refactor: LectureRepository에서 findByIdIn를 사용해 Lecture List를 가져오도록 수정 * refactor: TimetableLecture와 TimetableFrame에서 is_deleted=0으로 찾는 where 제거 * refactor: timetableFrame 수정 시 semester 변경 못하도록 수정 * fix: is_main 타입변경, snakecase적용되도록 수정 & test: timetableframe 수정 api, timetablelecture 삭제 api 테스트 작성 --------- Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> * feat: GET/semester/check수정 & POST/timetables수정 & POST/v2/timetables/lecture 추가 (#596) * feat : 기본 Model 및 Repository 생성 * chore : isMain 추가 * feat: 시간표 생성 수정 및 추가 * feat: 강의시간표 응답 수정 * feat: 코드 오류 수정 * feat: API 수정 * feat: pr 수정 * feat: repository semester타입 수정 * fear : flyway 추가 * fear : flyway 추가 * fear : Lecture id 반환 추가 * fear : PUT /timetables 수정 및 /v2/timetables 추가 * feat: getTimetables API 수정 * refactor: PR 리뷰 반영 * fear : 리뷰 반영 * refactor : 코드 리팩터링 * refactor: 충돌 수정 * refactor: 충돌 수정 * refactor: 로직 수정 및 학점추가 * refactor: 학점 계산 로직 수정 * refactor: 오류 수정 * refactor: 코드 수정 --------- Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> * refactor: flyway timetable_id -> frame_id 변경 * refactor: TimetableFrame에 @where(clause = is_deleted=0) 추가 * refactor: frame api의 url에 v2추가 * refactor: TimetableLectures create,update 문에 user 인증 추가 * refactor : TimetableUpdate에 id가 null인 경우 삭제 * refactor: swagger 수정 * refactor: v2 패키지로 이동 * fix: v2 api 이름에 v2 추가 * chore : 리뷰 반영(Repo 미사용 메소드 삭제) * chore : 리뷰 반영(isMain boolean으로 수정) * chore : 리뷰 반영(변수 추가 및 getIsMain() -> isMain() 수정) * chore : 리뷰 반영 * refactor: createTimetablesFrame에서 main 시간표 count 시 0부터 세도록 수정 * fix: createTimetablesFrame에서 이름 생성할 때 카운트 +1하도록 수정 * fix: createTimetablesFrame에서 카운트 +1할 때 괄호 추가 --------- Co-authored-by: kwoo28 <148550522+kwoo28@users.noreply.github.com> Co-authored-by: 김성재 <103095432+seongjae6751@users.noreply.github.com> Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> * fix : flyway 버저닝 충돌 해결 (#646) * fix : 롤백 이후 flyway 오류 수정(timetable_id -> frame_id) (#648) * refactor: internalName 필수요구 제거 (#650) Co-authored-by: Jang Jun Young <police0022@naver.com> --------- Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com> Co-authored-by: 최준호 <junho5336@gmail.com> Co-authored-by: Hwang HyeonSik <142300831+Choon0414@users.noreply.github.com> Co-authored-by: YunYongWoon <46861704+YunYongWoon@users.noreply.github.com> Co-authored-by: 박성빈 <46699595+ImTotem@users.noreply.github.com> Co-authored-by: duehee <149302959+duehee@users.noreply.github.com> Co-authored-by: 김원경 <148550522+kwoo28@users.noreply.github.com> Co-authored-by: 허준기 <112807640+dradnats1012@users.noreply.github.com> Co-authored-by: 김성재 <103095432+seongjae6751@users.noreply.github.com> Co-authored-by: 송선권 <songsunkook@gmail.com> Co-authored-by: 배진호 <72592302+BaeJinho4028@users.noreply.github.com> Co-authored-by: Jang-JunYoung <79901434+johnny19991006@users.noreply.github.com> Co-authored-by: Jang Jun Young <police0022@naver.com> Co-authored-by: seongjae6751 <seongjae6751@naver.com> Co-authored-by: Dahee Park <106418303+daheeParkk@users.noreply.github.com>
1 parent 68c09aa commit d468f05

File tree

204 files changed

+10046
-767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+10046
-767
lines changed

src/main/java/in/koreatech/koin/admin/land/controller/AdminLandApi.java

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
import static in.koreatech.koin.domain.user.model.UserType.ADMIN;
44

55
import org.springframework.http.ResponseEntity;
6+
import org.springframework.web.bind.annotation.DeleteMapping;
67
import org.springframework.web.bind.annotation.GetMapping;
8+
import org.springframework.web.bind.annotation.PathVariable;
79
import org.springframework.web.bind.annotation.PostMapping;
10+
import org.springframework.web.bind.annotation.PutMapping;
811
import org.springframework.web.bind.annotation.RequestBody;
912
import org.springframework.web.bind.annotation.RequestParam;
1013

11-
import in.koreatech.koin.admin.land.dto.AdminLandsRequest;
14+
import in.koreatech.koin.admin.land.dto.AdminLandResponse;
15+
import in.koreatech.koin.admin.land.dto.AdminLandRequest;
1216
import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
1317

1418
import in.koreatech.koin.global.auth.Auth;
@@ -53,8 +57,72 @@ ResponseEntity<AdminLandsResponse> getLands(
5357
@SecurityRequirement(name = "Jwt Authentication")
5458
@PostMapping("/admin/lands")
5559
ResponseEntity<AdminLandsResponse> postLands(
56-
@RequestBody @Valid AdminLandsRequest adminLandsRequest,
60+
@RequestBody @Valid AdminLandRequest adminLandRequest,
5761
@Auth(permit = {ADMIN}) Integer adminId
5862
);
5963

64+
@ApiResponses(
65+
value = {
66+
@ApiResponse(responseCode = "201"),
67+
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
68+
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
69+
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
70+
}
71+
)
72+
@Operation(summary = "복덕방 삭제")
73+
@SecurityRequirement(name = "Jwt Authentication")
74+
@DeleteMapping("/admin/lands/{id}")
75+
ResponseEntity<Void> deleteLand(
76+
@PathVariable("id") Integer id,
77+
@Auth(permit = {ADMIN}) Integer adminId
78+
);
79+
80+
@ApiResponses(
81+
value = {
82+
@ApiResponse(responseCode = "200"),
83+
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
84+
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
85+
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
86+
}
87+
)
88+
@Operation(summary = "복덕방 조회")
89+
@SecurityRequirement(name = "Jwt Authentication")
90+
@GetMapping("/admin/lands/{id}")
91+
ResponseEntity<AdminLandResponse> getLand(
92+
@PathVariable("id") Integer id,
93+
@Auth(permit = {ADMIN}) Integer adminId
94+
);
95+
96+
@ApiResponses(
97+
value = {
98+
@ApiResponse(responseCode = "200"),
99+
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
100+
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
101+
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
102+
}
103+
)
104+
@Operation(summary = "복덕방 수정")
105+
@SecurityRequirement(name = "Jwt Authentication")
106+
@PutMapping("/admin/lands/{id}")
107+
ResponseEntity<Void> updateLand(
108+
@PathVariable("id") Integer id,
109+
@RequestBody @Valid AdminLandRequest request,
110+
@Auth(permit = {ADMIN}) Integer adminId
111+
);
112+
113+
@ApiResponses(
114+
value = {
115+
@ApiResponse(responseCode = "200"),
116+
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
117+
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
118+
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
119+
}
120+
)
121+
@Operation(summary = "복덕방 삭제 취소")
122+
@SecurityRequirement(name = "Jwt Authentication")
123+
@PostMapping("/admin/lands/{id}/undelete")
124+
ResponseEntity<Void> undeleteLand(
125+
@PathVariable("id") Integer id,
126+
@Auth(permit = {ADMIN}) Integer adminId
127+
);
60128
}

src/main/java/in/koreatech/koin/admin/land/controller/AdminLandController.java

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
import org.springframework.http.HttpStatus;
66
import org.springframework.http.ResponseEntity;
7+
import org.springframework.web.bind.annotation.DeleteMapping;
78
import org.springframework.web.bind.annotation.GetMapping;
9+
import org.springframework.web.bind.annotation.PathVariable;
810
import org.springframework.web.bind.annotation.PostMapping;
11+
import org.springframework.web.bind.annotation.PutMapping;
912
import org.springframework.web.bind.annotation.RequestBody;
1013
import org.springframework.web.bind.annotation.RequestParam;
1114
import org.springframework.web.bind.annotation.RestController;
1215

13-
import in.koreatech.koin.admin.land.dto.AdminLandsRequest;
16+
import in.koreatech.koin.admin.land.dto.AdminLandResponse;
17+
import in.koreatech.koin.admin.land.dto.AdminLandRequest;
1418
import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
1519
import in.koreatech.koin.admin.land.service.AdminLandService;
1620
import in.koreatech.koin.global.auth.Auth;
@@ -35,11 +39,47 @@ public ResponseEntity<AdminLandsResponse> getLands(
3539

3640
@PostMapping("/admin/lands")
3741
public ResponseEntity<AdminLandsResponse> postLands(
38-
@RequestBody @Valid AdminLandsRequest adminLandsRequest,
42+
@RequestBody @Valid AdminLandRequest adminLandRequest,
3943
@Auth(permit = {ADMIN}) Integer adminId
4044
) {
41-
adminLandService.createLands(adminLandsRequest);
45+
adminLandService.createLands(adminLandRequest);
4246
return ResponseEntity.status(HttpStatus.CREATED).build();
4347
}
4448

49+
@DeleteMapping("/admin/lands/{id}")
50+
public ResponseEntity<Void> deleteLand(
51+
@PathVariable("id") Integer id,
52+
@Auth(permit = {ADMIN}) Integer adminId
53+
) {
54+
adminLandService.deleteLand(id);
55+
return null;
56+
}
57+
58+
@GetMapping("/admin/lands/{id}")
59+
public ResponseEntity<AdminLandResponse> getLand(
60+
@PathVariable("id") Integer id,
61+
@Auth(permit = {ADMIN}) Integer adminId
62+
) {
63+
return ResponseEntity.ok().body(adminLandService.getLand(id));
64+
}
65+
66+
@PutMapping("/admin/lands/{id}")
67+
public ResponseEntity<Void> updateLand(
68+
@PathVariable("id") Integer id,
69+
@RequestBody @Valid AdminLandRequest request,
70+
@Auth(permit = {ADMIN}) Integer adminId
71+
) {
72+
adminLandService.updateLand(id, request);
73+
return ResponseEntity.ok().build();
74+
}
75+
76+
@PostMapping("/admin/lands/{id}/undelete")
77+
public ResponseEntity<Void> undeleteLand(
78+
@PathVariable("id") Integer id,
79+
@Auth(permit = {ADMIN}) Integer adminId
80+
) {
81+
adminLandService.undeleteLand(id);
82+
return ResponseEntity.ok().build();
83+
}
84+
4585
}

src/main/java/in/koreatech/koin/admin/land/dto/AdminLandsRequest.java renamed to src/main/java/in/koreatech/koin/admin/land/dto/AdminLandRequest.java

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package in.koreatech.koin.admin.land.dto;
22

3-
43
import java.util.List;
54

65
import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
@@ -17,29 +16,28 @@
1716
import jakarta.validation.constraints.Size;
1817

1918
@JsonNaming(SnakeCaseStrategy.class)
20-
public record AdminLandsRequest(
19+
public record AdminLandRequest(
2120
@Schema(description = "이름 - not null - 최대 255자", example = "금실타운", requiredMode = REQUIRED)
2221
@NotNull(message = "방이름은 필수입니다.")
2322
@Size(max = 255, message = "방이름의 최대 길이는 255자입니다.")
2423
String name,
2524

26-
@Schema(description = "이름 - not null - 최대 50자", example = "금실타운", requiredMode = REQUIRED)
27-
@NotNull(message = "방이름은 필수입니다.")
25+
@Schema(description = "이름 - not null - 최대 50자", example = "금실타운")
2826
@Size(max = 50, message = "방이름의 최대 길이는 50자입니다.")
2927
String internalName,
3028

3129
@Schema(description = "크기", example = "9.0")
32-
String size,
30+
double size,
3331

3432
@Schema(description = "종류 - 최대 20자", example = "원룸")
3533
@Size(max = 20, message = "방종류의 최대 길이는 20자입니다.")
3634
String roomType,
3735

3836
@Schema(description = "위도", example = "36.766205")
39-
String latitude,
37+
double latitude,
4038

4139
@Schema(description = "경도", example = "127.284638")
42-
String longitude,
40+
double longitude,
4341

4442
@Schema(description = "전화번호 - 정규식 `^[0-9]{3}-[0-9]{3,4}-[0-9]{4}$` 을 만족해야함", example = "041-111-1111")
4543
@Pattern(regexp = "^[0-9]{3}-[0-9]{3,4}-[0-9]{4}$", message = "전화번호의 형식이 올바르지 않습니다.")
@@ -101,16 +99,37 @@ public record AdminLandsRequest(
10199
boolean optAirConditioner,
102100

103101
@Schema(description = "샤워기 보유 여부 - null일경우 false로 요청됨", example = "true")
104-
boolean optWasher
102+
boolean optWasher,
103+
104+
@Schema(description = "침대 보유 여부", example = "false")
105+
boolean optBed,
106+
107+
@Schema(description = "책상 보유 여부", example = "true")
108+
boolean optDesk,
109+
110+
@Schema(description = "신발장 보유 여부", example = "true")
111+
boolean optShoeCloset,
112+
113+
@Schema(description = "전자 도어락 보유 여부", example = "true")
114+
boolean optElectronicDoorLocks,
115+
116+
@Schema(description = "비데 보유 여부", example = "false")
117+
boolean optBidet,
118+
119+
@Schema(description = "베란다 보유 여부", example = "false")
120+
boolean optVeranda,
121+
122+
@Schema(description = "엘리베이터 보유 여부", example = "true")
123+
boolean optElevator
105124
) {
106125
public Land toLand() {
107126
return Land.builder()
108127
.name(name)
109128
.internalName(internalName)
110-
.size(size)
129+
.size(String.valueOf(size))
111130
.roomType(roomType)
112-
.latitude(latitude)
113-
.longitude(longitude)
131+
.latitude(String.valueOf(latitude))
132+
.longitude(String.valueOf(longitude))
114133
.phone(phone)
115134
.imageUrls(imageUrls)
116135
.address(address)
@@ -129,6 +148,13 @@ public Land toLand() {
129148
.optWaterPurifier(optWaterPurifier)
130149
.optAirConditioner(optAirConditioner)
131150
.optWasher(optWasher)
151+
.optBed(optBed)
152+
.optDesk(optDesk)
153+
.optShoeCloset(optShoeCloset)
154+
.optElectronicDoorLocks(optElectronicDoorLocks)
155+
.optBidet(optBidet)
156+
.optVeranda(optVeranda)
157+
.optElevator(optElevator)
132158
.build();
133159
}
134160
}

0 commit comments

Comments
 (0)