File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
src/main/java/com/somemore/center Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 11package com .somemore .center .service .query ;
22
33import com .somemore .center .domain .Center ;
4+ import com .somemore .center .dto .response .CenterForCommunityResponseDto ;
45import com .somemore .center .dto .response .CenterProfileResponseDto ;
56import com .somemore .center .dto .response .PreferItemResponseDto ;
67import com .somemore .center .repository .CenterRepository ;
@@ -45,4 +46,14 @@ private Center getCenterById(UUID centerId) {
4546 .orElseThrow (() -> new BadRequestException (NOT_EXISTS_CENTER .getMessage ()));
4647 }
4748
49+ @ Override
50+ public String getNameById (UUID id ) {
51+ return centerRepository .findNameById (id );
52+ }
53+
54+ @ Override
55+ public CenterForCommunityResponseDto getCenterDetailForCommunity (UUID id ) {
56+ Center center = getCenterById (id );
57+ return CenterForCommunityResponseDto .fromEntity (center );
58+ }
4859}
Original file line number Diff line number Diff line change 11package com .somemore .center .usecase .query ;
22
3+ import com .somemore .center .dto .response .CenterForCommunityResponseDto ;
34import com .somemore .center .dto .response .CenterProfileResponseDto ;
45
56import java .util .UUID ;
@@ -8,4 +9,6 @@ public interface CenterQueryUseCase {
89
910 CenterProfileResponseDto getCenterProfileByCenterId (UUID centerId );
1011 void validateCenterExists (UUID centerId );
12+ String getNameById (UUID id );
13+ CenterForCommunityResponseDto getCenterDetailForCommunity (UUID id );
1114}
You can’t perform that action at this time.
0 commit comments