Skip to content

Commit 227040e

Browse files
hyoseong-Choinano-mmparkjaehak
authored
CLAP-318 2차카테고리 입력 양식(설명 예시) 추가
* CLAP-110 Feature : 담당자별 작업 처리량 조회 API 구현 <footer> - 관련: #73 * CLAP-111 Refactor : 통계 조회 API 리팩토링 및 기능 수정 <footer> - 관련: #74 * 내 작업한 내용에 대한 설명 * 담당자 조회 API 구현 * CLAP-111 Refactor : 통계 조회 API 주소 통합, 리팩토링, 예외처리 <footer> - 관련: #74 * Bug : 프로퍼티파일 수정 * CLAP-104 CI/CD : CI에서 s3.yml 파일 생성하도록 수정 * CLAP-146 Feature : 카테고리 목록 조회 API 구현 <footer> - 관련: #118 * CLAP-147 Feature : 카테고리 수정 API 구현 <footer> - 관련: #119 * CLAP-147 Feature : 카테고리 추가, 수정 API 리뷰반영 수정 <footer> - 관련: #119 * CLAP-148 Feature : 카테고리 삭제 API 구현 <footer> - 관련: #120 * CLAP-148 Feature : 카테고리 삭제 API 수정 <footer> - 관련: #120 * CLAP-148 Docs : 카테고리 API 스웨거 수정 <footer> - 관련: #120 * CLAP-107 Bug : CI test yml파일 key 중복 수정 <footer> - 관련: #60 * CLAP-148 Feature : 카테고리 CUD 리뷰 반영 수정, 조회 반환 양식 수정 <footer> - 관련: #120 * CLAP-214 Cleanup : 통계, 카테고리 미흡한부분 리팩토링 <footer> - 관련: #216 * CLAP-214 Fix : 통계조회 API 파라미터 바인딩 오류 수정 <footer> - 관련: #216 * CLAP-214 Fix : addConverter 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : 추가한 파일들 제거 <footer> - 관련: #216 * CLAP-214 Hotfix : FindStatisticsController 스위치문 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : AddCategoryService 지연로딩 오류 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : DeleteCategoryService 카테고리 삭제 로직 수정 <footer> - 관련: #216 * CLAP-249 Refactor : 통계 조회 서비스 리팩토링 <footer> - 관련: #265 * CLAP-250 Test : 통계 조회 테스트코드 작성 <footer> - 관련: #266 * CLAP-214 Hotifx : 카테고리 수정 로직 수정 <footer> - 관련: #216 * CLAP-214 Hotifx : 카테고리 수정 로직 수정 <footer> - 관련: #216 * CLAP-256 fix: 스웨거 명세 추가 * CLAP-214 Hotifx : 카테고리 저장 트랜잭션 추가 <footer> - 관련: #216 * CLAP-214 Hotifx : 카테고리 저장 시간 수정 <footer> - 관련: #216 * CLAP-285 Hotifx : 모든 카테고리 조회 <footer> - 관련: #331 * CLAP-214 Hotifx : 카테고리 조회 Secured 설정 <footer> - 관련: #216 * CLAP-256 fix: convert 동작 mapper 추가 * CLAP-256 fix: 충돌해결 * CLAP-256 fix: 불필요한 테스트 파일 제거 * CLAP-256 fix: mapper statuslabel 수정 * CLAP-256 Fix : 팀 작업 현황 필터링 조회 수정 <footer> - 관련: #281 * CLAP-299 Feature : 사용자 작업 취소 <footer> - 관련: #352 * CLAP-299 Fix: 사용자 작업 취소 api 주소 수정 <footer> - 관련: #352 * CLAP-256 전체 작업수 계산 로직 개선 * fix: env 파일 제거 * fix: 어노테이션 수정 * fix: @RestController 제거 * fix: @ApplicationService로 수정 * CLAP-256 Fix : TeamStatusService 누락된 import 수정 <footer> - 관련: #281 * CLAP-256 Fix : TeamStatusService Secured 추가 <footer> - 관련: #281 * fix: 팀 작업 현황 필터링 조회 수정 및 정렬 기능 개선 * Delete src/main/resources/env.properties * Delete src/test/resources/application.yml * 충돌 해결: develop 브랜치와 병합 * Update application.yml * Revert application.yml files to match develop branch * CLAP-256 fix: Update application.yml * CLAP-256 fix: Update application.yml * CLAP-256 Fix : 팀 현황 필터조회 기여도순 정렬 수정 <footer> - 관련: #281 * CLAP-309 Fix : 엘라스틱서치에 저장할 작업 정보 수정 <footer> - 관련: #378 * CLAP-309 Fix : 엘라스틱서치에 저장 누락되는것 수정 <footer> - 관련: #378 * CLAP-test * CLAP-318 Fix : 2차카테고리 입력 양식(설명 예시) 추가 <footer> - 관련: #392 * CLAP-318 Test : 2차카테고리 입력 양식(설명 예시) 추가한 테스트코드 수정 <footer> - 관련: #392 --------- Co-authored-by: nano-mm <nano123@gachon.ac.kr> Co-authored-by: parkjaehak <atom8426@gmail.com>
1 parent ce67434 commit 227040e

File tree

18 files changed

+55
-21
lines changed

18 files changed

+55
-21
lines changed

src/main/java/clap/server/adapter/inbound/web/admin/AddCategoryController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public void addMainCategory(@AuthenticationPrincipal SecurityUserDetails userInf
3535
@PostMapping("/sub-category")
3636
@Secured("ROLE_ADMIN")
3737
public void addSubCategory(@AuthenticationPrincipal SecurityUserDetails userInfo, @Valid @RequestBody AddSubCategoryRequest addCategoryRequest) {
38-
addSubCategoryUsecase.addSubCategory(userInfo.getUserId(), addCategoryRequest.mainCategoryId(), addCategoryRequest.code(), addCategoryRequest.name());
38+
addSubCategoryUsecase.addSubCategory(userInfo.getUserId(),
39+
addCategoryRequest.mainCategoryId(),
40+
addCategoryRequest.code(),
41+
addCategoryRequest.name(),
42+
addCategoryRequest.descriptionExample());
3943
}
4044

4145
}

src/main/java/clap/server/adapter/inbound/web/admin/UpdateCategoryController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public class UpdateCategoryController {
2727
@Secured("ROLE_ADMIN")
2828
public void updateCategory(@AuthenticationPrincipal SecurityUserDetails userInfo, @PathVariable Long categoryId,
2929
@Valid @RequestBody UpdateCategoryRequest updateCategoryRequest) {
30-
updateCategoryUsecase.updateCategory(userInfo.getUserId(), categoryId, updateCategoryRequest.name(), updateCategoryRequest.code());
30+
updateCategoryUsecase.updateCategory(userInfo.getUserId(),
31+
categoryId,
32+
updateCategoryRequest.name(),
33+
updateCategoryRequest.code(),
34+
updateCategoryRequest.descriptionExample());
3135
}
3236
}

src/main/java/clap/server/adapter/inbound/web/dto/admin/request/AddSubCategoryRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ public record AddSubCategoryRequest(
1111
@NotBlank @Length(max = 20)
1212
String name,
1313
@NotBlank @Pattern(regexp = "^[A-Z]{1,2}$", message = "올바른 카테고리 코드 형식이 아닙니다.")
14-
String code) {
14+
String code,
15+
String descriptionExample) {
1516
}

src/main/java/clap/server/adapter/inbound/web/dto/admin/request/UpdateCategoryRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public record UpdateCategoryRequest(
88
@NotBlank @Length(max = 20)
99
String name,
1010
@NotBlank @Pattern(regexp = "^[A-Z]{1,2}$", message = "올바른 카테고리 코드 형식이 아닙니다.")
11-
String code
11+
String code,
12+
String descriptionExample
1213
) {
1314
}

src/main/java/clap/server/adapter/inbound/web/dto/admin/response/FindSubCategoryResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ public record FindSubCategoryResponse(
44
Long id,
55
Long mainCategoryId,
66
String name,
7-
String code
7+
String code,
8+
String descriptionExample
89
) {
910
}

src/main/java/clap/server/adapter/outbound/persistense/CommentPersistenceAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,9 @@ public Comment saveComment(Comment comment) {
3434
public void deleteCommentWithTaskHistory(Long commentId) {
3535
commentRepository.deleteCommentWithTaskHistory(commentId);
3636
}
37+
38+
@Override
39+
public void deleteComment(Comment comment) {
40+
commentRepository.delete(commentPersistenceMapper.toEntity(comment));
41+
}
3742
}

src/main/java/clap/server/adapter/outbound/persistense/TaskHistoryPersistenceAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ public TaskHistory save(TaskHistory taskHistory) {
3535
TaskHistoryEntity savedTaskHistoryEntity = taskHistoryRepository.save(taskHistoryEntity);
3636
return taskHistoryPersistenceMapper.toDomain(savedTaskHistoryEntity);
3737
}
38+
39+
@Override
40+
public void deleteTaskHistoryByCommentId(Long commentId) {
41+
taskHistoryRepository.updateByComment_CommentId(commentId);
42+
}
3843
}

src/main/java/clap/server/adapter/outbound/persistense/repository/history/TaskHistoryRepository.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
import org.springframework.stereotype.Repository;
99

1010
@Repository
11-
public interface TaskHistoryRepository extends JpaRepository<TaskHistoryEntity, Long> , TaskHistoryCustomRepository{
12-
}
11+
public interface TaskHistoryRepository extends JpaRepository<TaskHistoryEntity, Long>, TaskHistoryCustomRepository {
12+
@Modifying
13+
@Query("UPDATE TaskHistoryEntity t SET t.isDeleted = true WHERE t.comment.commentId = :commentId")
14+
void updateByComment_CommentId(@Param("commentId") Long commentId);
15+
}

src/main/java/clap/server/application/mapper/CategoryResponseMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public static FindMainCategoryResponse toFindMainCategoryResponse(Category categ
2222
}
2323

2424
public static FindSubCategoryResponse toFindSubCategoryResponse(Category category) {
25-
return new FindSubCategoryResponse(category.getCategoryId(), category.getMainCategory().getCategoryId(), category.getName(), category.getCode());
25+
return new FindSubCategoryResponse(category.getCategoryId(), category.getMainCategory().getCategoryId(), category.getName(), category.getCode(), category.getDescriptionExample());
2626
}
2727
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package clap.server.application.port.inbound.admin;
22

33
public interface AddSubCategoryUsecase {
4-
void addSubCategory(Long adminId, Long mainCategoryId, String code, String name);
4+
void addSubCategory(Long adminId, Long mainCategoryId, String code, String name, String descriptionExample);
55
}

0 commit comments

Comments
 (0)