Compare commits

..

No commits in common. "e4e326564670ea7103739145b92c5651fcfbc4fc" and "71a875bc8a880bf7a098ccc6409027e52dd9716e" have entirely different histories.

10 changed files with 8 additions and 90 deletions

View File

@ -1,7 +1,5 @@
package com.ktds.hi;
import java.util.TimeZone;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
@ -19,9 +17,6 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
public class AnalyticsApplication {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
SpringApplication.run(AnalyticsApplication.class, args);
}
}

View File

@ -25,7 +25,7 @@ public interface AiFeedbackJpaRepository extends JpaRepository<AiFeedbackEntity,
/**
* 매장 ID로 최신 AI 피드백 조회
*/
@Query("SELECT af FROM AiFeedbackEntity af WHERE af.storeId = :storeId ORDER BY af.generatedAt DESC LIMIT 1")
@Query("SELECT af FROM AiFeedbackEntity af WHERE af.storeId = :storeId ORDER BY af.createdAt DESC LIMIT 1")
Optional<AiFeedbackEntity> findLatestByStoreId(@Param("storeId") Long storeId);
/**

View File

@ -34,10 +34,4 @@ public class SignupRequest {
@Pattern(regexp = "^010-\\d{4}-\\d{4}$", message = "전화번호 형식이 올바르지 않습니다")
@Schema(description = "전화번호", example = "010-1234-5678")
private String phone;
@NotBlank(message = "역할분류는 필수입니다")
@Size(min = 2, max = 20, message = "역할분류는 2-20자 사이여야 합니다")
@Schema(description = "역할", example = "OWNER")
private String role;
}

View File

@ -45,7 +45,7 @@ public class MemberServiceImpl implements MemberService {
.password(passwordEncoder.encode(request.getPassword()))
.nickname(request.getNickname())
.phone(request.getPhone())
.role(request.getRole())
.role("USER")
.build();
MemberEntity savedMember = memberRepository.save(member);

View File

@ -4,7 +4,6 @@ import com.azure.messaging.eventhubs.EventData;
import com.azure.messaging.eventhubs.EventDataBatch;
import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.messaging.eventhubs.EventHubProducerClient;
import com.azure.messaging.eventhubs.models.CreateBatchOptions;
import com.azure.messaging.eventhubs.models.SendOptions;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ktds.hi.store.biz.usecase.in.ExternalIntegrationUseCase;
@ -69,7 +68,6 @@ public class ExternalIntegrationInteractor implements ExternalIntegrationUseCase
throw new BusinessException("지원하지 않는 플랫폼입니다: " + request.getPlatform());
}
log.info(request.getPlatform() + " 요청 Data : " + request.toString());
// 동기화 이벤트 발행
publishSyncEvent(storeId, request.getPlatform(), syncedCount);
@ -254,10 +252,11 @@ public class ExternalIntegrationInteractor implements ExternalIntegrationUseCase
EventData eventData = new EventData(payloadJson);
CreateBatchOptions batchOptions = new CreateBatchOptions();
batchOptions.setPartitionId("4"); // 배치 전체의 파티션 고정
EventDataBatch batch = producer.createBatch(batchOptions); // 옵션 적용된 배치 생성
// 🔥 파티션 4번에 보내기 위한 SendOptions 설정
SendOptions sendOptions = new SendOptions();
sendOptions.setPartitionId("4");
// EventDataBatch 사용
EventDataBatch batch = producer.createBatch();
if (batch.tryAdd(eventData)) {
producer.send(batch);
log.info("동기화 이벤트 발행 성공: storeId={}, platform={}, syncedCount={}",

View File

@ -98,48 +98,6 @@ public class StoreService implements StoreUseCase {
public String getAllTags(Long storeId){
return storeJpaRepository.findById(storeId).get().getTagsJson();
}
@Override
public List<StoreListResponse> getSearchStoreName(String storeName){
List<StoreEntity> stores = storeJpaRepository.finByStoreNameContaining(storeName);
return stores.stream()
.map(store -> StoreListResponse.builder()
.storeId(store.getId())
.storeName(store.getStoreName())
.address(store.getAddress())
.category(store.getCategory())
.rating(store.getRating())
.reviewCount(store.getReviewCount())
.status("운영중")
.tagJson(store.getTagsJson())
.imageUrl(store.getImageUrl())
.operatingHours(store.getOperatingHours())
.build())
.collect(Collectors.toList());
}
@Override
public List<StoreListResponse> getCategoryStores(String category){
List<StoreEntity> stores = storeJpaRepository.findByCategory(category);
return stores.stream()
.map(store -> StoreListResponse.builder()
.storeId(store.getId())
.storeName(store.getStoreName())
.address(store.getAddress())
.category(store.getCategory())
.rating(store.getRating())
.reviewCount(store.getReviewCount())
.status("운영중")
.tagJson(store.getTagsJson())
.imageUrl(store.getImageUrl())
.operatingHours(store.getOperatingHours())
.build())
.collect(Collectors.toList());
}
@Override
public List<StoreListResponse> getAllStores() {

View File

@ -33,10 +33,6 @@ public interface StoreUseCase {
List<StoreListResponse> getAllStores();
List<StoreListResponse> getCategoryStores(String category);
List<StoreListResponse> getSearchStoreName(String storeName);
String getAllTags(Long storeId);
/**

View File

@ -59,8 +59,6 @@ public class StoreController {
.body(ApiResponse.success(response, "매장이 성공적으로 등록되었습니다."));
}
@Operation(summary = "내 매장 목록 조회", description = "점주가 등록한 매장 목록을 조회합니다.")
@GetMapping("/my")
@PreAuthorize("hasRole('OWNER')")
@ -73,8 +71,6 @@ public class StoreController {
return ResponseEntity.ok(ApiResponse.success(responses, "내 매장 목록 조회 완료"));
}
@GetMapping("/stores/all")
@Operation(summary = "매장 전체 리스트")
public ResponseEntity<ApiResponse<List<StoreListResponse>>> getAllStores() {
@ -83,24 +79,6 @@ public class StoreController {
return ResponseEntity.ok(ApiResponse.success(responses));
}
@Operation(summary = "매장 조회", description = "가게 검색한 매장 목록을 조회합니다.")
@GetMapping("/search/storeName/{storeName}")
public ResponseEntity<ApiResponse<List<StoreListResponse>>> getSearchStores(
HttpServletRequest httpRequest, @PathVariable String storeName) {
List<StoreListResponse> responses = storeUseCase.getSearchStoreName(storeName);
return ResponseEntity.ok(ApiResponse.success(responses));
}
@GetMapping("/stores/category/{category}")
@Operation(summary = "카테고리에 해당하는 매장")
public ResponseEntity<ApiResponse<List<StoreListResponse>>> getStoreCategories(@PathVariable String category) {
List<StoreListResponse> responses = storeUseCase.getCategoryStores(category);
return ResponseEntity.ok(ApiResponse.success(responses));
}
@GetMapping("/stores/{storeId}/tags")
@Operation(summary = "매장 전체 리스트")
public ResponseEntity<String> getStoreTags(@PathVariable Long storeId) {

View File

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

View File

@ -46,8 +46,6 @@ public interface StoreJpaRepository extends JpaRepository<StoreEntity, Long> {
*/
List<StoreEntity> findByCategory(String category);
@Query("SELECT s FROM StoreEntity s WHERE s.storeName like %:storeName%")
List<StoreEntity> finByStoreNameContaining(@Param("storeName") String storeName);
/**
* 상태로 매장 조회
*/