Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fuzzBackEnd
Overview
Overview
Details
Activity
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
钱炳权
fuzzBackEnd
Commits
4b920d4a
Commit
4b920d4a
authored
8 months ago
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新数据正常
parent
442473de
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
FuzzParamsMapper.java
...ava/com/example/fuzzControll/mapper/FuzzParamsMapper.java
+3
-2
FuzzParamsService.java
...a/com/example/fuzzControll/service/FuzzParamsService.java
+1
-1
FuzzParamsServiceImpl.java
...mple/fuzzControll/service/impl/FuzzParamsServiceImpl.java
+2
-2
TestMissionServiceImpl.java
...ple/fuzzControll/service/impl/TestMissionServiceImpl.java
+4
-2
FuzzParamsMapper.xml
...ntegration/src/main/resources/mapper/FuzzParamsMapper.xml
+1
-3
No files found.
fuzzIntegration/src/main/java/com/example/fuzzControll/mapper/FuzzParamsMapper.java
View file @
4b920d4a
...
@@ -3,6 +3,7 @@ package com.example.fuzzControll.mapper;
...
@@ -3,6 +3,7 @@ package com.example.fuzzControll.mapper;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
...
@@ -14,7 +15,7 @@ public interface FuzzParamsMapper {
...
@@ -14,7 +15,7 @@ public interface FuzzParamsMapper {
List
<
FuzzParams
>
getFuzzParamsList
();
List
<
FuzzParams
>
getFuzzParamsList
();
FuzzParams
getFuzzParamsById
(
int
id
);
FuzzParams
getFuzzParamsById
(
int
id
);
int
editFuzzParams
(
FuzzParams
fuzzParams
);
boolean
editFuzzParams
(
@Param
(
"id"
)
int
id
,
@Param
(
"params"
)
String
params
,
@Param
(
"protocol"
)
String
protocol
);
void
insertFuzzParamsReturnId
(
FuzzParams
fuzzParams
);
int
insertFuzzParamsReturnId
(
FuzzParams
fuzzParams
);
}
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/FuzzParamsService.java
View file @
4b920d4a
...
@@ -12,5 +12,5 @@ public interface FuzzParamsService {
...
@@ -12,5 +12,5 @@ public interface FuzzParamsService {
//todo 使用切面在运行时插入参数
//todo 使用切面在运行时插入参数
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
);
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
);
int
editFuzzParams
(
FuzzParams
fuzzParams
);
boolean
editFuzzParams
(
FuzzParams
fuzzParams
);
}
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/FuzzParamsServiceImpl.java
View file @
4b920d4a
...
@@ -47,7 +47,7 @@ public class FuzzParamsServiceImpl implements FuzzParamsService {
...
@@ -47,7 +47,7 @@ public class FuzzParamsServiceImpl implements FuzzParamsService {
}
}
@Override
@Override
public
int
editFuzzParams
(
FuzzParams
fuzzParams
)
{
public
boolean
editFuzzParams
(
FuzzParams
fuzzParams
)
{
return
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
);
return
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
.
getId
(),
fuzzParams
.
getParams
(),
fuzzParams
.
getProtocol
()
);
}
}
}
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/TestMissionServiceImpl.java
View file @
4b920d4a
...
@@ -76,8 +76,10 @@ public class TestMissionServiceImpl implements TestMissionService {
...
@@ -76,8 +76,10 @@ public class TestMissionServiceImpl implements TestMissionService {
fuzzParamsId
=
fuzzParams
.
getId
();
fuzzParamsId
=
fuzzParams
.
getId
();
test
.
setFuzzParamsId
(
fuzzParamsId
);
test
.
setFuzzParamsId
(
fuzzParamsId
);
}
else
{
//有则更新数据
}
else
{
//有则更新数据
FuzzParams
fuzzParams
=
new
FuzzParams
(
test
.
getId
(),
JSON
.
toJSONString
(
cmdStartParams
),
cmdStartParams
.
getProtopcol
());
FuzzParams
fuzzParams
=
new
FuzzParams
(
test
.
getFuzzParamsId
(),
JSON
.
toJSONString
(
cmdStartParams
),
cmdStartParams
.
getProtopcol
());
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
);
if
(!
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
.
getId
(),
fuzzParams
.
getParams
(),
fuzzParams
.
getProtocol
())){
throw
new
RuntimeException
(
"EditFuzzParams failed!"
);
}
}
}
/*更新修改时间*/
/*更新修改时间*/
test
.
setUpdateTime
(
new
Date
());
test
.
setUpdateTime
(
new
Date
());
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/resources/mapper/FuzzParamsMapper.xml
View file @
4b920d4a
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</insert>
</insert>
<update
id=
"editFuzzParams"
parameterType=
"com.example.fuzzControll.domain.bo.FuzzParams"
>
<update
id=
"editFuzzParams"
parameterType=
"com.example.fuzzControll.domain.bo.FuzzParams"
>
update fuzz_params
update fuzz_params
set
id = #{id} ,
params = #{params} ,protocol = #{protocol}
set params = #{params} ,protocol = #{protocol}
where id = #{id}
where id = #{id}
<!-- update fuzz_params-->
<!-- update fuzz_params-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
...
@@ -42,5 +42,4 @@
...
@@ -42,5 +42,4 @@
<select
id=
"getFuzzParamsList"
resultMap=
"fuzzParams"
>
<select
id=
"getFuzzParamsList"
resultMap=
"fuzzParams"
>
<include
refid=
"selectFuzzParams"
/>
<include
refid=
"selectFuzzParams"
/>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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