Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
4197cb4a
提交
4197cb4a
authored
3月 21, 2022
作者:
mry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(web): 修复了controller中参数默认值,以及吞异常问题
上级
beb34e41
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
25 行增加
和
20 行删除
+25
-20
overview.ftl
kt-base/src/main/resources/templates/overview.ftl
+2
-2
ConnectController.java
...ava/org/matrix/autotest/controller/ConnectController.java
+2
-2
DynamicVariableController.java
...matrix/autotest/controller/DynamicVariableController.java
+4
-2
EnvironmentController.java
...org/matrix/autotest/controller/EnvironmentController.java
+4
-2
MoveController.java
...n/java/org/matrix/autotest/controller/MoveController.java
+4
-2
SwaggerController.java
...ava/org/matrix/autotest/controller/SwaggerController.java
+4
-3
TestCaseController.java
...va/org/matrix/autotest/controller/TestCaseController.java
+4
-2
TestJobController.java
...ava/org/matrix/autotest/controller/TestJobController.java
+1
-5
没有找到文件。
kt-base/src/main/resources/templates/overview.ftl
浏览文件 @
4197cb4a
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<td>
${failCase.type!}
</td>
<td>
${failCase.type!}
</td>
<td>
${failCase.detail!}
</td>
<td>
${failCase.detail!}
</td>
<td>
${failCase.description!}
</td>
<td>
${failCase.description!}
</td>
<td>
${failCase.result?c}
</td>
<td
style=
"color: red"
>
${failCase.result?c}
</td>
<td>
${failCase.duration!}
</td>
<td>
${failCase.duration!}
</td>
<td
class=
"clickClass"
data-message=
"${failCase.resultMessage!}"
>
查看结果
</td>
<td
class=
"clickClass"
data-message=
"${failCase.resultMessage!}"
>
查看结果
</td>
</tr>
</tr>
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<td>
${passCase.type!}
</td>
<td>
${passCase.type!}
</td>
<td>
${passCase.detail!}
</td>
<td>
${passCase.detail!}
</td>
<td>
${passCase.description!}
</td>
<td>
${passCase.description!}
</td>
<td>
${passCase.result?c}
</td>
<td
style=
"color: green"
>
${passCase.result?c}
</td>
<td>
${passCase.duration!}
</td>
<td>
${passCase.duration!}
</td>
<td
class=
"clickClass"
data-message=
"${passCase.resultMessage!}"
>
查看结果
</td>
<td
class=
"clickClass"
data-message=
"${passCase.resultMessage!}"
>
查看结果
</td>
</tr>
</tr>
...
...
kt-web/src/main/java/org/matrix/autotest/controller/ConnectController.java
浏览文件 @
4197cb4a
...
@@ -78,7 +78,7 @@ public class ConnectController {
...
@@ -78,7 +78,7 @@ public class ConnectController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Connect
>>>
findPageConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Connect
>>>
findPageConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
)
{
Page
<
Connect
>
results
=
Optional
.
ofNullable
(
connectService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Connect
>
results
=
Optional
.
ofNullable
(
connectService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Connect
.
class
)
,
Wrappers
.
lambdaQuery
(
Connect
.
class
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
@@ -100,7 +100,7 @@ public class ConnectController {
...
@@ -100,7 +100,7 @@ public class ConnectController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Connect
>>>
findConditionConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Connect
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
)
{
Page
<
Connect
>
results
=
Optional
.
ofNullable
(
connectService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Connect
>
results
=
Optional
.
ofNullable
(
connectService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Connect
.
class
)
,
Wrappers
.
lambdaQuery
(
Connect
.
class
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
...
kt-web/src/main/java/org/matrix/autotest/controller/DynamicVariableController.java
浏览文件 @
4197cb4a
...
@@ -49,7 +49,8 @@ public class DynamicVariableController {
...
@@ -49,7 +49,8 @@ public class DynamicVariableController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
DynamicVariable
>>>
findPageConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
DynamicVariable
>>>
findPageConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
DynamicVariable
>
results
=
Optional
.
ofNullable
(
dynamicVariableService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
DynamicVariable
>
results
=
Optional
.
ofNullable
(
dynamicVariableService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
DynamicVariable
.
class
).
eq
(
DynamicVariable:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
DynamicVariable
.
class
).
eq
(
DynamicVariable:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
@@ -72,7 +73,8 @@ public class DynamicVariableController {
...
@@ -72,7 +73,8 @@ public class DynamicVariableController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
DynamicVariable
>>>
findConditionConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
DynamicVariable
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
DynamicVariable
>
results
=
Optional
.
ofNullable
(
dynamicVariableService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
DynamicVariable
>
results
=
Optional
.
ofNullable
(
dynamicVariableService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
DynamicVariable
.
class
).
eq
(
DynamicVariable:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
DynamicVariable
.
class
).
eq
(
DynamicVariable:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
...
kt-web/src/main/java/org/matrix/autotest/controller/EnvironmentController.java
浏览文件 @
4197cb4a
...
@@ -49,7 +49,8 @@ public class EnvironmentController {
...
@@ -49,7 +49,8 @@ public class EnvironmentController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Environment
>>>
findPageConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Environment
>>>
findPageConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Environment
>
results
=
Optional
.
ofNullable
(
environmentService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Environment
>
results
=
Optional
.
ofNullable
(
environmentService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
@@ -72,7 +73,8 @@ public class EnvironmentController {
...
@@ -72,7 +73,8 @@ public class EnvironmentController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Environment
>>>
findConditionConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Environment
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Environment
>
results
=
Optional
.
ofNullable
(
environmentService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Environment
>
results
=
Optional
.
ofNullable
(
environmentService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
...
kt-web/src/main/java/org/matrix/autotest/controller/MoveController.java
浏览文件 @
4197cb4a
...
@@ -73,7 +73,8 @@ public class MoveController {
...
@@ -73,7 +73,8 @@ public class MoveController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Move
>>>
findPageConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Move
>>>
findPageConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Move
>
results
=
Optional
.
ofNullable
(
moveService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Move
>
results
=
Optional
.
ofNullable
(
moveService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Move
.
class
).
eq
(
Move:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
Move
.
class
).
eq
(
Move:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
@@ -96,7 +97,8 @@ public class MoveController {
...
@@ -96,7 +97,8 @@ public class MoveController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
Move
>>>
findConditionConnects
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
Move
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Move
>
results
=
Optional
.
ofNullable
(
moveService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
Move
>
results
=
Optional
.
ofNullable
(
moveService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Move
.
class
).
eq
(
Move:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
Move
.
class
).
eq
(
Move:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
...
...
kt-web/src/main/java/org/matrix/autotest/controller/SwaggerController.java
浏览文件 @
4197cb4a
...
@@ -62,6 +62,7 @@ public class SwaggerController {
...
@@ -62,6 +62,7 @@ public class SwaggerController {
}
}
reader
.
close
();
reader
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
GlobalException
(
String
.
format
(
"请求swagger数据失败,您读的swagger地址ip为 %s"
,
url
));
throw
new
GlobalException
(
String
.
format
(
"请求swagger数据失败,您读的swagger地址ip为 %s"
,
url
));
}
}
return
json
.
toString
();
return
json
.
toString
();
...
@@ -169,7 +170,7 @@ public class SwaggerController {
...
@@ -169,7 +170,7 @@ public class SwaggerController {
* @param swaggerUrl 查询条件: 方法的url
* @param swaggerUrl 查询条件: 方法的url
* @return Swagger中的数据
* @return Swagger中的数据
*/
*/
@
Pos
tMapping
@
Ge
tMapping
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ApiOperation
(
value
=
"快速添加接口"
)
@ApiOperation
(
value
=
"快速添加接口"
)
public
CommonPage
<
List
<
InterfaceInformation
>>
parameter
(
public
CommonPage
<
List
<
InterfaceInformation
>>
parameter
(
...
@@ -177,8 +178,8 @@ public class SwaggerController {
...
@@ -177,8 +178,8 @@ public class SwaggerController {
Long
id
,
Long
id
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
String
swaggerUrl
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
swaggerUrl
)
{
//将所有的默认选项置为false
//将所有的默认选项置为false
environmentService
.
setIsDefaultByWrapper
(
false
,
environmentService
.
setIsDefaultByWrapper
(
false
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
));
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
));
...
...
kt-web/src/main/java/org/matrix/autotest/controller/TestCaseController.java
浏览文件 @
4197cb4a
...
@@ -70,7 +70,8 @@ public class TestCaseController {
...
@@ -70,7 +70,8 @@ public class TestCaseController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
TestCase
>>>
findPageTestCase
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
TestCase
>>>
findPageTestCase
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
)
...
@@ -99,7 +100,8 @@ public class TestCaseController {
...
@@ -99,7 +100,8 @@ public class TestCaseController {
public
ResponseEntity
<
CommonResultObj
<
Page
<
TestCase
>>>
findConditionTestCase
(
public
ResponseEntity
<
CommonResultObj
<
Page
<
TestCase
>>>
findConditionTestCase
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
).
eq
(
TestCase:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
).
eq
(
TestCase:
:
getProjectId
,
projectId
)
...
...
kt-web/src/main/java/org/matrix/autotest/controller/TestJobController.java
浏览文件 @
4197cb4a
...
@@ -55,7 +55,7 @@ public class TestJobController {
...
@@ -55,7 +55,7 @@ public class TestJobController {
public
ResponseEntity
<
CommonResultObj
<
IPage
<
TestJobVo
>>>
findPageTestTasks
(
public
ResponseEntity
<
CommonResultObj
<
IPage
<
TestJobVo
>>>
findPageTestTasks
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
name
)
{
IPage
<
TestJobVo
>
result
=
testJobService
.
pageTestJob
(
name
,
pageSize
,
pageNum
);
IPage
<
TestJobVo
>
result
=
testJobService
.
pageTestJob
(
name
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
result
,
"查询成功"
);
return
CommonResult
.
success
(
result
,
"查询成功"
);
}
}
...
@@ -73,10 +73,6 @@ public class TestJobController {
...
@@ -73,10 +73,6 @@ public class TestJobController {
,
"添加成功"
,
"添加失败"
);
,
"添加成功"
,
"添加失败"
);
}
}
// public ResponseEntity<CommonResultObj<TestJob>> insertByFilter(){
//
// }
/**
/**
* 修改测试任务
* 修改测试任务
*
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论