Fix : 수정

This commit is contained in:
lsh9672
2025-06-13 01:10:25 +09:00
parent a13ca2e4be
commit 60ee715d3e
11 changed files with 326 additions and 303 deletions
@@ -1,40 +1,16 @@
package com.ktds.hi.recommend.biz.domain;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* 위치 도메인 클래스
* 위치 정보를 담는 도메인 객체
*/
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Location {
private Long id;
private String address;
private Long id; // 추가
private Double latitude;
private Double longitude;
private String city;
private String district;
private String country;
/**
* 좌표 업데이트
*/
public Location updateCoordinates(Double newLatitude, Double newLongitude) {
return Location.builder()
.id(this.id)
.address(this.address)
.latitude(newLatitude)
.longitude(newLongitude)
.city(this.city)
.district(this.district)
.country(this.country)
.build();
}
}
private String address;
private String city; // 추가
private String district; // 추가
private String country; // 추가
}
@@ -4,17 +4,24 @@ import lombok.Builder;
import lombok.Getter;
import java.time.LocalDateTime;
import java.util.List;
@Getter
@Builder
public class RecommendHistory {
private Long id;
private Long memberId;
private Long storeId;
private String recommendType;
private Long storeId; // 기존 필드
private String recommendType; // 기존 필드 (String)
private Double score;
private String reason;
private LocalDateTime recommendedAt;
private Boolean clicked;
private Boolean visited;
// 추가 필드들 (Adapter에서 사용)
private List<Long> recommendedStoreIds;
private RecommendType recommendTypeEnum;
private String criteria;
private LocalDateTime createdAt;
}
@@ -21,4 +21,7 @@ public class RecommendStore {
private Double recommendScore;
private Double distance;
private String priceRange;
// 추가 필드
private RecommendType recommendType;
}
@@ -1,24 +1,19 @@
package com.ktds.hi.recommend.biz.domain;
/**
* 추천 유형 열거형
* 추천의 종류를 정의
*/
public enum RecommendType {
TASTE_BASED("취향 기반"),
AI_RECOMMENDATION("AI 추천"),
LOCATION_BASED("위치 기반"),
POPULARITY_BASED("인기 기반"),
COLLABORATIVE_FILTERING("협업 필터링"),
AI_RECOMMENDATION("AI 추천"),
SIMILAR_USER("유사 사용자 기반");
PREFERENCE_BASED("취향 기반");
private final String description;
RecommendType(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
}
@@ -1,30 +1,24 @@
package com.ktds.hi.recommend.biz.domain;
/**
* 취향 카테고리 열거형
* 음식 카테고리를 정의
*/
public enum TasteCategory {
KOREAN("한식"),
CHINESE("중식"),
JAPANESE("일식"),
WESTERN("양식"),
FAST_FOOD("패스트푸드"),
CAFE("카페"),
FASTFOOD("패스트푸드"),
DESSERT("디저트"),
CHICKEN("치킨"),
PIZZA("피자"),
ASIAN("아시안"),
VEGETARIAN("채식"),
SEAFOOD("해산물");
OTHER("기타");
private final String description;
TasteCategory(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
}
@@ -5,16 +5,26 @@ import lombok.Getter;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@Getter
@Builder
public class TasteProfile {
private Long id;
private Long memberId;
private List<String> cuisinePreferences;
private String priceRange;
private Integer distancePreference;
private List<String> tasteTags;
private List<String> cuisinePreferences; // 기존 유지
private String priceRange; // 기존 유지
private Integer distancePreference; // 기존 유지
private List<String> tasteTags; // 기존 유지
// 추가 필드들 (Adapter에서 사용)
private List<TasteCategory> preferredCategories;
private Map<String, Double> categoryScores;
private List<String> preferredTags;
private Map<String, Object> behaviorPatterns;
private Double pricePreference;
private Double distancePreferenceDouble; // distancePreference와 구분
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
}
@@ -15,4 +15,4 @@ public interface AiRecommendRepository {
// 추가 필요한 메서드들
List<RecommendStore> filterByPreferences(List<RecommendStore> stores, TasteProfile tasteProfile, String tags);
String getStoreSummary(Long storeId);
}
}