Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1c67ef62
authored
Jul 05, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LocalDateTime的处理
1 parent
fbcd92f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttRespDTO.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListReqDTO.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListRespDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttRespDTO.java
View file @
1c67ef6
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
...
...
@@ -65,12 +70,16 @@ public class EngineersGanttRespDTO {
/**
* 开始时间
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
startTime
;
/**
* 结束时间
*/
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
endTime
;
/**
* 鼠标悬停提示
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListReqDTO.java
View file @
1c67ef6
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.dituhui.pea.order.config.OrderConfig
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDate
;
...
...
@@ -18,7 +23,10 @@ public class OrderChangeListReqDTO {
private
String
levelValue
;
private
int
page
=
OrderConfig
.
DEFAULT_PAGE_INDEX
;
private
int
size
=
OrderConfig
.
DEFAULT_PAGE_SIZE
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDate
date
=
LocalDate
.
now
();
/**
* 排序
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListRespDTO.java
View file @
1c67ef6
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.List
;
@lombok
.
Data
...
...
@@ -39,6 +45,9 @@ public class OrderChangeListRespDTO {
/**
* 更新时间
*/
private
String
updateTime
;
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updateTime
;
}
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
View file @
1c67ef6
...
...
@@ -59,7 +59,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
.
setOperator
(
e
.
getOperator
())
.
setDescription
(
e
.
getContent
())
.
setMemo
(
e
.
getMemo
())
.
setUpdateTime
(
e
.
getUpdateTime
()
.
toString
()
);
.
setUpdateTime
(
e
.
getUpdateTime
());
contents
.
add
(
content
);
}
OrderChangeListRespDTO
respDTO
=
new
OrderChangeListRespDTO
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment