store tag insert
This commit is contained in:
parent
e4d87cc98a
commit
496e11e43c
BIN
logs/recommend-service.log.2025-06-18.0.gz
Normal file
BIN
logs/recommend-service.log.2025-06-18.0.gz
Normal file
Binary file not shown.
1
nano.save.1
Normal file
1
nano.save.1
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -94,7 +94,10 @@ public class StoreService implements StoreUseCase {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getAllTags(Long storeId){
|
||||
return storeJpaRepository.findById(storeId).getTagsJson();
|
||||
}
|
||||
@Override
|
||||
public List<StoreListResponse> getAllStores() {
|
||||
|
||||
@ -109,6 +112,7 @@ public class StoreService implements StoreUseCase {
|
||||
.rating(store.getRating())
|
||||
.reviewCount(store.getReviewCount())
|
||||
.status("운영중")
|
||||
.tagJson(store.getTagsJson())
|
||||
.imageUrl(store.getImageUrl())
|
||||
.operatingHours(store.getOperatingHours())
|
||||
.build())
|
||||
|
||||
@ -33,6 +33,8 @@ public interface StoreUseCase {
|
||||
|
||||
List<StoreListResponse> getAllStores();
|
||||
|
||||
String getAllTags(Long storeId);
|
||||
|
||||
/**
|
||||
* 매장 상세 조회
|
||||
*
|
||||
|
||||
@ -41,7 +41,6 @@ import java.util.List;
|
||||
public class StoreController {
|
||||
|
||||
private final StoreUseCase storeUseCase;
|
||||
private final StoreService storeService;
|
||||
private final JwtTokenProvider jwtTokenProvider;
|
||||
private final MenuUseCase menuUseCase;
|
||||
|
||||
@ -80,6 +79,15 @@ public class StoreController {
|
||||
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 = "매장의 상세 정보를 조회합니다.")
|
||||
@GetMapping("/{storeId}")
|
||||
public ResponseEntity<ApiResponse<StoreDetailResponse>> getStoreDetail(
|
||||
|
||||
@ -20,6 +20,9 @@ public class StoreListResponse {
|
||||
@Schema(description = "매장명", example = "맛집 한번 가볼래?")
|
||||
private String storeName;
|
||||
|
||||
@Schema(description = "태그 리스트", example = "태그태그태그")
|
||||
private String tagJson;
|
||||
|
||||
@Schema(description = "주소", example = "서울시 강남구 테헤란로 123")
|
||||
private String address;
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ public class ExternalPlatformAdapter implements ExternalPlatformPort {
|
||||
|
||||
Map<String, Object> requestBody = new HashMap<>();
|
||||
requestBody.put("store_id", externalStoreId);
|
||||
requestBody.put("days_limit", 360);
|
||||
requestBody.put("days_limit", 1000);
|
||||
requestBody.put("max_time", 300);
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
||||
@ -197,4 +197,6 @@ public class StoreEntity {
|
||||
public boolean hasReviews() {
|
||||
return this.reviewCount != null && this.reviewCount > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -30,6 +30,7 @@ public interface StoreJpaRepository extends JpaRepository<StoreEntity, Long> {
|
||||
*/
|
||||
List<StoreEntity> findByOwnerId(Long ownerId);
|
||||
|
||||
|
||||
/**
|
||||
* 매장 ID와 점주 ID로 매장 조회
|
||||
*/
|
||||
@ -145,4 +146,6 @@ public interface StoreJpaRepository extends JpaRepository<StoreEntity, Long> {
|
||||
@Param("minRating") Double minRating,
|
||||
@Param("keyword") String keyword,
|
||||
Pageable pageable);
|
||||
|
||||
StoreEntity findById(Long id);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user