Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
b21248f8
提交
b21248f8
authored
3月 18, 2022
作者:
mry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(web): 新增了条件查询接口
上级
f3980f7f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
120 行增加
和
0 行删除
+120
-0
ConnectController.java
...ava/org/matrix/autotest/controller/ConnectController.java
+22
-0
DynamicVariableController.java
...matrix/autotest/controller/DynamicVariableController.java
+23
-0
EnvironmentController.java
...org/matrix/autotest/controller/EnvironmentController.java
+23
-0
MoveController.java
...n/java/org/matrix/autotest/controller/MoveController.java
+23
-0
TestCaseController.java
...va/org/matrix/autotest/controller/TestCaseController.java
+29
-0
没有找到文件。
kt-web/src/main/java/org/matrix/autotest/controller/ConnectController.java
浏览文件 @
b21248f8
...
@@ -57,6 +57,28 @@ public class ConnectController {
...
@@ -57,6 +57,28 @@ public class ConnectController {
return
CommonResult
.
success
(
results
,
"查询成功"
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
}
/**
* 分页查询所有数据库信息
*
* @param pageSize 每页多少条数据
* @param pageNum 当前第几页
* @param name 数据库名称
* @return 分页查询的结果, 数据库信息
*/
@ApiOperation
(
value
=
"分页查询数据库信息"
)
@GetMapping
(
"/condition"
)
public
ResponseEntity
<
CommonResultObj
<
Page
<
Connect
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
)
{
Page
<
Connect
>
results
=
Optional
.
ofNullable
(
connectService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Connect
.
class
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
Connect:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
/**
/**
* 添加连接池
* 添加连接池
*
*
...
...
kt-web/src/main/java/org/matrix/autotest/controller/DynamicVariableController.java
浏览文件 @
b21248f8
...
@@ -58,6 +58,29 @@ public class DynamicVariableController {
...
@@ -58,6 +58,29 @@ public class DynamicVariableController {
return
CommonResult
.
success
(
results
,
"查询成功"
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
}
/**
* 分页查询所有动参
*
* @param pageSize 每页多少条数据
* @param pageNum 当前第几页
* @param name 动参名称
* @param projectId 项目id
* @return 分页查询的结果, 动参
*/
@ApiOperation
(
value
=
"分页查询动参"
)
@GetMapping
(
"/condition/{projectId}"
)
public
ResponseEntity
<
CommonResultObj
<
Page
<
DynamicVariable
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
DynamicVariable
>
results
=
Optional
.
ofNullable
(
dynamicVariableService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
DynamicVariable
.
class
).
eq
(
DynamicVariable:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
DynamicVariable:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
/**
/**
* 添加动态变量
* 添加动态变量
*
*
...
...
kt-web/src/main/java/org/matrix/autotest/controller/EnvironmentController.java
浏览文件 @
b21248f8
...
@@ -58,6 +58,29 @@ public class EnvironmentController {
...
@@ -58,6 +58,29 @@ public class EnvironmentController {
return
CommonResult
.
success
(
results
,
"查询成功"
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
}
/**
* 分页查询所有环境
*
* @param pageSize 每页多少条数据
* @param pageNum 当前第几页
* @param name 环境名称
* @param projectId 项目id
* @return 分页查询的结果, 环境
*/
@ApiOperation
(
value
=
"分页查询环境"
)
@GetMapping
(
"/condition/{projectId}"
)
public
ResponseEntity
<
CommonResultObj
<
Page
<
Environment
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Environment
>
results
=
Optional
.
ofNullable
(
environmentService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Environment
.
class
).
eq
(
Environment:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
Environment:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
/**
/**
* 添加环境
* 添加环境
*
*
...
...
kt-web/src/main/java/org/matrix/autotest/controller/MoveController.java
浏览文件 @
b21248f8
...
@@ -70,6 +70,29 @@ public class MoveController {
...
@@ -70,6 +70,29 @@ public class MoveController {
return
CommonResult
.
success
(
results
,
"查询成功"
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
}
/**
* 分页查询所有行为
*
* @param pageSize 每页多少条数据
* @param pageNum 当前第几页
* @param name 行为名称
* @param projectId 项目id
* @return 分页查询的结果, 行为
*/
@ApiOperation
(
value
=
"分页查询行为"
)
@GetMapping
(
"/condition/{projectId}"
)
public
ResponseEntity
<
CommonResultObj
<
Page
<
Move
>>>
findConditionConnects
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
Move
>
results
=
Optional
.
ofNullable
(
moveService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
Move
.
class
).
eq
(
Move:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
Move:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
/**
/**
* 输入行为主键id,查询出行为以及行为下包含的所有动作
* 输入行为主键id,查询出行为以及行为下包含的所有动作
*
*
...
...
kt-web/src/main/java/org/matrix/autotest/controller/TestCaseController.java
浏览文件 @
b21248f8
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.matrix.autotest.utils.PageTools
;
import
org.matrix.database.entity.TestCase
;
import
org.matrix.database.entity.TestCase
;
import
org.matrix.database.entity.TestData
;
import
org.matrix.database.entity.TestData
;
import
org.matrix.database.service.ITestCaseService
;
import
org.matrix.database.service.ITestCaseService
;
...
@@ -80,6 +81,34 @@ public class TestCaseController {
...
@@ -80,6 +81,34 @@ public class TestCaseController {
return
CommonResult
.
success
(
results
,
"查询成功"
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
}
/**
* 分页查询所有用例
*
* @param pageSize 每页多少条数据
* @param pageNum 当前第几页
* @param name 行为名称
* @param projectId 项目id
* @return 分页查询的结果, 用例
*/
@GetMapping
(
"/condition/{projectId}"
)
@ApiOperation
(
value
=
"分页查询用例"
)
@Cacheable
(
cacheNames
=
"casePageCache"
,
key
=
"#pageNum + '_' + #pageSize"
,
condition
=
"#pageSize != null && #pageNum !=null"
,
unless
=
"#result.statusCodeValue != 200"
)
public
ResponseEntity
<
CommonResultObj
<
Page
<
TestCase
>>>
findConditionTestCase
(
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
).
eq
(
TestCase:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
TestCase:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
return
CommonResult
.
success
(
results
,
"查询成功"
);
}
/**
/**
* 输入用例主键id,查询出用例以及用例下包含的所有数据组
* 输入用例主键id,查询出用例以及用例下包含的所有数据组
*
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论