Merge pull request 'fix: hotfix 동기화 — history/detail candidate_count 안전 처리' (#225) from hotfix/sync-candidate-count into develop
This commit is contained in:
커밋
ed618f6dd0
@ -1409,7 +1409,7 @@ public class GroupPolygonService {
|
|||||||
.members(members)
|
.members(members)
|
||||||
.color(rs.getString("color"))
|
.color(rs.getString("color"))
|
||||||
.resolution(rs.getString("resolution"))
|
.resolution(rs.getString("resolution"))
|
||||||
.candidateCount(nullableInt(rs, "candidate_count"))
|
.candidateCount(optionalInt(rs, "candidate_count"))
|
||||||
.parentInference(mapParentInferenceSummary(rs))
|
.parentInference(mapParentInferenceSummary(rs))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@ -1566,6 +1566,15 @@ public class GroupPolygonService {
|
|||||||
return ((Number) value).intValue();
|
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) {
|
private Map<String, Object> parseJsonObject(String json) {
|
||||||
return parseJsonValue(json, new TypeReference<Map<String, Object>>() {}, Map.of());
|
return parseJsonValue(json, new TypeReference<Map<String, Object>>() {}, Map.of());
|
||||||
}
|
}
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user