Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
e491214
test: TestContainer 적용 (#27)
Choi-JJunho Dec 18, 2023
6166be2
feat: POST /user/login API 구현 (#50)
Choi-JJunho Dec 21, 2023
448cbf9
feat: 상점 메뉴 조회 API 구현 (#112)
Invidam Dec 24, 2023
71f8ee2
refactor: 전체 패키지 구조 변경 (#114)
Invidam Dec 29, 2023
f8dc249
feat: GET /lands API 구현 (#148)
daheeParkk Jan 4, 2024
e421d9a
feat: 사용자 인증 구현 (#149)
Choi-JJunho Jan 5, 2024
45c99ad
feat: GET /dept, GET /depts 구현 (#147)
songsunkook Jan 7, 2024
9b8e47a
feat: logout 구현 (#154)
Choi-JJunho Jan 10, 2024
680fcb6
feat: accessToken 재발급 (#155)
Choi-JJunho Jan 15, 2024
418810a
feat: 게시글 목록 조회 구현 (#158)
songsunkook Jan 15, 2024
1130bfb
feat: 메뉴 카테고리 목록 조회 (#153)
Invidam Jan 16, 2024
d969487
feat: 복덕방 단일 조회 (#156)
daheeParkk Jan 17, 2024
6005aaa
refactor: findByXXX -> getByXXX (#164)
Choi-JJunho Jan 19, 2024
1e85bf8
feat: 게시글 단일 조회 (#173)
songsunkook Jan 30, 2024
8d5c292
refactor: Auth 어노테이션 활용하도록 변경 (#175)
Choi-JJunho Feb 2, 2024
896eefc
docs: add swagger config (#176)
Choi-JJunho Feb 4, 2024
db515ea
feat: 버전 단일 조회 (#168)
xhdtn8070 Feb 8, 2024
bb2ccbd
feat: 회원 탈퇴 구현 (#178)
Choi-JJunho Feb 11, 2024
cb86bce
feat: 인기 게시글 목록 조회 (#181)
songsunkook Feb 13, 2024
7a178d5
feat: 사장님 정보 조회 (#182)
songsunkook Feb 13, 2024
6f5581f
feat: 사장님 자신의 모든 상점 조회 (#183)
songsunkook Feb 19, 2024
801516b
feat: 사장님 회원가입 인증번호 전송 요청 (#184)
daheeParkk Mar 11, 2024
b367a8d
fix: 버전 매핑 에러 수정 (#191)
songsunkook Mar 11, 2024
f66c5ea
feat: 이메일 중복 체크 (#194)
ImTotem Mar 13, 2024
eab1415
feat : 강의 목록 조회(학기별) (#192)
dradnats1012 Mar 13, 2024
95f4b96
feat: 버스 남은 시간 조회 - 셔틀버스, 등하교 버스 (#185)
songsunkook Mar 13, 2024
ce38489
feat : 학기 조회(전학기) (#196)
duehee Mar 14, 2024
bd72d80
feat : 사장님 식당 생성, 특정 상점 조회 API구현 (#199)
20HyeonsuLee Mar 14, 2024
ebae787
feat: 닉네임 중복 체크 (#189)
kwoo28 Mar 15, 2024
e2c03a8
feat : 식단 Api 구현 (#193)
Choon0414 Mar 19, 2024
d8285b0
feat : 특정상점 전체메뉴조회 api작성 (#208)
20HyeonsuLee Mar 19, 2024
3c3d47e
feat : BCSD Lab 활동 api구현 (#207)
seongjae6751 Mar 20, 2024
0a02e48
feat: Presigned URL 구현 (#210)
Choi-JJunho Mar 20, 2024
b18fc96
refactor: passwordEncoder 활용하도록 수정 (#211)
Choi-JJunho Mar 20, 2024
b792ce9
fix: 특정 상점 전체메뉴조회 응답 객체 미스매치 수정 (#214)
20HyeonsuLee Mar 20, 2024
f18d8e4
feat: 시간표 기능 구현 (#212)
kwoo28 Mar 21, 2024
dcb6069
feat: 파일 단건 업로드 구현 (#227)
Choi-JJunho Mar 21, 2024
910fd65
feat: 파일 다중 업로드 구현 (#229)
Choi-JJunho Mar 21, 2024
e693b98
feat: 영양사 권한 추가 (#231)
songsunkook Mar 22, 2024
a545fdb
fix: 복덕방 전제 조회 응답 객체 미스매치 수정 (#215)
seongjae6751 Mar 22, 2024
ce5a37d
feat: FCM 설정 (#232)
Choi-JJunho Mar 23, 2024
5f665b2
refactor: 상점 Entity 연관관계 설정 (#237)
20HyeonsuLee Mar 25, 2024
8d231ab
feat: 상점사장님이 특정 상점을 조회하는 api작성 (#240)
20HyeonsuLee Mar 26, 2024
ae3c846
feat : 영양사 품절 정보 입력 (#238)
dradnats1012 Mar 26, 2024
127514c
feat : 영양사 코너별 식단 사진 업로드 (#241)
Choon0414 Mar 27, 2024
11fec17
feat: 사장님 회원가입 (#244)
Choi-JJunho Mar 27, 2024
6417b45
feature: 상점 사장님 관련 모든 GET API를 작성했습니다. (#245)
20HyeonsuLee Mar 28, 2024
2bf5315
fix: 게시판 공지사항 판단 로직 수정 (#246)
songsunkook Mar 28, 2024
9960595
feat: 사장님 인증코드 검증 (#248)
Choi-JJunho Mar 28, 2024
2c30a58
fix: 전공별 커리큘럼 링크 수정, 새로운 과 추가 (#251)
seongjae6751 Mar 28, 2024
3494822
feat: 사장님 비밀번호 재발급 구현 (#253)
Choi-JJunho Mar 29, 2024
0751eb7
feat : 회원 정보 수정 (#236)
duehee Mar 30, 2024
1d42aa1
fix: 학기 최신 순으로 반환 (#268)
seongjae6751 Mar 30, 2024
0a5abbf
feat : 알림 구독 Api 구현 (#269)
Choon0414 Apr 1, 2024
f8458cc
feat: 메뉴 변경 여부 추가 (#250)
ImTotem Apr 1, 2024
3e149c2
Revert "feat: 메뉴 변경 여부 추가 (#250)" (#273)
Choi-JJunho Apr 1, 2024
a358943
refactor: 메뉴 변경 여부 컬럼명 통일 (#274)
ImTotem Apr 1, 2024
903b384
feat: 버스 남은 시간 조회 - 시내버스 (#239)
ImTotem Apr 1, 2024
4aa038e
feature: 상점 사장님 관련 추가, 수정, 삭제 / 일반유저 모든 상점 조회 api작성 (#270)
20HyeonsuLee Apr 1, 2024
ede80d6
feat: spring actuator 추가 (#276)
johnny19991006 Apr 1, 2024
1cd6a15
fix: 상점 생성 서버에러(@Valid 추가) (#281)
20HyeonsuLee Apr 2, 2024
f434101
refactor: 조회 방식 수정 (#284)
Choi-JJunho Apr 2, 2024
3146ab9
feat: 상점 모든 카테고리 조회 api작성 (#282)
20HyeonsuLee Apr 2, 2024
d050c4f
fix: student Entity 필드 수정 (#286)
Choi-JJunho Apr 2, 2024
986b1c2
refactor: 로그아웃, 탈퇴에 대한 권한 수정 (#288)
Choi-JJunho Apr 2, 2024
b916afe
refactor: 이메일 인증 요청 dto 값 수정 (#290)
Choi-JJunho Apr 2, 2024
cc0fbe1
feat: lecture blank error (#293)
seongjae6751 Apr 2, 2024
5cdbb9c
fix: timetables 반환값 수정 (#294)
Choi-JJunho Apr 2, 2024
be88c5c
fix/291 get lecture blank error reopen (#296)
seongjae6751 Apr 2, 2024
873a6ff
feat: 가게 이벤트 정보 조회 (#298)
Choi-JJunho Apr 3, 2024
e5025be
feat: stage logback 적용 (#300)
Choi-JJunho Apr 3, 2024
c3cb4fe
feat: slack 알림 메시지 수정 (#306)
johnny19991006 Apr 4, 2024
c9ff61e
fix : userGender null 값 처리 추가 (#304)
duehee Apr 4, 2024
95ed29d
feat: get member (#311)
Choi-JJunho Apr 4, 2024
1fcf3d9
fix: 없는 상점 조회 시 예외 발생 (#313)
20HyeonsuLee Apr 4, 2024
f1c5279
fix: 연관관계 수정 (#315)
20HyeonsuLee Apr 4, 2024
08684e7
fix: 상점 사장님 회원가입 에러 수정 (#316)
20HyeonsuLee Apr 4, 2024
96a1957
Fix: bearerToken 추출 오류 수정 (#309)
kwoo28 Apr 5, 2024
fb3ca43
feat: is_event값 추가 (#302)
Choi-JJunho Apr 5, 2024
4933b42
feat: 시외버스 API 구현 (#317)
Choi-JJunho Apr 5, 2024
2c9e7a4
fix: 사장님 가게정보 수정 오류 (#319)
Choi-JJunho Apr 5, 2024
8885398
fix: menu 정보 수정 시에도 flush 추가 (#320)
Choi-JJunho Apr 5, 2024
926e3f3
refactor: 식단 품절, 변경 여부 (Boolean -> 시간)으로 변경 (#310)
ImTotem Apr 6, 2024
38a57c5
feat: 유저 권한 조회 API 작성 (#322)
songsunkook Apr 7, 2024
3a8b33f
refactor: 식단 조회 API DTO 필드명 변경 (#324)
songsunkook Apr 7, 2024
fbc51c9
fix: @Param추가 (#327)
20HyeonsuLee Apr 8, 2024
65db27d
feat: 학생 회원가입 (#271)
kwoo28 Apr 8, 2024
fbef5d0
feat: 신규상점 생성시 기본 카테고리 추가 (#331)
20HyeonsuLee Apr 8, 2024
65e7fbf
fix: AttributeConverter 오류 수정 (#335)
kwoo28 Apr 8, 2024
6df04f2
feat: FCM 발송방식 수정 (#333)
Choi-JJunho Apr 8, 2024
525a9e7
feat: isEvent 추가 (#337)
Choi-JJunho Apr 8, 2024
0806381
fix: shopId null일때 처리하기 (#341)
Choi-JJunho Apr 8, 2024
a64b66c
feat: 비밀번호 변경 로직 구현 (#342)
Choi-JJunho Apr 8, 2024
0957e31
fix : JsonProperty 삭제 (#345)
duehee Apr 8, 2024
830fe16
fix : Mixed Content 헤더 추가 (#347)
duehee Apr 8, 2024
2044f66
fix: attributeConverter milli second 길이가 두개인 경우도 반영 (#348)
seongjae6751 Apr 8, 2024
41f8c86
Fix: attribute converter 오류 수정 (#349)
kwoo28 Apr 8, 2024
a9848a6
fix : 삭제된 userGender null 로직 추가 (#357)
duehee Apr 9, 2024
3b67507
feat: 이벤트 추가, 수정, 삭제, 베너조회 api 작성 (#350)
20HyeonsuLee Apr 9, 2024
33c3132
fix: isAuthed 검증 추가 (#355)
Choi-JJunho Apr 9, 2024
fb381e2
Fix: 회원탈퇴 Hard Delete & 슬랙 알림 발송 (#352)
kwoo28 Apr 9, 2024
0fa2e80
feat: 회원 탈퇴시 유저타입 추가 (#360)
kwoo28 Apr 9, 2024
5266b51
fix: soft delete메뉴 조회시 서버에러 해결 (#366)
20HyeonsuLee Apr 9, 2024
117a995
feat : 버스 코스 조회 구현 (#358)
Choon0414 Apr 9, 2024
b7ca2d0
feat: 버스 검색 구현 (#353)
ImTotem Apr 9, 2024
a63b658
fix: 버스 노드 도착 시간이 시간이 아닌 경우 처리 (#328)
songsunkook Apr 10, 2024
cd19c5f
refactor: 예외형태 수정 (#374)
Choi-JJunho Apr 10, 2024
61c6fba
fix: 메뉴 삭제 시 연관 데이터 삭제 수정 (#368)
20HyeonsuLee Apr 10, 2024
22dc902
fix: jpa, schema 정합성 (#367)
Choi-JJunho Apr 10, 2024
7a9ffb9
fix: Repository 수정 (#377)
Choi-JJunho Apr 10, 2024
6abe411
fix: 매개변수 자료형 fix (#381)
songsunkook Apr 10, 2024
ab63fd0
feat: CORS 설정 추가 (#382)
Choi-JJunho Apr 10, 2024
48cea84
refactor: 비밀번호가 틀렸을 때 반환하는 메시지 간략화 (#383)
Choi-JJunho Apr 10, 2024
a29be69
refactor: 스웨거에 400에러 표시 (#385)
daheeParkk Apr 10, 2024
fa25f90
feat: 버스 시간표 불러오기 (#369)
dradnats1012 Apr 10, 2024
fe4b082
fix: flush 추가 및 unique 설정 (#386)
Choi-JJunho Apr 10, 2024
965b180
feat: 상점 이벤트 생성, 조회 기능 구현 (#387)
Choi-JJunho Apr 11, 2024
52bce24
feat: 사장님 가게 생성 시 알림 발송하도록 추가 (#389)
Choi-JJunho Apr 11, 2024
5308282
fix: 자료형 수정 (#393)
Choi-JJunho Apr 11, 2024
2245b32
fix: 사장님 이벤트 날짜조건 제거한 DTO 추가 (#395)
Choi-JJunho Apr 11, 2024
112c949
fix: 로그인에 권한 확인 로직 추가 (#397)
seongjae6751 Apr 11, 2024
f52c082
Fix: 사장님 회원탈퇴 오류 (#380)
kwoo28 Apr 11, 2024
d0ba3fb
feat : PUT user/student/me 현재 사용 닉네임 처리 로직 추가 (#391)
duehee Apr 11, 2024
8a58e0a
feat : depart json 네이밍 변경 (#402)
dradnats1012 Apr 11, 2024
65b7e65
fix: POST/user/refresh 반환코드 수정 (#399)
kwoo28 Apr 12, 2024
1f7a89e
fix: 건축, 기계, 메카 커리큘럼 링크 수정 (#404)
seongjae6751 Apr 12, 2024
f44a59e
feat: 영양사 정보 조회 (#407)
daheeParkk Apr 12, 2024
cfc178f
refactor: 메뉴, 메뉴카테고리 Soft Delete로 변경 (#417)
20HyeonsuLee Apr 15, 2024
6b0e5a4
docs: 스웨거 DTO 예시 수정 (#415)
songsunkook Apr 15, 2024
a595847
fix: 코인 인증 메일 폼 만료 시간 수정 (#414)
seongjae6751 Apr 15, 2024
4be0d9e
chore: dto 예시 및 설명 추가 (#419)
20HyeonsuLee Apr 15, 2024
2264927
feat : 품절 알림 발송 구현 (#372)
Choon0414 Apr 15, 2024
6717b98
refactor: 특정 알림 구독 인자 수정 및 예외처리 (#416)
songsunkook Apr 16, 2024
24fae5f
feat: 이벤트메뉴 -> 추천메뉴, 대표메뉴 -> 메인 메뉴 update flyway 추가 (#424)
20HyeonsuLee Apr 16, 2024
6452e4b
docs: Swagger 필수인자 명시 (#425)
Choi-JJunho Apr 16, 2024
5956f64
fix : 품절 알림 문구 수정 (#427)
Choon0414 Apr 16, 2024
211d0b9
feat: ClientAbortException handle (#430)
Choi-JJunho Apr 16, 2024
d524818
feature: 리프레시 토큰 만료 기한을 14일에서 20초로 변경 (#431)
seongjae6751 Apr 16, 2024
2802db8
feature: 리프레시 토큰 만료 기한 14일로 원상 복구 (#432)
seongjae6751 Apr 16, 2024
d01d077
fix: 사장님 이메일 중복요청시 재요청 시간제한 (#434)
Choi-JJunho Apr 17, 2024
b58ff78
fix: 상점 이벤트 알림을 구독한 유저에게만 알림을 보내도록 코드 변경 (#443)
20HyeonsuLee Apr 18, 2024
bff60c6
chore: 상점 설명 NotBlank에서 NotNull로 변경 (#436)
20HyeonsuLee Apr 18, 2024
480785b
feat: GET /admin/lands 기능 구현 (#438)
YunYongWoon Apr 18, 2024
d56911e
fix: 상점 이미지, 카테고리id중복되는 요소 입력 시 발생하는 에러 핸들링 (#448)
20HyeonsuLee Apr 19, 2024
38f3895
feat: 시간표 총 학점 조회 (#440)
kwoo28 Apr 20, 2024
1ed447d
Fix : 버스 남은시간 수정, 캐시만료로직 수정 (#454)
dradnats1012 Apr 21, 2024
f778f5e
feat : 버스 버저닝 V2 updated_at 추가 (#446)
Choon0414 Apr 21, 2024
aed2df0
fix: 시외버스 시간표 캐시확인로직 변경 (#457)
dradnats1012 Apr 21, 2024
e738c47
feat: 도커파일 추가 (#445)
johnny19991006 Apr 23, 2024
7397dcf
test: 테스트 리팩터링 (#458)
Choi-JJunho Apr 25, 2024
165f0b1
feat: 네이버 문자인증 구성 (#463)
20HyeonsuLee Apr 25, 2024
3865c28
refactor: dto 수정 (#464)
20HyeonsuLee Apr 25, 2024
191104f
fix: String -> Double (#466)
Choi-JJunho Apr 26, 2024
54b7f08
refactor: 사용자에게는 기본 메시지만 보이도록 예외 수정 (#460)
seongjae6751 Apr 26, 2024
2281e64
feat: 상점 사장님 문자인증 발송 시 slack알림 발송 (#473)
20HyeonsuLee Apr 27, 2024
46a3232
fix: DB의 상점 설명이 null인 경우 예외처리 (#476)
20HyeonsuLee Apr 27, 2024
5fe1a79
feat : 회원 정보 수정에 비밀번호 수정 추가 (#477)
duehee Apr 28, 2024
ea6260e
fix : kcal, menu nullable 여부 수정 (#480)
Choon0414 Apr 29, 2024
ec1ad7e
fix: 천안역에서 출발할 경우 Exception 발생 버그 수정 (#475)
ImTotem Apr 29, 2024
fd2b01f
feat: 상점 운영중 기준으로 정렬 및 is_event 필드 추가 (#479)
20HyeonsuLee Apr 29, 2024
1f2a44e
fix: 상점 수정시 배달금액 언더플로우 해결 (#482)
20HyeonsuLee Apr 29, 2024
a5f1129
feat: 비밀번호 검증 api 작성 (#478)
seongjae6751 Apr 30, 2024
cd6537b
feat: 카카오 챗봇 API 구현 (#485)
Choi-JJunho Apr 30, 2024
3ebb62e
fix: handler 추가 및 IAE 변경 (#489)
Choi-JJunho Apr 30, 2024
9b5da95
refactor: 모든 상점 조회 api 성능개선 (#487)
20HyeonsuLee Apr 30, 2024
ee11898
fix: 17~2시인경우 확인 안되는문제 해결 (#490)
20HyeonsuLee Apr 30, 2024
bd26b9c
refactor: 라인포맷팅 (#492)
20HyeonsuLee Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

6 changes: 6 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
기능: feature/*
버그: fix/*
리팩터링: refactor/*
문서: docs/*
테스트: test/*
인프라: infra/*
12 changes: 12 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR Labeler
on:
pull_request:
types: [ opened ]

jobs:
pr-labeler:
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ out/
.DS_STORE

application.yml
*adminsdk.json

logs
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM amazoncorretto:17

WORKDIR /app

COPY ./build/libs/KOIN_API_V2.jar /app/app.jar

ENTRYPOINT ["java", "-jar", "/app/app.jar"]
46 changes: 45 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,59 @@ repositories {
}

dependencies {
implementation group: 'org.json', name: 'json', version: '20231013'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'com.mysql:mysql-connector-j'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'

implementation 'io.jsonwebtoken:jjwt-api:0.12.3'

implementation 'org.jsoup:jsoup:1.15.3'
implementation 'com.amazonaws:aws-java-sdk:1.12.672'
implementation 'com.google.code.gson:gson:2.10.1'

// swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

// security
implementation 'org.springframework.security:spring-security-crypto:6.2.2'

runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.3'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.3'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
compileOnly 'org.projectlombok:lombok'

annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.testcontainers:testcontainers:1.19.3'
testImplementation 'org.testcontainers:junit-jupiter:1.19.3'
testImplementation 'org.testcontainers:mysql'
testImplementation 'io.rest-assured:rest-assured:5.3.2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

// presigned url
implementation platform('software.amazon.awssdk:bom:2.20.56')
implementation 'software.amazon.awssdk:s3'

// localstack
testImplementation 'org.testcontainers:localstack'

// flyway
implementation 'org.flywaydb:flyway-mysql'

// fcm
implementation 'com.google.firebase:firebase-admin:9.2.0'

// Actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// slack Notification
implementation 'com.github.maricn:logback-slack-appender:1.4.0'
}

tasks.named('bootBuildImage') {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/in/koreatech/koin/KoinApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@SpringBootApplication
@ConfigurationPropertiesScan
public class KoinApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package in.koreatech.koin.admin.land.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "(Admin) AdminLand: 복덕방", description = "관리자 권한으로 복덕방 정보를 관리한다")
public interface AdminLandApi {

@ApiResponses(
value = {
@ApiResponse(responseCode = "200"),
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "복덕방 목록 조회")
@GetMapping("/admin/lands")
ResponseEntity<AdminLandsResponse> getLands(
@RequestParam(name = "page", defaultValue = "1") Integer page,
@RequestParam(name = "limit", defaultValue = "10", required = false) Integer limit,
@RequestParam(name = "is_deleted", defaultValue = "false") Boolean isDeleted
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package in.koreatech.koin.admin.land.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
import in.koreatech.koin.admin.land.service.AdminLandService;
import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
public class AdminLandController implements AdminLandApi {

private final AdminLandService adminLandService;

@Override
@GetMapping("/admin/lands")
public ResponseEntity<AdminLandsResponse> getLands(
@RequestParam(name = "page", defaultValue = "1") Integer page,
@RequestParam(name = "limit", defaultValue = "10", required = false) Integer limit,
@RequestParam(name = "is_deleted", defaultValue = "false") Boolean isDeleted
) {
return ResponseEntity.ok().body(adminLandService.getLands(page, limit, isDeleted));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package in.koreatech.koin.admin.land.dto;

import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

import com.fasterxml.jackson.databind.annotation.JsonNaming;

import in.koreatech.koin.domain.land.model.Land;
import io.swagger.v3.oas.annotations.media.Schema;

@JsonNaming(value = SnakeCaseStrategy.class)
public record AdminLandResponse(
@Schema(description = "고유 id", example = "1", requiredMode = REQUIRED)
Integer id,

@Schema(description = "이름", example = "금실타운", requiredMode = REQUIRED)
String name,

@Schema(description = "종류", example = "원룸")
String roomType,

@Schema(description = "월세", example = "200만원 (6개월)")
String monthlyFee,

@Schema(description = "전세", example = "3500")
String charterFee,

@Schema(description = "삭제(soft delete) 여부", example = "false", requiredMode = REQUIRED)
Boolean isDeleted
) {
public static AdminLandResponse from(Land land) {
return new AdminLandResponse(
land.getId(),
land.getName(),
land.getRoomType(),
land.getMonthlyFee(),
land.getCharterFee(),
land.isDeleted()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package in.koreatech.koin.admin.land.dto;

import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

import java.util.List;

import org.springframework.data.domain.Page;

import com.fasterxml.jackson.databind.annotation.JsonNaming;

import in.koreatech.koin.domain.land.model.Land;
import in.koreatech.koin.global.model.Criteria;
import io.swagger.v3.oas.annotations.media.Schema;

@JsonNaming(value = SnakeCaseStrategy.class)
public record AdminLandsResponse(

@Schema(description = "조건에 해당하는 총 집의 수", example = "57", requiredMode = REQUIRED)
Long totalCount,

@Schema(description = "조건에 해당하는 집 중에 현재 페이지에서 조회된 수", example = "10", requiredMode = REQUIRED)
Integer currentCount,

@Schema(description = "조건에 해당하는 집들을 조회할 수 있는 최대 페이지", example = "6", requiredMode = REQUIRED)
Integer totalPage,

@Schema(description = "현재 페이지", example = "2", requiredMode = REQUIRED)
Integer currentPage,

@Schema(description = "집 정보 리스트", requiredMode = REQUIRED)
List<AdminLandResponse> lands
) {
public static AdminLandsResponse of(Page<Land> pagedResult, Criteria criteria) {
return new AdminLandsResponse(
pagedResult.getTotalElements(),
pagedResult.getContent().size(),
pagedResult.getTotalPages(),
criteria.getPage() + 1,
pagedResult.getContent()
.stream()
.map(AdminLandResponse::from)
.toList()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package in.koreatech.koin.admin.land.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;

import in.koreatech.koin.domain.land.model.Land;

public interface AdminLandRepository extends Repository<Land, Integer> {

Page<Land> findAllByIsDeleted(boolean isDeleted, Pageable pageable);

Integer countAllByIsDeleted(boolean isDeleted);

Land save(Land request);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package in.koreatech.koin.admin.land.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
import in.koreatech.koin.admin.land.repository.AdminLandRepository;
import in.koreatech.koin.domain.land.model.Land;
import in.koreatech.koin.global.model.Criteria;
import lombok.RequiredArgsConstructor;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class AdminLandService {

private final AdminLandRepository adminLandRepository;

public AdminLandsResponse getLands(Integer page, Integer limit, Boolean isDeleted) {

// page > totalPage인 경우 totalPage로 조회하기 위해
Integer total = adminLandRepository.countAllByIsDeleted(isDeleted);

Criteria criteria = Criteria.of(page, limit, total);
PageRequest pageRequest = PageRequest.of(criteria.getPage(), criteria.getLimit(),
Sort.by(Sort.Direction.ASC, "id"));

Page<Land> result = adminLandRepository.findAllByIsDeleted(isDeleted, pageRequest);

return AdminLandsResponse.of(result, criteria);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package in.koreatech.koin.domain.activity.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import in.koreatech.koin.domain.activity.dto.ActivitiesResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "(Normal) Activity", description = "BCSDLab 활동")
public interface ActivityApi {

@ApiResponses(
value = {
@ApiResponse(responseCode = "200", description = "성공적으로 활동 목록을 조회함"),
@ApiResponse(responseCode = "404", description = "해당하는 활동이 없음", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "BCSD Lab 활동 조회")
@GetMapping("/activities")
ResponseEntity<ActivitiesResponse> getActivities(
@RequestParam(required = false) String year
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package in.koreatech.koin.domain.activity.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import in.koreatech.koin.domain.activity.dto.ActivitiesResponse;
import in.koreatech.koin.domain.activity.service.ActivityService;
import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
public class ActivityController implements ActivityApi {

private final ActivityService activityService;

@GetMapping("/activities")
public ResponseEntity<ActivitiesResponse> getActivities(
@RequestParam(required = false) String year
) {
ActivitiesResponse response = activityService.getActivities(year);
return ResponseEntity.ok(response);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package in.koreatech.koin.domain.activity.dto;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

public record ActivitiesResponse(
@JsonProperty("Activities")
List<ActivityResponse> activities
) {
public ActivitiesResponse(List<ActivityResponse> activities) {
this.activities = activities;
}
}
Loading