Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b3e43c86
提交
b3e43c86
authored
9月 16, 2020
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[核查模块]
功能增加 - detail 与 stat 数据增加remark字段,信息为前端传入的remark - Stat 字段增加 checkUserId 与 checkUserName 字段 - 维护title标题
上级
6fea8a9a
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
92 行增加
和
77 行删除
+92
-77
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+13
-9
DeviceCheckBillEntity.java
...ice/confirmcheck/entity/domain/DeviceCheckBillEntity.java
+1
-0
DeviceCheckDetailEntity.java
...e/confirmcheck/entity/domain/DeviceCheckDetailEntity.java
+18
-41
DeviceCheckStat.java
...ev/device/confirmcheck/entity/domain/DeviceCheckStat.java
+10
-18
CheckDetailVo.java
...tykj/dev/device/confirmcheck/entity/vo/CheckDetailVo.java
+5
-1
CheckStatVo.java
...m/tykj/dev/device/confirmcheck/entity/vo/CheckStatVo.java
+15
-2
ObjTransUtil.java
.../com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
+26
-4
DeviceCheckControllerTest.java
.../com/tykj/dev/confirmcheck/DeviceCheckControllerTest.java
+2
-2
BaseTest.java
dev-union/src/test/java/com/tykj/dev/union/BaseTest.java
+2
-0
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
b3e43c86
...
...
@@ -92,7 +92,7 @@ public class DeviceCheckController {
public
ResponseEntity
findStatById
(
@PathVariable
Integer
id
)
{
//还要查询出所有的
CheckStatVo
statVoList
=
statRepo
.
findById
(
id
)
.
map
(
DeviceCheckStat:
:
to
Vo
)
.
map
(
transUtil:
:
checkStatDo2
Vo
)
.
orElse
(
CheckStatVo
.
empty
());
return
ResponseEntity
.
ok
(
new
ResultObj
(
statVoList
));
}
...
...
@@ -129,7 +129,7 @@ public class DeviceCheckController {
log
.
info
(
"[核查模块]发起手动核查,发起单位为{},被查单位为{}"
,
startUnit
.
getName
(),
checkedUnitNames
);
// 2-1 构建发起单位的 统计账单
DeviceCheckStat
provinceCheckStat
=
initStatData
(
startUnit
.
getName
(),
checkedUnits
);
DeviceCheckStat
provinceCheckStat
=
initStatData
(
billVo
.
getRemark
(),
billVo
.
getUserAId
(),
billVo
.
getUserBId
(),
billVo
.
getCheckTitle
(),
startUnit
.
getName
(),
checkedUnits
);
Integer
billId
=
statRepo
.
save
(
provinceCheckStat
).
getId
();
// 2-2 构建发起单位的 统计任务
TaskBto
provStatTask
=
new
Task
(
CHECK_STAT_0
.
id
,
CONFIRM_CHECK_STAT
.
name
,
0
,
".0."
,
CONFIRM_CHECK_STAT
.
id
,
billId
,
startUnitId
)
...
...
@@ -153,7 +153,7 @@ public class DeviceCheckController {
// 对每个需要核查的单位构建其detail账单与task
for
(
Units
unit
:
checkedUnits
)
{
// 3-1 构建被查单位的 自查账单
DeviceCheckDetailEntity
unitDetailDoc
=
DeviceCheckDetailEntity
.
EmptyWithChecker
(
billVo
.
getUserAId
(),
billVo
.
getUserBId
(),
0
,
0
,
unit
.
getName
(),
devInLib
.
getOrDefault
(
unit
.
getName
(),
new
ArrayList
<>()),
devNotInLib
.
getOrDefault
(
unit
.
getName
(),
new
ArrayList
<>()));
DeviceCheckDetailEntity
unitDetailDoc
=
DeviceCheckDetailEntity
.
EmptyWithChecker
(
billVo
.
get
Remark
(),
billVo
.
getCheckTitle
(),
billVo
.
get
UserAId
(),
billVo
.
getUserBId
(),
0
,
0
,
unit
.
getName
(),
devInLib
.
getOrDefault
(
unit
.
getName
(),
new
ArrayList
<>()),
devNotInLib
.
getOrDefault
(
unit
.
getName
(),
new
ArrayList
<>()));
DeviceCheckDetailEntity
detail
=
detailRepo
.
save
(
unitDetailDoc
);
// 3-1 构建被查单位的 自查任务 (根据被查单位的级别来区分是县级状态是市级状态)
TaskBto
checkedTask
=
new
TaskBto
(
CHECK_DETAIL_0
.
id
,
"自核查任务"
,
provStatTask
.
getId
(),
addNode
(
provStatTask
.
getNodeIdDetail
(),
provStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
detail
.
getId
(),
unit
.
getUnitId
(),
0
);
...
...
@@ -281,7 +281,7 @@ public class DeviceCheckController {
// 获得当前城市的统计信息 以及 要汇总的地区信息 并累加保存
List
<
CheckDeviceStatVo
>
addVos
=
parseStatString2Vo
(
currentTask
,
level
,
currentDetail
.
getCheckDetail
());
CheckStatVo
resultVo
=
statRepo
.
findById
(
statId
).
get
().
toVo
(
);
CheckStatVo
resultVo
=
transUtil
.
checkStatDo2Vo
(
statRepo
.
findById
(
statId
).
get
()
);
resultVo
.
setDeviceStatVoList
(
accumulateStat
(
addVos
,
resultVo
.
getDeviceStatVoList
()));
statRepo
.
save
(
resultVo
.
toDo
());
...
...
@@ -326,8 +326,8 @@ public class DeviceCheckController {
if
(
hasParent
)
{
// 累加当前地区数据
TaskBto
parentTask
=
taskService
.
get
(
parentTaskId
);
CheckStatVo
cityStat
=
statRepo
.
findById
(
statId
).
get
().
toVo
(
);
CheckStatVo
provinceStat
=
statRepo
.
findById
(
parentTask
.
getBillId
()).
get
().
toVo
(
);
CheckStatVo
cityStat
=
transUtil
.
checkStatDo2Vo
(
statRepo
.
findById
(
statId
).
get
()
);
CheckStatVo
provinceStat
=
transUtil
.
checkStatDo2Vo
(
statRepo
.
findById
(
parentTask
.
getBillId
()).
get
()
);
List
<
CheckDeviceStatVo
>
accStat
=
accumulateStat
(
cityStat
.
getDeviceStatVoList
(),
provinceStat
.
getDeviceStatVoList
());
provinceStat
.
setDeviceStatVoList
(
accStat
);
statRepo
.
save
(
provinceStat
.
toDo
());
...
...
@@ -418,7 +418,7 @@ public class DeviceCheckController {
* @param startUnitName 发起核查的单位名
* @param unitsList 被核查单位列表
*/
private
DeviceCheckStat
initStatData
(
String
startUnitName
,
List
<
Units
>
unitsList
)
{
private
DeviceCheckStat
initStatData
(
String
remark
,
Integer
checkUserAId
,
Integer
checkUserBId
,
String
checkTitle
,
String
startUnitName
,
List
<
Units
>
unitsList
)
{
//获得要被统计的单位名列表
List
<
String
>
unitNameList
=
unitsList
.
stream
().
map
(
Units:
:
getName
).
collect
(
toList
());
Map
<
String
,
List
<
DeviceLibrary
>>
modelMap
=
deviceRepo
.
findAll
()
...
...
@@ -450,8 +450,12 @@ public class DeviceCheckController {
LocalDate
startTime
=
LocalDate
.
now
();
LocalDate
endTime
=
startTime
.
plusMonths
(
1
);
return
new
CheckStatVo
(
null
,
"2020年下半年核查--"
+
startUnitName
,
return
new
CheckStatVo
(
remark
,
checkUserAId
,
checkUserBId
,
null
,
checkTitle
+
startUnitName
+
"核查统计单"
,
startUnitName
+
"待核查装备统计"
,
localDateToDate
(
startTime
),
localDateToDate
(
endTime
),
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/domain/DeviceCheckBillEntity.java
浏览文件 @
b3e43c86
...
...
@@ -26,6 +26,7 @@ import java.util.Date;
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"装备核查账单"
)
@NoArgsConstructor
@Table
(
name
=
"device_check_bill"
)
public
class
DeviceCheckBillEntity
{
/**
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/domain/DeviceCheckDetailEntity.java
浏览文件 @
b3e43c86
...
...
@@ -19,7 +19,6 @@ import org.springframework.util.StringUtils;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -33,6 +32,7 @@ import java.util.stream.Collectors;
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"核查详情"
)
@NoArgsConstructor
@Table
(
name
=
"device_check_detail"
)
public
class
DeviceCheckDetailEntity
{
/**
...
...
@@ -40,9 +40,14 @@ public class DeviceCheckDetailEntity {
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
/**
* 检查详情名称
*/
@ApiModelProperty
(
name
=
"检查详情名称"
)
private
String
title
;
/**
* 核查账单id
*/
...
...
@@ -165,9 +170,6 @@ public class DeviceCheckDetailEntity {
@ApiModelProperty
(
value
=
"预留字段2"
)
private
String
var2
;
@ApiModelProperty
(
value
=
"核查标题"
)
@Transient
private
String
title
;
@ApiModelProperty
(
value
=
"创建人"
)
@Transient
private
String
createUser
;
...
...
@@ -195,7 +197,8 @@ public class DeviceCheckDetailEntity {
/**
* 用于生成县级的核查详情账单的构造函数
*/
public
DeviceCheckDetailEntity
(
Integer
finalCheckId
,
public
DeviceCheckDetailEntity
(
String
title
,
Integer
finalCheckId
,
Integer
checkUserAId
,
Integer
checkUserBId
,
Integer
userAId
,
...
...
@@ -206,7 +209,9 @@ public class DeviceCheckDetailEntity {
Integer
checkedCount
,
String
checkResult
,
String
checkDetail
,
Integer
checkStatus
)
{
Integer
checkStatus
,
String
remark
)
{
this
.
title
=
title
;
this
.
finalCheckId
=
finalCheckId
;
this
.
checkUserAId
=
checkUserAId
;
this
.
checkUserBId
=
checkUserBId
;
...
...
@@ -219,6 +224,7 @@ public class DeviceCheckDetailEntity {
this
.
checkResult
=
checkResult
;
this
.
checkDetail
=
checkDetail
;
this
.
checkStatus
=
checkStatus
;
this
.
remark
=
remark
;
}
/**
...
...
@@ -227,39 +233,9 @@ public class DeviceCheckDetailEntity {
* @param badDevices 所属在,但所在不在本单位的装备集合
* @return 初始化的账单(还没有被人修改过的)
*/
public
static
DeviceCheckDetailEntity
Empty
(
String
checkUnit
,
List
<
DeviceLibrary
>
goodDevices
,
List
<
DeviceLibrary
>
badDevices
)
{
//构造checkDetail 分当前在库与不在库的 赋予不同状态
String
goodCheckDetail
=
goodDevices
.
stream
()
.
map
(
DeviceLibrary:
:
getId
)
.
map
(
Objects:
:
toString
)
.
collect
(
Collectors
.
joining
(
"-2,"
));
String
badCheckDetail
=
badDevices
.
stream
()
.
map
(
DeviceLibrary:
:
getId
)
.
map
(
Objects:
:
toString
)
.
collect
(
Collectors
.
joining
(
"-3,"
));
//如果不在库的不为空,则拼接,否则没必要
String
checkDetail
=
StringUtils
.
isEmpty
(
badCheckDetail
)
?
goodCheckDetail
:
goodCheckDetail
+
","
+
badCheckDetail
;
return
new
DeviceCheckDetailEntity
(
0
,
0
,
0
,
0
,
0
,
TimestampUtil
.
getNowDate
(),
checkUnit
,
goodDevices
.
size
(),
0
,
""
,
checkDetail
,
0
);
}
public
static
DeviceCheckDetailEntity
EmptyWithChecker
(
String
remark
,
String
title
,
Integer
checkUserA
,
Integer
checkUserB
,
Integer
userAId
,
...
...
@@ -287,6 +263,7 @@ public class DeviceCheckDetailEntity {
String
checkDetail
=
StringUtils
.
isEmpty
(
badCheckDetail
)
?
goodCheckDetail
:
goodCheckDetail
+
","
+
badCheckDetail
;
return
new
DeviceCheckDetailEntity
(
title
+
checkUnit
+
"核查详情单"
,
0
,
checkUserA
,
checkUserB
,
...
...
@@ -298,8 +275,8 @@ public class DeviceCheckDetailEntity {
0
,
""
,
checkDetail
,
0
0
,
remark
);
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/domain/DeviceCheckStat.java
浏览文件 @
b3e43c86
package
com
.
tykj
.
dev
.
device
.
confirmcheck
.
entity
.
domain
;
import
com.tykj.dev.device.confirmcheck.entity.vo.CheckDeviceStatVo
;
import
com.tykj.dev.device.confirmcheck.entity.vo.CheckStatVo
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.data.annotation.CreatedBy
;
import
org.springframework.data.annotation.CreatedDate
;
import
org.springframework.data.annotation.LastModifiedBy
;
...
...
@@ -18,7 +13,6 @@ import org.springframework.data.annotation.LastModifiedDate;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.Arrays
;
import
java.util.Date
;
/**
...
...
@@ -34,6 +28,7 @@ import java.util.Date;
@Where
(
clause
=
"delete_tag = 0"
)
@ApiModel
(
"装备核查统计"
)
@NoArgsConstructor
@Table
(
name
=
"device_check_stat"
)
public
class
DeviceCheckStat
{
/**
* 主键
...
...
@@ -67,6 +62,14 @@ public class DeviceCheckStat {
*/
private
String
statInfo
;
@Column
(
name
=
"check_UserA_id"
)
private
Integer
checkUserAId
;
@Column
(
name
=
"check_UserB_id"
)
private
Integer
checkUserBId
;
private
String
remark
;
/**
* 创建用户id
*/
...
...
@@ -108,16 +111,5 @@ public class DeviceCheckStat {
this
.
statInfo
=
statInfo
;
}
/**
* Do类转化为Vo类
*/
public
CheckStatVo
toVo
()
{
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
//复制基本信息
CheckStatVo
initialStat
=
mapper
.
map
(
this
,
CheckStatVo
.
class
);
//解析JSON并赋值
CheckDeviceStatVo
[]
checkDeviceStatVos
=
JacksonUtil
.
readValue
(
this
.
statInfo
,
CheckDeviceStatVo
[].
class
);
initialStat
.
setDeviceStatVoList
(
Arrays
.
asList
(
checkDeviceStatVos
));
return
initialStat
;
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckDetailVo.java
浏览文件 @
b3e43c86
...
...
@@ -19,12 +19,16 @@ import java.util.List;
@AllArgsConstructor
public
class
CheckDetailVo
{
/**
* 主键id
*/
@ApiModelProperty
(
name
=
"主键id"
)
private
Integer
id
;
/**
* 检查详情名称
*/
@ApiModelProperty
(
name
=
"检查详情名称"
)
private
String
title
;
/**
* 核查账单id
*/
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/entity/vo/CheckStatVo.java
浏览文件 @
b3e43c86
...
...
@@ -64,23 +64,36 @@ public class CheckStatVo {
private
Integer
updateUserId
;
private
Integer
checkUserAId
;
private
Integer
checkUserBId
;
private
String
checkUserAName
;
private
String
checkUserBName
;
private
String
remark
;
/**
* 核查装备详情
*/
private
List
<
CheckDeviceStatVo
>
deviceStatVoList
;
public
CheckStatVo
(
Integer
id
,
String
title
,
String
subtitle
,
Date
startTime
,
Date
endTime
,
List
<
CheckDeviceStatVo
>
deviceStatVoList
)
{
public
CheckStatVo
(
String
remark
,
Integer
checkUserAId
,
Integer
checkUserBId
,
Integer
id
,
String
title
,
String
subtitle
,
Date
startTime
,
Date
endTime
,
List
<
CheckDeviceStatVo
>
deviceStatVoList
)
{
this
.
checkUserAId
=
checkUserAId
;
this
.
checkUserBId
=
checkUserBId
;
this
.
id
=
id
;
this
.
title
=
title
;
this
.
subtitle
=
subtitle
;
this
.
startTime
=
startTime
;
this
.
endTime
=
endTime
;
this
.
deviceStatVoList
=
deviceStatVoList
;
this
.
remark
=
remark
;
}
public
static
CheckStatVo
empty
()
{
List
<
CheckDeviceStatVo
>
emptyList
=
new
ArrayList
<>();
return
new
CheckStatVo
(
0
,
"无指定数据"
,
"无指定数据"
,
null
,
null
,
emptyList
);
return
new
CheckStatVo
(
""
,
0
,
0
,
0
,
"无指定数据"
,
"无指定数据"
,
null
,
null
,
emptyList
);
}
/**
...
...
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/utils/ObjTransUtil.java
浏览文件 @
b3e43c86
...
...
@@ -3,17 +3,17 @@ package com.tykj.dev.device.confirmcheck.utils;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckBillEntity
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckDetailEntity
;
import
com.tykj.dev.device.confirmcheck.entity.vo.CheckBillVo
;
import
com.tykj.dev.device.confirmcheck.entity.vo.CheckDetailVo
;
import
com.tykj.dev.device.confirmcheck.entity.vo.DeviceInLibVo
;
import
com.tykj.dev.device.confirmcheck.entity.vo.DeviceNotInLibVo
;
import
com.tykj.dev.device.confirmcheck.entity.domain.DeviceCheckStat
;
import
com.tykj.dev.device.confirmcheck.entity.vo.*
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.user.subject.dao.AreaDao
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.dao.UserDao
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
org.modelmapper.ModelMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -45,6 +46,27 @@ public class ObjTransUtil {
@Autowired
private
UnitsDao
unitRepo
;
/**
* Do类转化为Vo类
*/
public
CheckStatVo
checkStatDo2Vo
(
DeviceCheckStat
statDo
)
{
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
//复制基本信息
CheckStatVo
initialStat
=
mapper
.
map
(
statDo
,
CheckStatVo
.
class
);
// 查询userAName 与 userBName
User
checkUserA
=
userRepo
.
findById
(
statDo
.
getCheckUserAId
()).
orElse
(
null
);
String
userAName
=
checkUserA
==
null
?
""
:
checkUserA
.
getName
();
User
checkUserB
=
userRepo
.
findById
(
statDo
.
getCheckUserBId
()).
orElse
(
null
);
String
userBName
=
checkUserB
==
null
?
""
:
checkUserB
.
getName
();
//解析JSON并赋值
CheckDeviceStatVo
[]
checkDeviceStatVos
=
JacksonUtil
.
readValue
(
statDo
.
getStatInfo
(),
CheckDeviceStatVo
[].
class
);
initialStat
.
setDeviceStatVoList
(
Arrays
.
asList
(
checkDeviceStatVos
));
initialStat
.
setCheckUserAName
(
userAName
);
initialStat
.
setCheckUserBName
(
userBName
);
return
initialStat
;
}
public
DeviceCheckBillEntity
checkBillVo2Do
(
CheckBillVo
vo
)
{
ModelMapper
modelMapper
=
BeanHelper
.
getUserMapper
();
DeviceCheckBillEntity
billDo
=
modelMapper
.
map
(
vo
,
DeviceCheckBillEntity
.
class
);
...
...
dev-union/src/test/java/com/tykj/dev/confirmcheck/DeviceCheckControllerTest.java
浏览文件 @
b3e43c86
...
...
@@ -14,9 +14,9 @@ import com.tykj.dev.device.task.subject.domin.Task;
import
com.tykj.dev.union.BaseTest
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
;
import
org.springframework.http.MediaType
;
import
org.springframework.security.test.context.support.WithMockUser
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.web.servlet.MockMvc
;
import
org.springframework.test.web.servlet.RequestBuilder
;
...
...
@@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@SuppressWarnings
(
"ALL"
)
@WithMockUser
(
username
=
"shena"
,
password
=
"qwer1234"
,
authorities
=
"省A专管员"
)
@A
utoConfigureMockMvc
@A
ctiveProfiles
(
"dev"
)
class
DeviceCheckControllerTest
extends
BaseTest
{
@Autowired
...
...
dev-union/src/test/java/com/tykj/dev/union/BaseTest.java
浏览文件 @
b3e43c86
package
com
.
tykj
.
dev
.
union
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
...
...
@@ -12,5 +13,6 @@ import org.springframework.test.context.junit4.SpringRunner;
*/
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
UnionApplication
.
class
,
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
@AutoConfigureMockMvc
public
class
BaseTest
{
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论