Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
王飞
vehicle-quality-review
Commits
25b34e4a
Commit
25b34e4a
authored
Mar 25, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每5秒调用第三方接口
parent
21db9e19
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
TestRecords.java
...ty-review/src/main/java/com/ruoyi/domain/TestRecords.java
+5
-1
ScheduledTask.java
.../src/main/java/com/ruoyi/scheduledTask/ScheduledTask.java
+1
-1
TestRecordsService.java
...w/src/main/java/com/ruoyi/service/TestRecordsService.java
+1
-1
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+3
-2
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+3
-2
No files found.
quality-review/src/main/java/com/ruoyi/domain/TestRecords.java
View file @
25b34e4a
...
...
@@ -21,7 +21,11 @@ public class TestRecords {
private
Long
id
;
@ApiModelProperty
(
"关联项目id"
)
private
String
taskId
;
private
String
projectId
;
@ApiModelProperty
(
"关联任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
taskId
;
@ApiModelProperty
(
"用例名称"
)
private
String
usecase
;
...
...
quality-review/src/main/java/com/ruoyi/scheduledTask/ScheduledTask.java
View file @
25b34e4a
...
...
@@ -30,7 +30,7 @@ public class ScheduledTask implements Runnable{
for
(
ModelTestTask
testTask
:
modelList
)
{
if
(
testTask
.
getTestSchemeId
()
!=
null
)
{
testRecordsService
.
sendPost
(
testTask
.
getTestSchemeId
());
testRecordsService
.
sendPost
(
testTask
.
getTestSchemeId
()
,
testTask
.
getId
()
);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/TestRecordsService.java
View file @
25b34e4a
...
...
@@ -18,5 +18,5 @@ public interface TestRecordsService extends IService<TestRecords> {
* 发送请求
* @param id
*/
void
sendPost
(
String
id
);
void
sendPost
(
String
id
,
Long
taskId
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
25b34e4a
...
...
@@ -28,7 +28,7 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
@Override
public
void
sendPost
(
String
id
)
{
public
void
sendPost
(
String
id
,
Long
taskId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
id
);
...
...
@@ -66,7 +66,8 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
((
Objects
.
equals
(
caseResultVO
.
getStatus
(),
"PASSED"
)
||
Objects
.
equals
(
caseResultVO
.
getStatus
(),
"FAILED"
))
&&
!
exists
)
{
TestRecords
testRecords
=
new
TestRecords
();
testRecords
.
setTaskId
(
projectId
);
testRecords
.
setProjectId
(
projectId
);
testRecords
.
setTaskId
(
taskId
);
testRecords
.
setUsecase
(
caseResultVO
.
getName
());
testRecords
.
setUsecaseId
(
caseResultVO
.
getId
());
testRecords
.
setDescription
(
caseResultVO
.
getDescription
());
...
...
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
25b34e4a
...
...
@@ -6,7 +6,8 @@
<resultMap
id=
"BaseResultMap"
type=
"com.ruoyi.domain.TestRecords"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"usecase"
column=
"usecase"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"testTime"
column=
"test_time"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -17,7 +18,7 @@
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.TestRecords"
>
SELECT id, task_id, usecase, usecase_id, test_time, description, risk_level, test_method, test_result, remediation
SELECT id,
project_id,
task_id, usecase, usecase_id, test_time, description, risk_level, test_method, test_result, remediation
FROM t_test_records
WHERE task_id = #{id}
</select>
...
...
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