Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
24a408dd
Commit
24a408dd
authored
Dec 19, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'order_received_statistics' into dev
parents
55ed935d
63180107
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
StatisticsStatusEnum.java
...latform/order/contant/enumerate/StatisticsStatusEnum.java
+1
-1
ServiceTest.java
xx-order/xx-order-server/src/test/java/ServiceTest.java
+2
-3
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/contant/enumerate/StatisticsStatusEnum.java
View file @
24a408dd
...
...
@@ -96,7 +96,7 @@ public enum StatisticsStatusEnum {
x
.
getPayWay
()
==
null
?
NO_PAY_WAY
:
x
.
getPayWay
()
,
x
.
getHasPay
()));
stisticsActiveState
.
add
(
x
.
getStateGroup
());
}).
collect
(
Collectors
.
partitioningBy
(
x
->
Objects
.
nonNull
(
x
.
getPayWay
()
),
Collectors
.
groupingBy
(
OrderDTO:
:
getStateGroup
,
Collectors
.
toList
())));
}).
collect
(
Collectors
.
partitioningBy
(
x
->
Objects
.
equals
(
x
.
getHasPay
(),
1
),
Collectors
.
groupingBy
(
OrderDTO:
:
getStateGroup
,
Collectors
.
toList
())));
return
stateGroupMap
==
null
?
Collections
.
EMPTY_MAP
:
stateGroupMap
;
}
...
...
xx-order/xx-order-server/src/test/java/ServiceTest.java
View file @
24a408dd
...
...
@@ -127,14 +127,13 @@ public class ServiceTest {
public
void
testOrderReceivedStatisticsJobHandler
(){
cn
.
hutool
.
core
.
date
.
DateTime
dateTime
=
DateUtil
.
parse
(
"2019-11-29"
,
"yyyy-MM-dd"
);
// cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
/* orderReceivedStatisticsJobHandler.execute("2019-11-29");*/
LocalDate
startLocalDate
=
LocalDate
.
of
(
2019
,
1
1
,
30
);
// orderReceivedStatisticsJobHandler.execute("2019-10-08");
LocalDate
startLocalDate
=
LocalDate
.
of
(
2019
,
1
0
,
01
);
LocalDate
endLocalDate
=
LocalDate
.
of
(
2019
,
12
,
19
);
while
(
startLocalDate
.
isBefore
(
endLocalDate
)){
String
dateStr
=
startLocalDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
startLocalDate
=
startLocalDate
.
plusDays
(
1
);
orderReceivedStatisticsJobHandler
.
execute
(
dateStr
);
}
}
}
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