Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
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
QA
holmes
Commits
ef8d1bf4
Commit
ef8d1bf4
authored
Sep 03, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/pipeline/list新增参数
parent
b9abfd83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
PipelineController.java
...va/cn/qg/holmes/controller/gitlab/PipelineController.java
+13
-1
No files found.
src/main/java/cn/qg/holmes/controller/gitlab/PipelineController.java
View file @
ef8d1bf4
...
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -56,9 +57,20 @@ public class PipelineController {
}
@GetMapping
(
"/list"
)
public
JsonResult
getDingRobotAndPipelineList
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
)
{
public
JsonResult
getDingRobotAndPipelineList
(
String
jiraProjectKey
,
String
projectName
,
String
namespace
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
)
{
IPage
<
DingRobot
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
QueryWrapper
<
DingRobot
>
dingRobotQueryWrapper
=
new
QueryWrapper
();
if
(!
StringUtils
.
isEmpty
(
jiraProjectKey
))
{
dingRobotQueryWrapper
.
eq
(
"jira_project_key"
,
jiraProjectKey
);
}
if
(!
StringUtils
.
isEmpty
(
projectName
))
{
dingRobotQueryWrapper
.
like
(
"project_name"
,
projectName
);
}
if
(!
StringUtils
.
isEmpty
(
namespace
))
{
dingRobotQueryWrapper
.
eq
(
"namespace"
,
namespace
);
}
dingRobotQueryWrapper
.
orderByDesc
(
"id"
);
IPage
<
DingRobot
>
projectRobotIPage
=
dingRobotService
.
page
(
page
,
dingRobotQueryWrapper
);
List
<
DingRobot
>
dingRobotList
=
projectRobotIPage
.
getRecords
();
...
...
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