Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d8da4587
authored
May 17, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add test
1 parent
e52187a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorService.java
src/test/java/cn/com/glsx/admin/modules/remote/RemoteFeignStayPointServiceTest.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorService.java
View file @
d8da458
...
@@ -509,7 +509,7 @@ public class VehicleMonitorService {
...
@@ -509,7 +509,7 @@ public class VehicleMonitorService {
case
ConstantsVehicle
.
RESIDENT_TYPE_THREE
:
case
ConstantsVehicle
.
RESIDENT_TYPE_THREE
:
startDate
=
DateUtil
.
formatDate
(
DateUtil
.
getDayBefore
(
90
,
now
));
startDate
=
DateUtil
.
formatDate
(
DateUtil
.
getDayBefore
(
90
,
now
));
break
;
break
;
//前半
个月
//前半
年
case
ConstantsVehicle
.
RESIDENT_TYPE_SIX
:
case
ConstantsVehicle
.
RESIDENT_TYPE_SIX
:
startDate
=
DateUtil
.
formatDate
(
DateUtil
.
getDayBefore
(
180
,
now
));
startDate
=
DateUtil
.
formatDate
(
DateUtil
.
getDayBefore
(
180
,
now
));
break
;
break
;
...
...
src/test/java/cn/com/glsx/admin/modules/remote/RemoteFeignStayPointServiceTest.java
0 → 100644
View file @
d8da458
package
cn
.
com
.
glsx
.
admin
.
modules
.
remote
;
import
cn.com.glsx.Application
;
import
cn.com.glsx.devicemonitor.api.dto.request.StayPointRequest
;
import
cn.com.glsx.devicemonitor.api.dto.response.StayPointRecordDTO
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.jupiter.api.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.SpringRunner
;
import
java.util.Date
;
import
java.util.List
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
/**
* @author xiangyanlin
* @date 2022/5/17
*/
@Slf4j
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
Application
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
class
RemoteFeignStayPointServiceTest
{
@Autowired
private
RemoteFeignStayPointService
remoteFeignStayPointService
;
@Test
public
void
testGet
()
{
StayPointRequest
request
=
new
StayPointRequest
();
request
.
setSn
(
"60907150063"
);
request
.
setBeginTime
(
new
Date
(
1640966400000L
));
request
.
setEndTime
(
new
Date
(
1652716800000L
));
request
.
setPeriodType
(
0
);
List
<
StayPointRecordDTO
>
stayPointRecord
=
remoteFeignStayPointService
.
getStayPointRecord
(
request
);
System
.
out
.
println
(
JSON
.
toJSONString
(
stayPointRecord
));
}
}
\ No newline at end of file
\ No newline at end of file
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