Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

비즈니스팀 계좌번호 기능 프로덕션 배포 #681

Merged
merged 38 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2a0fa00
fix: dto @NotNull 어노테이션 추가
Jun 3, 2024
38044d9
fix: 테스트코드 수정
Jun 3, 2024
6ee2ea2
Merge pull request #588 from BCSDLab/fix/587-fix-open-null
Choi-JJunho Jun 11, 2024
6f8d1cb
fix : 품절 알림 문구 점(.) 삭제 (#599)
Choon0414 Jun 11, 2024
8e93c5d
feat : put /admin/members/{id} api 추가 (#595)
YunYongWoon Jun 11, 2024
a75e95f
feat: 버스 필터링 (#586)
ImTotem Jun 14, 2024
102f05c
feat : 학생, 사장님, 영양사 로그인 분기처리 (#563)
duehee Jun 14, 2024
3c5118f
hotfix: 비밀번호 검증 api 비밀번호 틀렸을시에 400 반환하는 것으로 수정(develop) (#607)
seongjae6751 Jun 17, 2024
f3e25aa
feat: POST /admin/members/{id}/undelete API 추가 (#600)
YunYongWoon Jun 18, 2024
4378863
feat: Admin BCSDLab 트랙 API 구현 (#606)
BaeJinho4028 Jun 18, 2024
ba97fe3
Feature: 어드민 복덕방 삭제 (#612)
johnny19991006 Jun 18, 2024
0d3e554
refactor: 호환성 유지하기 위한 오너 회원가입 휴대폰번호 양식 롤백 (#614)
20HyeonsuLee Jun 20, 2024
114c1ed
feat : coop_id 관련 flyway 추가 (#618)
duehee Jun 22, 2024
e4d528c
refactor: 시내버스 정류장 불일치 해결 (#601)
ImTotem Jun 22, 2024
82e75ad
fix : 품절 알림 처리 순서 수정 (#611)
Choon0414 Jun 22, 2024
e65964b
refactor: sms회원가입 redis초기화 로직 변경 (#622)
20HyeonsuLee Jun 23, 2024
479c395
fix: 상점 수정, 삭제시 운영 요일 형식 검증 (#624)
20HyeonsuLee Jun 23, 2024
29cef11
feat: 사업자번호, 아이디 중복검증 추가 (#610)
Choi-JJunho Jun 24, 2024
8468ffa
fix : Kcal가 null 일 경우 0을 반환하도록 롤백 (#626)
Choon0414 Jun 25, 2024
dfe19d7
fix: CityBusRoute 저장시 null 제외 추가 (#629)
ImTotem Jun 26, 2024
c5c1118
feat: 어드민권한 상점 관련 api작성 (#619)
20HyeonsuLee Jun 26, 2024
3902467
feat: 어드민 복덕방 조회,수정,삭제취소 (#631)
johnny19991006 Jun 26, 2024
4cca204
feat: 어드민 82~86,89,90,93~95 (#621)
kwoo28 Jun 26, 2024
4a3e455
feat: 어드민권한 상점, 카테고리 api작성 (#627)
BaeJinho4028 Jun 26, 2024
20ddf2f
refactor: ADMIN 권한 추가 (#638)
Choi-JJunho Jun 26, 2024
701e9e6
fix: 상점 생성,수정 / 메뉴 추가,수정 버그 해결 (#644)
20HyeonsuLee Jun 27, 2024
095add2
feat: new timetable api 구현 (#615)
daheeParkk Jun 29, 2024
307b6db
fix : flyway 버저닝 충돌 해결 (#646)
duehee Jun 29, 2024
240aa8f
fix : 롤백 이후 flyway 오류 수정(timetable_id -> frame_id) (#648)
duehee Jun 30, 2024
dee9185
refactor: internalName 필수요구 제거 (#650)
johnny19991006 Jul 1, 2024
658bbdd
Refactor: 사장님/어드민 상점 수정시 은행,계좌번호 추가 (#642)
johnny19991006 Jul 2, 2024
ed1a765
Fix: 이모지 검증 추가 (#651)
kwoo28 Jul 3, 2024
ef98dc8
fix: 조회 조건 변경 (#660)
seongjae6751 Jul 5, 2024
1d6eff9
fix: 이모지 어노테이션 검증 수정 (#668)
kwoo28 Jul 5, 2024
aaa6dda
fix: 어드민 사장님 페이지네이션 수정 (#654)
kwoo28 Jul 6, 2024
3a6308b
feat: github workflow 추가 (#671)
Choi-JJunho Jul 9, 2024
afce39d
develop 브랜치 충돌해결 (#677)
20HyeonsuLee Jul 11, 2024
760e949
main<-develop 충돌 해결 (#680)
BaeJinho4028 Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/pick-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Pick Reviewer"

on:
pull_request:
types: opened

jobs:
pick-random-reviewer:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Pick random reviewer
id: pick_random_reviewer
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');

const developers = JSON.parse(fs.readFileSync(`${{ github.workspace }}/.github/workflows/reviewer.json`));
const prCreator = context.payload.pull_request.user.login;
const prUrl = context.payload.pull_request.html_url;
const prCreatorJson = developers.reviewers.find(person => person.githubName === prCreator);

//PrCreator가 reviewer에 등록되지 않은 사람인 경우
if (!prCreatorJson) {
const reviewerArr = developers.reviewers;
const randomReviewer1 = getRandomReviewer(reviewerArr);
const randomReviewer2 = getRandomReviewer(reviewerArr.filter(reviewer => reviewer.name !== randomReviewer1.name));
setOutput(prCreator, prUrl, randomReviewer1, randomReviewer2);
} else {
const candidateInternalReviewers = developers.reviewers.filter(person => person.team === prCreatorJson.team && person.githubName !== prCreator);
const candidateExternalReviewers = developers.reviewers.filter(person => person.team !== prCreatorJson.team);
const randomReviewer1 = getRandomReviewer(candidateInternalReviewers);
const randomReviewer2 = getRandomReviewer(candidateExternalReviewers);
setOutput(prCreatorJson.name, prUrl, randomReviewer1, randomReviewer2);
}

function getRandomReviewer(reviewers) {
return reviewers[Math.floor(Math.random() * reviewers.length)];
}

function setOutput(prCreator, prUrl, reviewer1, reviewer2) {
core.setOutput('writer', JSON.stringify(prCreator));
core.setOutput('pullRequestLink', JSON.stringify(prUrl));
core.setOutput('reviewer1Name', JSON.stringify(reviewer1.name));
core.setOutput('reviewer2Name', JSON.stringify(reviewer2.name));
core.setOutput('reviewer1GithubName', reviewer1.githubName);
core.setOutput('reviewer2GithubName', reviewer2.githubName);
}

- name: Add Reviewers
uses: madrapps/add-reviewers@v1
with:
reviewers: ${{ steps.pick_random_reviewer.outputs.reviewer1GithubName }},${{ steps.pick_random_reviewer.outputs.reviewer2GithubName }}
token: ${{ secrets.GITHUB_TOKEN }}


- name: Send Slack Trigger
run: |
curl -X POST https://api-slack.internal.bcsdlab.com/api/review-request/backend \
-H 'Content-Type: application/json' \
-d '{
"pullRequestLink": ${{ steps.pick_random_reviewer.outputs.pullRequestLink }},
"writer": ${{ steps.pick_random_reviewer.outputs.writer }},
"reviewers": [${{ steps.pick_random_reviewer.outputs.reviewer1Name }}, ${{ steps.pick_random_reviewer.outputs.reviewer2Name }}]
}'
27 changes: 27 additions & 0 deletions .github/workflows/pr-merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
pull_request:
types: closed

jobs:
check_pr_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check PR Merged
id: check_pr_merged
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prUrl = context.payload.pull_request.html_url ?? context.payload.pull_request._links.html.href;
core.setOutput('pullRequestLink', JSON.stringify(prUrl));

- name: Send Slack Trigger
run: |
curl -X POST https://api-slack.internal.bcsdlab.com/api/pr-merged/backend \
-H 'Content-Type: application/json' \
-d '{
"pullRequestLink": ${{ steps.check_pr_merged.outputs.pullRequestLink }}
}'
64 changes: 64 additions & 0 deletions .github/workflows/reviewer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"reviewers": [
{
"name": "박다희",
"githubName": "daheeParkk",
"team": "user"
},
{
"name": "김성재",
"githubName": "seongjae6751",
"team": "user"
},
{
"name": "김원경",
"githubName": "kwoo28",
"team": "user"
},
{
"name": "서정빈",
"githubName": "duehee",
"team": "user"
},
{
"name": "이현수",
"githubName": "20HyeonsuLee",
"team": "business"
},
{
"name": "최준호",
"githubName": "Choi-JJunho",
"team": "business"
},
{
"name": "윤용운",
"githubName": "YunYongWoon",
"team": "business"
},
{
"name": "장준영",
"githubName": "johnny19991006",
"team": "business"
},
{
"name": "허준기",
"githubName": "dradnats1012",
"team": "campus"
},
{
"name": "황현식",
"githubName": "Choon0414",
"team": "campus"
},
{
"name": "박성빈",
"githubName": "ImTotem",
"team": "campus"
},
{
"name": "송선권",
"githubName": "songsunkook",
"team": "campus"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
import static in.koreatech.koin.domain.user.model.UserType.ADMIN;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import in.koreatech.koin.admin.land.dto.AdminLandsRequest;
import in.koreatech.koin.admin.land.dto.AdminLandResponse;
import in.koreatech.koin.admin.land.dto.AdminLandRequest;
import in.koreatech.koin.admin.land.dto.AdminLandsResponse;

import in.koreatech.koin.global.auth.Auth;
Expand Down Expand Up @@ -53,8 +57,72 @@ ResponseEntity<AdminLandsResponse> getLands(
@SecurityRequirement(name = "Jwt Authentication")
@PostMapping("/admin/lands")
ResponseEntity<AdminLandsResponse> postLands(
@RequestBody @Valid AdminLandsRequest adminLandsRequest,
@RequestBody @Valid AdminLandRequest adminLandRequest,
@Auth(permit = {ADMIN}) Integer adminId
);

@ApiResponses(
value = {
@ApiResponse(responseCode = "201"),
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "복덕방 삭제")
@SecurityRequirement(name = "Jwt Authentication")
@DeleteMapping("/admin/lands/{id}")
ResponseEntity<Void> deleteLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
);

@ApiResponses(
value = {
@ApiResponse(responseCode = "200"),
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "복덕방 조회")
@SecurityRequirement(name = "Jwt Authentication")
@GetMapping("/admin/lands/{id}")
ResponseEntity<AdminLandResponse> getLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
);

@ApiResponses(
value = {
@ApiResponse(responseCode = "200"),
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "복덕방 수정")
@SecurityRequirement(name = "Jwt Authentication")
@PutMapping("/admin/lands/{id}")
ResponseEntity<Void> updateLand(
@PathVariable("id") Integer id,
@RequestBody @Valid AdminLandRequest request,
@Auth(permit = {ADMIN}) Integer adminId
);

@ApiResponses(
value = {
@ApiResponse(responseCode = "200"),
@ApiResponse(responseCode = "401", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", content = @Content(schema = @Schema(hidden = true))),
}
)
@Operation(summary = "복덕방 삭제 취소")
@SecurityRequirement(name = "Jwt Authentication")
@PostMapping("/admin/lands/{id}/undelete")
ResponseEntity<Void> undeleteLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import in.koreatech.koin.admin.land.dto.AdminLandsRequest;
import in.koreatech.koin.admin.land.dto.AdminLandResponse;
import in.koreatech.koin.admin.land.dto.AdminLandRequest;
import in.koreatech.koin.admin.land.dto.AdminLandsResponse;
import in.koreatech.koin.admin.land.service.AdminLandService;
import in.koreatech.koin.global.auth.Auth;
Expand All @@ -35,11 +39,47 @@ public ResponseEntity<AdminLandsResponse> getLands(

@PostMapping("/admin/lands")
public ResponseEntity<AdminLandsResponse> postLands(
@RequestBody @Valid AdminLandsRequest adminLandsRequest,
@RequestBody @Valid AdminLandRequest adminLandRequest,
@Auth(permit = {ADMIN}) Integer adminId
) {
adminLandService.createLands(adminLandsRequest);
adminLandService.createLands(adminLandRequest);
return ResponseEntity.status(HttpStatus.CREATED).build();
}

@DeleteMapping("/admin/lands/{id}")
public ResponseEntity<Void> deleteLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
) {
adminLandService.deleteLand(id);
return null;
}

@GetMapping("/admin/lands/{id}")
public ResponseEntity<AdminLandResponse> getLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
) {
return ResponseEntity.ok().body(adminLandService.getLand(id));
}

@PutMapping("/admin/lands/{id}")
public ResponseEntity<Void> updateLand(
@PathVariable("id") Integer id,
@RequestBody @Valid AdminLandRequest request,
@Auth(permit = {ADMIN}) Integer adminId
) {
adminLandService.updateLand(id, request);
return ResponseEntity.ok().build();
}

@PostMapping("/admin/lands/{id}/undelete")
public ResponseEntity<Void> undeleteLand(
@PathVariable("id") Integer id,
@Auth(permit = {ADMIN}) Integer adminId
) {
adminLandService.undeleteLand(id);
return ResponseEntity.ok().build();
}

}
Loading
Loading