store tag insert

This commit is contained in:
youbeen 2025-06-19 13:17:29 +09:00
parent e4d87cc98a
commit 496e11e43c
17 changed files with 1853 additions and 1830 deletions

BIN
dump.rdb

Binary file not shown.

Binary file not shown.

0
nano.save Normal file
View File

1
nano.save.1 Normal file
View File

@ -0,0 +1 @@

View File

@ -94,7 +94,10 @@ public class StoreService implements StoreUseCase {
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@Override
public String getAllTags(Long storeId){
return storeJpaRepository.findById(storeId).getTagsJson();
}
@Override @Override
public List<StoreListResponse> getAllStores() { public List<StoreListResponse> getAllStores() {
@ -109,6 +112,7 @@ public class StoreService implements StoreUseCase {
.rating(store.getRating()) .rating(store.getRating())
.reviewCount(store.getReviewCount()) .reviewCount(store.getReviewCount())
.status("운영중") .status("운영중")
.tagJson(store.getTagsJson())
.imageUrl(store.getImageUrl()) .imageUrl(store.getImageUrl())
.operatingHours(store.getOperatingHours()) .operatingHours(store.getOperatingHours())
.build()) .build())

View File

@ -33,6 +33,8 @@ public interface StoreUseCase {
List<StoreListResponse> getAllStores(); List<StoreListResponse> getAllStores();
String getAllTags(Long storeId);
/** /**
* 매장 상세 조회 * 매장 상세 조회
* *

View File

@ -41,7 +41,6 @@ import java.util.List;
public class StoreController { public class StoreController {
private final StoreUseCase storeUseCase; private final StoreUseCase storeUseCase;
private final StoreService storeService;
private final JwtTokenProvider jwtTokenProvider; private final JwtTokenProvider jwtTokenProvider;
private final MenuUseCase menuUseCase; private final MenuUseCase menuUseCase;
@ -80,6 +79,15 @@ public class StoreController {
return ResponseEntity.ok(ApiResponse.success(responses)); return ResponseEntity.ok(ApiResponse.success(responses));
} }
@GetMapping("/stores/{storeId}/tags")
@Operation(summary = "매장 전체 리스트")
public ResponseEntity<String> getStoreTags(@PathVariable Long storeId) {
String tagsJson = storeUseCase.getAllTags(storeId);
return ResponseEntity.ok(tagsJson);
}
@Operation(summary = "매장 상세 조회", description = "매장의 상세 정보를 조회합니다.") @Operation(summary = "매장 상세 조회", description = "매장의 상세 정보를 조회합니다.")
@GetMapping("/{storeId}") @GetMapping("/{storeId}")
public ResponseEntity<ApiResponse<StoreDetailResponse>> getStoreDetail( public ResponseEntity<ApiResponse<StoreDetailResponse>> getStoreDetail(

View File

@ -20,6 +20,9 @@ public class StoreListResponse {
@Schema(description = "매장명", example = "맛집 한번 가볼래?") @Schema(description = "매장명", example = "맛집 한번 가볼래?")
private String storeName; private String storeName;
@Schema(description = "태그 리스트", example = "태그태그태그")
private String tagJson;
@Schema(description = "주소", example = "서울시 강남구 테헤란로 123") @Schema(description = "주소", example = "서울시 강남구 테헤란로 123")
private String address; private String address;

View File

@ -82,7 +82,7 @@ public class ExternalPlatformAdapter implements ExternalPlatformPort {
Map<String, Object> requestBody = new HashMap<>(); Map<String, Object> requestBody = new HashMap<>();
requestBody.put("store_id", externalStoreId); requestBody.put("store_id", externalStoreId);
requestBody.put("days_limit", 360); requestBody.put("days_limit", 1000);
requestBody.put("max_time", 300); requestBody.put("max_time", 300);
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();

View File

@ -197,4 +197,6 @@ public class StoreEntity {
public boolean hasReviews() { public boolean hasReviews() {
return this.reviewCount != null && this.reviewCount > 0; return this.reviewCount != null && this.reviewCount > 0;
} }
} }

View File

@ -30,6 +30,7 @@ public interface StoreJpaRepository extends JpaRepository<StoreEntity, Long> {
*/ */
List<StoreEntity> findByOwnerId(Long ownerId); List<StoreEntity> findByOwnerId(Long ownerId);
/** /**
* 매장 ID와 점주 ID로 매장 조회 * 매장 ID와 점주 ID로 매장 조회
*/ */
@ -145,4 +146,6 @@ public interface StoreJpaRepository extends JpaRepository<StoreEntity, Long> {
@Param("minRating") Double minRating, @Param("minRating") Double minRating,
@Param("keyword") String keyword, @Param("keyword") String keyword,
Pageable pageable); Pageable pageable);
StoreEntity findById(Long id);
} }