Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QG
customer-service
Commits
d6515d4e
Commit
d6515d4e
authored
Aug 17, 2020
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
99afdf82
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
3 deletions
+55
-3
WorkOrderRest.java
src/main/java/cn/quantgroup/customer/rest/WorkOrderRest.java
+2
-2
WorkOrderServiceImpl.java
...uantgroup/customer/service/impl/WorkOrderServiceImpl.java
+1
-1
WorkOrderTest.java
src/test/xiaoman/WorkOrderTest.java
+52
-0
No files found.
src/main/java/cn/quantgroup/customer/rest/WorkOrderRest.java
View file @
d6515d4e
...
...
@@ -20,13 +20,13 @@ import java.io.IOException;
*/
@Slf4j
@RestController
@RequestMapping
(
"work
O
rder"
)
@RequestMapping
(
"work
_o
rder"
)
public
class
WorkOrderRest
{
@Autowired
private
IWorkOrderService
workOrderService
;
@GetMapping
(
"query
P
age"
)
@GetMapping
(
"query
_p
age"
)
public
JsonResult
queryPage
(
Integer
pageNumber
,
Integer
pageSize
,
String
phone
,
String
status
)
{
WorkOrderStatus
statusEnum
;
try
{
...
...
src/main/java/cn/quantgroup/customer/service/impl/WorkOrderServiceImpl.java
View file @
d6515d4e
...
...
@@ -109,7 +109,7 @@ public class WorkOrderServiceImpl implements IWorkOrderService {
workOrderVO
.
setType1
(
it
.
getType1
());
workOrderVO
.
setType2
(
it
.
getType2
());
workOrderVO
.
setType3
(
it
.
getType3
());
workOrderVO
.
setPriority
(
it
.
getPriority
()
.
getDesc
()
);
workOrderVO
.
setPriority
(
it
.
getPriority
()
!=
null
?
it
.
getPriority
().
getDesc
()
:
""
);
workOrderVO
.
setStatus
(
it
.
getStatus
().
getDesc
());
workOrderVO
.
setCreateUsername
(
it
.
getCreateUsername
());
workOrderVO
.
setOpUsername
(
it
.
getOpUsername
());
...
...
src/test/xiaoman/WorkOrderTest.java
0 → 100644
View file @
d6515d4e
package
xiaoman
;
import
cn.quantgroup.customer.Bootstrap
;
import
cn.quantgroup.customer.model.workorder.WorkOrderVO
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IWorkOrderService
;
import
cn.quantgroup.customer.util.JSONTools
;
import
cn.quantgroup.customer.util.poi.ReaderTest
;
import
com.ctrip.framework.apollo.spring.config.ApolloPropertySourceInitializer
;
import
lombok.extern.slf4j.Slf4j
;
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.data.domain.Page
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringRunner
;
/**
* @description:
* @author:tao
* @create: 2020-08-14 16:28
*/
@Slf4j
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
Bootstrap
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
@ContextConfiguration
(
initializers
=
ApolloPropertySourceInitializer
.
class
)
public
class
WorkOrderTest
{
@Autowired
private
IWorkOrderService
workOrderService
;
/**
* 导入数据
* @throws Exception
*/
@Test
public
void
workOrderTest
()
throws
Exception
{
ReaderTest
readerTest
=
new
ReaderTest
();
readerTest
.
read
();
workOrderService
.
importData
(
readerTest
.
getList
());
}
@Test
public
void
queryPage
()
{
JsonResult
<
Page
<
WorkOrderVO
>>
pageJsonResult
=
workOrderService
.
queryWorkOrder
(
1
,
2
,
null
,
null
);
System
.
out
.
println
(
JSONTools
.
serialize
(
pageJsonResult
));
}
}
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