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
96657a78
Commit
96657a78
authored
Oct 18, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单统计
parent
2acff168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
ServiceTest.java
xx-order/xx-order-server/src/test/java/ServiceTest.java
+15
-8
No files found.
xx-order/xx-order-server/src/test/java/ServiceTest.java
View file @
96657a78
import
com.xxfc.platform.order.OrderApplication
;
import
com.xxfc.platform.order.biz.DailyOrderStatisticsBiz
;
import
com.xxfc.platform.order.biz.OrderStatisticsBiz
;
import
com.xxfc.platform.order.jobhandler.BaseOrderStatisticsJobHandler
;
import
com.xxfc.platform.order.pojo.HomePageOrderData
;
import
org.joda.time.DateTime
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
* @author libin
* @version 1.0
...
...
@@ -24,29 +30,31 @@ public class ServiceTest {
@Autowired
private
OrderStatisticsBiz
statisticsBiz
;
@Autowired
private
BaseOrderStatisticsJobHandler
handler
;
@Test
public
void
testSchedu
(){
public
void
testSchedu
()
{
dailyOrderStatisticsBiz
.
statisticalOrder
(
1
);
dailyOrderStatisticsBiz
.
statisticalOrder
(
1
);
}
@Test
public
void
test
()
throws
ParseException
{
String
d
=
"2019-09-01"
;
String
d
=
"2019-09-01"
;
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
parse
=
dateFormat
.
parse
(
d
);
System
.
out
.
println
(
parse
);
}
@Test
public
void
test2
()
{
public
void
test2
()
{
DateTime
dateTime
=
DateTime
.
parse
(
"2019-10-10"
);
System
.
out
.
println
(
dateTime
);
}
@Test
public
void
test3
()
{
public
void
test3
()
{
DateTime
dateTime
=
DateTime
.
parse
(
"2019-10-10"
);
Date
date
=
dateTime
.
toDate
();
DateTime
dateTime1
=
DateTime
.
parse
(
"2019-12-10"
);
...
...
@@ -58,15 +66,14 @@ public class ServiceTest {
}
@Test
public
void
handlerTeset
()
{
public
void
handlerTeset
()
{
handler
.
execute
(
"2019-10-12"
);
}
@Test
public
void
test
()
{
public
void
test
4
()
{
HomePageOrderData
totalOrder
=
statisticsBiz
.
getTotalOrder
(
null
);
System
.
out
.
println
(
totalOrder
);
...
...
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