|
|
@@ -71,7 +71,9 @@ public class ReportSurveyService {
|
|
|
}
|
|
|
|
|
|
private void saveDietPreferencesFromSurvey(ReportSurvey survey, String surveyData) {
|
|
|
- JsonNode root = objectMapper.readTree(surveyData);
|
|
|
+ JsonNode root;
|
|
|
+ try { root = objectMapper.readTree(surveyData); }
|
|
|
+ catch (Exception e) { log.warn("解析surveyData失败: {}", e.getMessage()); return; }
|
|
|
JsonNode surveyNode = root.has("survey") ? root.get("survey") : root;
|
|
|
Long memberId = survey.getChildId();
|
|
|
if (memberId == null) return;
|