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 71039e5a
authored
Jul 14, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LocalDate的日期格式
1 parent
4065761f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dto/OrderChangeListDTO.java
View file @
71039e5
package
com
.
dituhui
.
pea
.
order
.
dto
;
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
com.dituhui.pea.order.common.DateUtils
;
import
com.dituhui.pea.order.config.OrderConfig
;
import
com.dituhui.pea.order.config.OrderConfig
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
...
@@ -12,6 +13,8 @@ import java.time.LocalDate;
...
@@ -12,6 +13,8 @@ import java.time.LocalDate;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
dituhui
.
pea
.
order
.
config
.
OrderConfig
.
PATTERN_DATE
;
public
class
OrderChangeListDTO
{
public
class
OrderChangeListDTO
{
...
@@ -27,11 +30,7 @@ public class OrderChangeListDTO {
...
@@ -27,11 +30,7 @@ public class OrderChangeListDTO {
private
String
levelValue
;
private
String
levelValue
;
private
int
page
=
OrderConfig
.
DEFAULT_PAGE_INDEX
;
private
int
page
=
OrderConfig
.
DEFAULT_PAGE_INDEX
;
private
int
size
=
OrderConfig
.
DEFAULT_PAGE_SIZE
;
private
int
size
=
OrderConfig
.
DEFAULT_PAGE_SIZE
;
private
String
date
=
DateUtils
.
formatDate
(
LocalDate
.
now
(),
PATTERN_DATE
);
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
LocalDate
date
=
LocalDate
.
now
();
/**
/**
* 排序
* 排序
*/
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/WorkbenchServiceImpl.java
View file @
71039e5
...
@@ -50,12 +50,13 @@ public class WorkbenchServiceImpl implements WorkbenchService {
...
@@ -50,12 +50,13 @@ public class WorkbenchServiceImpl implements WorkbenchService {
Page
<?>
changes
;
Page
<?>
changes
;
String
levelType
=
reqDTO
.
getLevelType
();
String
levelType
=
reqDTO
.
getLevelType
();
String
levelValue
=
reqDTO
.
getLevelValue
();
String
levelValue
=
reqDTO
.
getLevelValue
();
LocalDate
date
=
LocalDate
.
parse
(
reqDTO
.
getDate
());
if
(
"cluster"
.
equals
(
levelType
))
{
if
(
"cluster"
.
equals
(
levelType
))
{
changes
=
orderEventDao
.
findAllByClusterId
(
levelValue
,
reqDTO
.
getDate
()
,
pageable
);
changes
=
orderEventDao
.
findAllByClusterId
(
levelValue
,
date
,
pageable
);
}
else
if
(
"branch"
.
equals
(
levelType
))
{
}
else
if
(
"branch"
.
equals
(
levelType
))
{
changes
=
orderEventDao
.
findAllByBranchId
(
levelValue
,
reqDTO
.
getDate
()
,
pageable
);
changes
=
orderEventDao
.
findAllByBranchId
(
levelValue
,
date
,
pageable
);
}
else
{
}
else
{
changes
=
orderEventDao
.
findAllByGroupId
(
levelValue
,
reqDTO
.
getDate
()
,
pageable
);
changes
=
orderEventDao
.
findAllByGroupId
(
levelValue
,
date
,
pageable
);
}
}
List
<
OrderChangeListDTO
.
Content
>
contents
=
new
ArrayList
<>();
List
<
OrderChangeListDTO
.
Content
>
contents
=
new
ArrayList
<>();
for
(
Object
e1
:
changes
.
getContent
())
{
for
(
Object
e1
:
changes
.
getContent
())
{
...
...
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