Commit 82a27aa9 by 陈健智

全网搜导出修复

parent 864c6aae
......@@ -7,6 +7,7 @@ import lombok.Data;
import lombok.ToString;
import java.util.Date;
import java.util.Objects;
/**
* 全网搜舆情导出实体类
......@@ -41,8 +42,11 @@ public class ExportSearchWholeDTO {
public static ExportSearchWholeDTO creatExportSearchWholeDTO(JSONObject jsonObject){
ExportSearchWholeDTO dto = new ExportSearchWholeDTO();
dto.setTime(new Date((Long) jsonObject.get("time")));
dto.setPlatform(jsonObject.getString("platform"));
dto.setChannel(jsonObject.getString("channel"));
dto.setPlatform(Objects.isNull(jsonObject.getString("platform")) ? "" : jsonObject.getString("platform"));
dto.setChannel(Objects.isNull(jsonObject.getString("channel")) ? "" : jsonObject.getString("channel"));
dto.setTitle(Objects.isNull(jsonObject.getString("title")) ? "" : jsonObject.getString("title"));
dto.setContent(Objects.isNull(jsonObject.getString("content")) ? "" : jsonObject.getString("content"));
dto.setUrl(Objects.isNull(jsonObject.getString("url")) ? "" : jsonObject.getString("url"));
return dto;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment