Skip to content

Commit 5509c3e

Browse files
authored
Merge pull request #63 from HD152521/develop
1. 소개 페이지 필터 로직 안정화 • 검색 시: 검색어 포함 학과는 진하게, 미포함 학과는 연하게 표시 • 단과대 카테고리 클릭 시: 해당 단과대 카드만 표시 • 학사/대학원 섹션 모두 동일하게 동작하도록 정리 2. 단과대 입력 UI 정리 • 단과대 설명 입력칸 제거 • 단과대 이름 + 학위 구분을 한 줄(2컬럼) 배치 • 소속학과 입력창 높이 축소 (min-h-[80px] → min-h-[64px]) 3. 수정/추가 모달 상태 초기화 • 확인/취소/닫기 후 모달 입력값과 dataset 초기화 • 다른 학교로 전환 시 이전 값이 남지 않도록 reset 로직 추가 • 카테고리 추가 시 전역 selector 대신 모달 내부 스코프로 값 조회하도록 변경
2 parents b70e3eb + 3001c32 commit 5509c3e

60 files changed

Lines changed: 2114 additions & 1499 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ build/
44
!**/src/main/**/build/
55
!**/src/test/**/build/
66
src/main/resources/application-local.yml
7+
src/main/resources/logback-spring.xml
78
*.env
89
.env
9-
10+
docker-compose.yml
1011
uploads
1112
### STS ###
1213
.apt_generated

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ dependencies {
6666
//swagger
6767
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.13'
6868

69+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
70+
implementation 'io.micrometer:micrometer-registry-prometheus'
6971
}
7072

7173
node {

src/main/java/com/cooperation/project/cooperationcenter/domain/agency/controller/homepage/AgencyRestController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.cooperation.project.cooperationcenter.domain.member.dto.AgencyRegion;
44
import com.cooperation.project.cooperationcenter.global.exception.BaseResponse;
5+
import io.swagger.v3.oas.annotations.Operation;
56
import lombok.RequiredArgsConstructor;
67
import lombok.extern.slf4j.Slf4j;
78
import org.springframework.web.bind.annotation.GetMapping;
@@ -17,6 +18,8 @@
1718
@RequestMapping("/api/v1/agency")
1819
@Slf4j
1920
public class AgencyRestController {
21+
22+
@Operation(summary = "유학원 지역 리스트 반환")
2023
@GetMapping("/region")
2124
public BaseResponse<?> getRegionList(){
2225
List<String> regions = Arrays.stream(AgencyRegion.values())

src/main/java/com/cooperation/project/cooperationcenter/domain/agency/controller/homepage/AgengyController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.cooperation.project.cooperationcenter.domain.agency.dto.AgencyRequest;
44
import com.cooperation.project.cooperationcenter.domain.agency.service.homepage.AgencyService;
5+
import io.swagger.v3.oas.annotations.Operation;
56
import lombok.RequiredArgsConstructor;
67
import lombok.extern.slf4j.Slf4j;
78
import org.springframework.data.domain.Pageable;
@@ -24,6 +25,7 @@ public class AgengyController {
2425
private final String agencyPath = "homepage/user/agency";
2526

2627
@RequestMapping("/list")
28+
@Operation(summary = "해당 지역과 키워드 값을 가진 유학원 반환")
2729
public String agencyList(
2830
Model model,
2931
@PageableDefault(size = 12, sort = "createdAt", direction = Sort.Direction.DESC)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.cooperation.project.cooperationcenter.domain.agency.exception;
2+
3+
import com.cooperation.project.cooperationcenter.global.exception.BaseException;
4+
import com.cooperation.project.cooperationcenter.global.exception.codes.BaseCode;
5+
6+
public class AgencyHandler extends BaseException {
7+
public AgencyHandler(BaseCode code){super(code);}
8+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.cooperation.project.cooperationcenter.domain.agency.exception.status;
2+
3+
import com.cooperation.project.cooperationcenter.global.exception.codes.BaseCode;
4+
import com.cooperation.project.cooperationcenter.global.exception.codes.reason.Reason;
5+
import lombok.AllArgsConstructor;
6+
import lombok.Getter;
7+
import org.springframework.http.HttpStatus;
8+
9+
@Getter
10+
@AllArgsConstructor
11+
public enum AgencyErrorStatus implements BaseCode {
12+
13+
AGENCY_NOT_FOUND(HttpStatus.BAD_REQUEST,"AGENCY-0001","해당 유학원은 가입 되지 않은 상태입니다. 확인 후에 다시 가입해주세요");
14+
15+
private final HttpStatus httpStatus;
16+
private final String code;
17+
private final String message;
18+
19+
@Override
20+
public Reason.ReasonDto getReasonHttpStatus() {
21+
return Reason.ReasonDto.builder()
22+
.message(message)
23+
.code(code)
24+
.isSuccess(false)
25+
.httpStatus(httpStatus)
26+
.build();
27+
}
28+
}

src/main/java/com/cooperation/project/cooperationcenter/domain/agency/model/Agency.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public void removeMember(Member member){
7474
this.member.remove(member);
7575
}
7676

77-
public void setShare(){
78-
this.share = !this.share;
79-
}
77+
public void setShare(boolean share){
78+
this.share = share;
79+
}
8080

8181
public static Agency fromDto(
8282
MemberRequest.SignupNewAgencyDto dto

src/main/java/com/cooperation/project/cooperationcenter/domain/agency/repository/AgencyRepository.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
import java.util.Optional;
1111

1212
public interface AgencyRepository extends JpaRepository<Agency,Long> {
13-
long countByAgencyPicture(FileAttachment file);
14-
Optional<Agency> findAgencyByAgencyNameAndAgencyEmailAndShare(String name, String email,Boolean share);
15-
List<Agency> findAgenciesByShare(boolean share);
16-
Page<Agency> findAgenciesByShare(boolean share, Pageable pageable);
17-
18-
}
13+
long countByAgencyPicture(FileAttachment file);
14+
Optional<Agency> findAgencyByAgencyNameAndAgencyEmailAndShare(String name, String email,Boolean share);
15+
Optional<Agency> findAgencyByAgencyNameAndAgencyEmail(String name, String email);
16+
List<Agency> findAgenciesByShare(boolean share);
17+
Page<Agency> findAgenciesByShare(boolean share, Pageable pageable);
18+
19+
}

src/main/java/com/cooperation/project/cooperationcenter/domain/file/controller/FileRestController.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.cooperation.project.cooperationcenter.domain.file.service.FileService;
44
import com.cooperation.project.cooperationcenter.domain.oss.OssService;
5+
import io.swagger.v3.oas.annotations.Operation;
56
import lombok.RequiredArgsConstructor;
67
import lombok.extern.slf4j.Slf4j;
78
import org.springframework.core.io.Resource;
@@ -27,41 +28,48 @@ public class FileRestController {
2728
private final FileService fileService;
2829
private final OssService ossService;
2930

30-
31-
//note 다운로드용
3231
@GetMapping("/{type}/{fileId}")
32+
@Operation(summary = "파일 다운로드")
3333
public ResponseEntity<Void> downloadFile(@PathVariable String type,@PathVariable String fileId) throws MalformedURLException {
3434
log.info("enter file controller");
3535
return fileService.loadFile(fileId,type);
3636
}
3737

38-
//note 이미지 뷰용
3938
@GetMapping("/img/{type}/{fileId}")
39+
@Operation(summary = "이미지 뷰")
4040
public ResponseEntity<Void> viewImage(@PathVariable String type,@PathVariable String fileId) throws IOException {
4141
log.info("enter file controller-img");
4242
return fileService.viewFile(fileId,type);
4343
}
4444

45-
//note 이미지 뷰용
4645
@GetMapping("/pdf/{type}/{fileId}")
46+
@Operation(summary = "pdf새 탭으로 열기")
4747
public ResponseEntity<StreamingResponseBody> viewPdf(@PathVariable String type, @PathVariable String fileId) throws IOException {
4848
log.info("enter file controller-img");
4949
return fileService.viewPdf(fileId,type);
5050
}
5151

52+
@Operation(
53+
summary = "학교 이미지 저장",
54+
description = """
55+
학교에 사용되는 이미지를 저장하고 URL을 반환.
56+
"""
57+
)
5258
@PostMapping("/{type}")
5359
public ResponseEntity<Void> saveFile(@PathVariable String type,@RequestParam("file-0") MultipartFile file) throws IOException {
5460
log.info("save file");
5561
return fileService.saveSchoolImgAndReturnUrl(type, file);
5662
}
5763

5864
@GetMapping("/default/agency")
65+
@Operation(summary = "유학원 대체 이미지")
5966
public ResponseEntity<Void> getAgencyDefaultImage(){
6067
log.info("enter agency");
6168
return fileService.viewDefaultImg("agency");
6269
}
6370

6471
@GetMapping("/default/school")
72+
@Operation(summary = "학교 대체 이미지")
6573
public ResponseEntity<Void> getSchoolDefaultImage(){
6674
return fileService.viewDefaultImg("school");
6775
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.cooperation.project.cooperationcenter.domain.file.exception;
2+
3+
import com.cooperation.project.cooperationcenter.global.exception.BaseException;
4+
import com.cooperation.project.cooperationcenter.global.exception.codes.BaseCode;
5+
6+
public class FileHandler extends BaseException {
7+
public FileHandler(BaseCode code){super(code);}
8+
}

0 commit comments

Comments
 (0)