Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenjunjie
brandkbs2
Commits
ba925574
Commit
ba925574
authored
May 04, 2023
by
陈健智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全网搜导出调整
parent
4cd3f9da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/main/java/com/zhiwei/brandkbs2/pojo/dto/ExportSearchWholeDTO.java
+7
-6
No files found.
src/main/java/com/zhiwei/brandkbs2/pojo/dto/ExportSearchWholeDTO.java
View file @
ba925574
...
@@ -5,9 +5,9 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
...
@@ -5,9 +5,9 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.ToString
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Objects
;
/**
/**
* 全网搜舆情导出实体类
* 全网搜舆情导出实体类
...
@@ -42,11 +42,12 @@ public class ExportSearchWholeDTO {
...
@@ -42,11 +42,12 @@ public class ExportSearchWholeDTO {
public
static
ExportSearchWholeDTO
creatExportSearchWholeDTO
(
JSONObject
jsonObject
){
public
static
ExportSearchWholeDTO
creatExportSearchWholeDTO
(
JSONObject
jsonObject
){
ExportSearchWholeDTO
dto
=
new
ExportSearchWholeDTO
();
ExportSearchWholeDTO
dto
=
new
ExportSearchWholeDTO
();
dto
.
setTime
(
new
Date
((
Long
)
jsonObject
.
get
(
"time"
)));
dto
.
setTime
(
new
Date
((
Long
)
jsonObject
.
get
(
"time"
)));
dto
.
setPlatform
(
Objects
.
isNull
(
jsonObject
.
getString
(
"platform"
))
?
""
:
jsonObject
.
getString
(
"platform"
));
dto
.
setPlatform
(
jsonObject
.
getString
(
"platform"
));
dto
.
setChannel
(
Objects
.
isNull
(
jsonObject
.
getString
(
"channel"
))
?
""
:
jsonObject
.
getString
(
"channel"
));
dto
.
setChannel
(
jsonObject
.
getString
(
"channel"
));
dto
.
setTitle
(
Objects
.
isNull
(
jsonObject
.
getString
(
"title"
))
?
""
:
jsonObject
.
getString
(
"title"
));
// 截取为excel单元格允许的最大长度
dto
.
setContent
(
Objects
.
isNull
(
jsonObject
.
getString
(
"content"
))
?
""
:
jsonObject
.
getString
(
"content"
));
dto
.
setTitle
(
StringUtils
.
substring
(
jsonObject
.
getString
(
"title"
),
0
,
32767
));
dto
.
setUrl
(
Objects
.
isNull
(
jsonObject
.
getString
(
"url"
))
?
""
:
jsonObject
.
getString
(
"url"
));
dto
.
setContent
(
StringUtils
.
substring
(
jsonObject
.
getString
(
"content"
),
0
,
32767
));
dto
.
setUrl
(
StringUtils
.
substring
(
jsonObject
.
getString
(
"url"
),
0
,
32767
));
return
dto
;
return
dto
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment