fix(local): 데모 메이트·한줄평을 기본 선택 스팟(첫 스팟)에 배치
CI / build (push) Failing after 15m47s

StatsSeedData 가 통계용 스팟을 먼저 넣어 데모 메이트가 안 보이던 문제.
프론트가 기본 선택하는 min-id 스팟에 콩이·보리 체크인 → 앱 열자마자 확인.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sb
2026-07-11 14:04:56 +09:00
parent ea61eaf47e
commit 29982e3572
@@ -35,18 +35,23 @@ public class LocalSeedData implements CommandLineRunner {
long mate1 = insertDog(other, "콩이", "말티즈"); long mate1 = insertDog(other, "콩이", "말티즈");
long mate2 = insertDog(other, "보리", "리트리버"); long mate2 = insertDog(other, "보리", "리트리버");
// 스팟 // 스팟 (StatsSeedData 가 통계용 스팟을 먼저 넣으므로, 여기선 데모용 2곳 추가)
long hangang = insertSpot("한강공원 산책로", "TRAIL", 37.5283, 126.9327); long hangang = insertSpot("한강공원 산책로", "TRAIL", 37.5283, 126.9327);
insertSpot("서울숲 반려견 놀이터", "PLAYGROUND", 37.5445, 127.0374); insertSpot("서울숲 반려견 놀이터", "PLAYGROUND", 37.5445, 127.0374);
// 이웃 강아지들이 한강공원에 체크인 중 // 데모 메이트/한줄평은 프론트가 기본 선택하는 첫 스팟(min id)에 배치
spotService.checkIn(hangang, other, mate1); // → 앱 열자마자 체크인 시 메이트·AI 추천을 바로 확인 가능.
spotService.checkIn(hangang, other, mate2); Long firstId = jdbc.queryForObject("SELECT id FROM spots ORDER BY id ASC LIMIT 1", Long.class);
long demoSpot = firstId != null ? firstId : hangang;
// 이웃 강아지들이 데모 스팟에 체크인 중 (Redis 활성 메이트)
spotService.checkIn(demoSpot, other, mate1);
spotService.checkIn(demoSpot, other, mate2);
// 한줄평 // 한줄평
spotService.addReview(hangang, other, "진드기 많아요", null); spotService.addReview(demoSpot, other, "진드기 많아요", null);
spotService.addReview(hangang, other, "그늘 시원해요", null); spotService.addReview(demoSpot, other, "그늘 시원해요", null);
spotService.addReview(hangang, me, "물그릇 있음", null); spotService.addReview(demoSpot, me, "물그릇 있음", null);
// 성향 태그 마스터 (프로덕션은 V4 마이그레이션, local 은 여기서 시드) // 성향 태그 마스터 (프로덕션은 V4 마이그레이션, local 은 여기서 시드)
insertTrait("FEAR_BIG_DOG", "대형견 무서워함", "CAUTION"); insertTrait("FEAR_BIG_DOG", "대형견 무서워함", "CAUTION");
@@ -69,8 +74,8 @@ public class LocalSeedData implements CommandLineRunner {
VALUES ('dev-local-token', ?, 'USER', true, ?, CURRENT_TIMESTAMP) VALUES ('dev-local-token', ?, 'USER', true, ?, CURRENT_TIMESTAMP)
""", me, OffsetDateTime.now().plusDays(365)); """, me, OffsetDateTime.now().plusDays(365));
System.out.printf("[local seed] me=%d, myDog=%d, spot(한강)=%d, devToken='dev-local-token' 준비 완료%n", System.out.printf("[local seed] me=%d, myDog=%d, demoSpot(메이트·AI)=%d, devToken='dev-local-token' 준비 완료%n",
me, myDog, hangang); me, myDog, demoSpot);
} }
private long insertTrait(String code, String label, String category) { private long insertTrait(String code, String label, String category) {