feat : 상세조회시 태그 정보 전달.

This commit is contained in:
lsh9672 2025-06-17 17:26:53 +09:00
parent 49bda1c697
commit 02f8b57d77
2 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ package com.ktds.hi.store.biz.service;
import com.ktds.hi.store.biz.usecase.in.StoreUseCase;
import com.ktds.hi.store.infra.dto.*;
import com.ktds.hi.store.infra.gateway.entity.StoreEntity;
import com.ktds.hi.store.infra.gateway.entity.TagEntity;
import com.ktds.hi.store.infra.gateway.repository.StoreJpaRepository;
import com.ktds.hi.common.exception.BusinessException;
import lombok.RequiredArgsConstructor;
@ -93,11 +94,14 @@ public class StoreService implements StoreUseCase {
@Override
public StoreDetailResponse getStoreDetail(Long storeId) {
log.info("매장 상세 조회: storeId={}", storeId);
StoreEntity store = storeJpaRepository.findById(storeId)
.orElseThrow(() -> new BusinessException("STORE_NOT_FOUND", "매장을 찾을 수 없습니다."));
List<String> tagNameList = store.getTags().stream()
.map(TagEntity::getTagName)
.toList();
return StoreDetailResponse.builder()
.storeId(store.getId())
.storeName(store.getStoreName())
@ -111,6 +115,7 @@ public class StoreService implements StoreUseCase {
.rating(store.getRating())
.reviewCount(store.getReviewCount())
.status(store.getStatus())
.tags(tagNameList)
.build();
}

View File

@ -7,6 +7,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Set;
/**
* 매장 상세 조회 응답 DTO