/**
* 从context的json中提取出reportData
* @param favoriteList
*/
public static void getReportDataFromContext(List<Favorite> favoriteList){
if(favoriteList == null){
return;
}
for (Favorite favorite : favoriteList) {
if (favorite == null) {
continue;
}
String context = favorite.getJson();
if (StringUtils.isBlank(context)) {
continue;
}
JSONObject jsonObject = JSONObject.fromObject(context);
ReportData reportData = (ReportData) JSONObject.toBean(
jsonObject, ReportData.class);
if (reportData == null) {
continue;
}
reportData.setContent(reportData.getContent());
favorite.setReportData(reportData);
}
}
* 从context的json中提取出reportData
* @param favoriteList
*/
public static void getReportDataFromContext(List<Favorite> favoriteList){
if(favoriteList == null){
return;
}
for (Favorite favorite : favoriteList) {
if (favorite == null) {
continue;
}
String context = favorite.getJson();
if (StringUtils.isBlank(context)) {
continue;
}
JSONObject jsonObject = JSONObject.fromObject(context);
ReportData reportData = (ReportData) JSONObject.toBean(
jsonObject, ReportData.class);
if (reportData == null) {
continue;
}
reportData.setContent(reportData.getContent());
favorite.setReportData(reportData);
}
}