fix: hotfix 동기화 — history/detail candidate_count 안전 처리 #225
@ -1409,7 +1409,7 @@ public class GroupPolygonService {
|
||||
.members(members)
|
||||
.color(rs.getString("color"))
|
||||
.resolution(rs.getString("resolution"))
|
||||
.candidateCount(nullableInt(rs, "candidate_count"))
|
||||
.candidateCount(optionalInt(rs, "candidate_count"))
|
||||
.parentInference(mapParentInferenceSummary(rs))
|
||||
.build();
|
||||
}
|
||||
@ -1566,6 +1566,15 @@ public class GroupPolygonService {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
|
||||
/** 컬럼이 ResultSet에 존재하지 않으면 null 반환 (history/detail SQL 호환) */
|
||||
private Integer optionalInt(ResultSet rs, String column) throws SQLException {
|
||||
try {
|
||||
return nullableInt(rs, column);
|
||||
} catch (SQLException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, Object> parseJsonObject(String json) {
|
||||
return parseJsonValue(json, new TypeReference<Map<String, Object>>() {}, Map.of());
|
||||
}
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user