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
e740f5c9
Commit
e740f5c9
authored
Sep 06, 2021
by
黎博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pipline'
parents
8aa3c51c
ef8d1bf4
Changes
1
Show 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 @
e740f5c9
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -56,9 +57,20 @@ public class PipelineController {
...
@@ -56,9 +57,20 @@ public class PipelineController {
}
}
@GetMapping
(
"/list"
)
@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
);
IPage
<
DingRobot
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
QueryWrapper
<
DingRobot
>
dingRobotQueryWrapper
=
new
QueryWrapper
();
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"
);
dingRobotQueryWrapper
.
orderByDesc
(
"id"
);
IPage
<
DingRobot
>
projectRobotIPage
=
dingRobotService
.
page
(
page
,
dingRobotQueryWrapper
);
IPage
<
DingRobot
>
projectRobotIPage
=
dingRobotService
.
page
(
page
,
dingRobotQueryWrapper
);
List
<
DingRobot
>
dingRobotList
=
projectRobotIPage
.
getRecords
();
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