Skip to content

Commit 5b0bf2f

Browse files
CLAP-214 Hotifx : 카테고리 수정 로직 수정
* 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
1 parent f9ec0ed commit 5b0bf2f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/clap/server/application/service/admin/UpdateCategoryService.java

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

33
import clap.server.application.port.inbound.admin.UpdateCategoryUsecase;
44
import clap.server.application.port.outbound.member.LoadMemberPort;
5+
import clap.server.application.port.outbound.task.CommandCategoryPort;
56
import clap.server.application.port.outbound.task.LoadCategoryPort;
67
import clap.server.common.annotation.architecture.ApplicationService;
78
import clap.server.domain.model.member.Member;
9+
import clap.server.domain.model.task.Category;
810
import clap.server.exception.ApplicationException;
911
import lombok.RequiredArgsConstructor;
1012
import org.springframework.transaction.annotation.Transactional;
@@ -17,13 +19,15 @@
1719
public class UpdateCategoryService implements UpdateCategoryUsecase {
1820
private final LoadCategoryPort loadCategoryPort;
1921
private final LoadMemberPort loadMemberPort;
22+
private final CommandCategoryPort commandCategoryPort;
2023

2124
@Override
2225
@Transactional
2326
public void updateCategory(Long adminId, Long categoryId, String name, String code) {
2427
Member admin = loadMemberPort.findActiveMemberById(adminId).orElseThrow(() -> new ApplicationException(ACTIVE_MEMBER_NOT_FOUND));
25-
loadCategoryPort.findById(categoryId)
26-
.orElseThrow(() -> new ApplicationException(CATEGORY_NOT_FOUND))
27-
.updateCategory(admin, name, code);
28+
Category category = loadCategoryPort.findById(categoryId)
29+
.orElseThrow(() -> new ApplicationException(CATEGORY_NOT_FOUND));
30+
category.updateCategory(admin, name, code);
31+
commandCategoryPort.save(category);
2832
}
2933
}

0 commit comments

Comments
 (0)