Commit 34909def by 陈健智

ExportSearchWholeDTO

parent e6d94787
package com.zhiwei.brandkbs2.pojo.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.ToString;
import java.util.Date;
/**
* 全网搜舆情导出实体类
*/
@Data
@ToString
public class ExportSearchWholeDTO {
@ColumnWidth(20)
@ExcelProperty("时间")
private Date time;
@ColumnWidth(20)
@ExcelProperty("平台")
private String platform;
@ColumnWidth(20)
@ExcelProperty("渠道")
private String channel;
@ColumnWidth(50)
@ExcelProperty("标题")
private String title;
@ColumnWidth(50)
@ExcelProperty("文本")
private String content;
@ColumnWidth(50)
@ExcelProperty("地址")
private String url;
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.setTitle(jsonObject.getString("title"));
dto.setContent(jsonObject.getString("content"));
dto.setUrl(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