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
4d976f62
Commit
4d976f62
authored
Oct 19, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增打回次数
parent
63e15758
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
PipelineController.java
...va/cn/qg/holmes/controller/gitlab/PipelineController.java
+1
-0
JiraController.java
.../java/cn/qg/holmes/controller/quality/JiraController.java
+12
-0
DingRobot.java
src/main/java/cn/qg/holmes/entity/quality/DingRobot.java
+2
-0
No files found.
src/main/java/cn/qg/holmes/controller/gitlab/PipelineController.java
View file @
4d976f62
...
...
@@ -163,6 +163,7 @@ public class PipelineController {
if
(
dingRobotService
.
getOne
(
dingRobotQueryWrapper
)
!=
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"项目已存在"
,
false
);
}
dingRobot
.
setRepulseNum
(
0
);
boolean
dingRobotResult
=
dingRobotService
.
save
(
dingRobot
);
if
(!
dingRobotResult
)
{
return
JsonResult
.
buildErrorStateResult
(
"服务器异常,保存失败!"
,
false
);
...
...
src/main/java/cn/qg/holmes/controller/quality/JiraController.java
View file @
4d976f62
...
...
@@ -200,6 +200,18 @@ public class JiraController {
// @RequiresPermissions("qa:process:smoke")
@PostMapping
(
"/send/smoking"
)
public
JsonResult
sendSmokingResult
(
@RequestBody
SendSmokingResultVo
sendSmokingResultVo
)
throws
Exception
{
if
(!
sendSmokingResultVo
.
getResult
())
{
// 冒烟测试失败,则记录打回一次
QueryWrapper
<
DingRobot
>
dingRobotQueryWrapper
=
new
QueryWrapper
<>();
dingRobotQueryWrapper
.
eq
(
"project_name"
,
sendSmokingResultVo
.
getTestProjectName
())
.
eq
(
"jira_project_key"
,
sendSmokingResultVo
.
getJiraProjectKey
());
DingRobot
dingRobot
=
dingRobotService
.
getOne
(
dingRobotQueryWrapper
);
if
(
dingRobot
!=
null
)
{
dingRobot
.
setRepulseNum
(
dingRobot
.
getRepulseNum
()
+
1
);
dingRobotService
.
updateById
(
dingRobot
);
}
}
String
JQL
=
"project = "
+
sendSmokingResultVo
.
getJiraProjectKey
()
+
" AND resolution = Unresolved AND text ~ \""
+
sendSmokingResultVo
.
getTestProjectName
()
+
"\" ORDER BY priority DESC, updated DESC"
;
Iterable
<
Issue
>
issues
=
jiraService
.
getIssueListByJQL
(
JQL
);
...
...
src/main/java/cn/qg/holmes/entity/quality/DingRobot.java
View file @
4d976f62
...
...
@@ -44,6 +44,8 @@ public class DingRobot {
*/
private
Integer
submitTestInstructionId
;
private
Integer
repulseNum
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
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