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
5148ec7b
Commit
5148ec7b
authored
Jul 01, 2024
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuzz参数修改
parent
cc73d18d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
204 additions
and
0 deletions
+204
-0
FuzzParamsController.java
...troll/controller/dataController/FuzzParamsController.java
+66
-0
FuzzParams.java
...n/java/com/example/fuzzControll/domain/bo/FuzzParams.java
+20
-0
FuzzParamsMapper.java
...ava/com/example/fuzzControll/mapper/FuzzParamsMapper.java
+18
-0
FuzzParamsService.java
...a/com/example/fuzzControll/service/FuzzParamsService.java
+16
-0
FuzzParamsServiceImpl.java
...mple/fuzzControll/service/impl/FuzzParamsServiceImpl.java
+53
-0
FuzzParamsMapper.xml
...ntegration/src/main/resources/mapper/FuzzParamsMapper.xml
+31
-0
No files found.
fuzzIntegration/src/main/java/com/example/fuzzControll/controller/dataController/FuzzParamsController.java
0 → 100644
View file @
5148ec7b
package
com
.
example
.
fuzzControll
.
controller
.
dataController
;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
com.example.fuzzControll.domain.vo.AjaxResult
;
import
com.example.fuzzControll.domain.vo.KittyResult
;
import
com.example.fuzzControll.service.FuzzParamsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/fuzzParams"
)
@Slf4j
public
class
FuzzParamsController
{
@Autowired
FuzzParamsService
fuzzParamsService
;
/**
* 获取参数列表
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
list
()
{
List
<
FuzzParams
>
results
;
try
{
results
=
fuzzParamsService
.
getFuzzParamsList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"Get params of fuzz error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
results
);
}
/**
* 跟据id获取参数
*/
@RequestMapping
(
value
=
"/getParam/{id}"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getById
(
@PathVariable
(
"id"
)
int
id
)
{
FuzzParams
result
;
try
{
result
=
fuzzParamsService
.
getFuzzParamById
(
id
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Get params of fuzz with id error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
result
);
}
/**
* 跟据id修改参数
*/
@RequestMapping
(
value
=
"/editParam"
,
method
=
RequestMethod
.
POST
)
public
AjaxResult
editById
(
@RequestBody
FuzzParams
fuzzParams
)
{
boolean
flag
=
false
;
try
{
flag
=
fuzzParamsService
.
editFuzzParams
(
fuzzParams
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Edit params with id error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
flag
);
}
}
fuzzIntegration/src/main/java/com/example/fuzzControll/domain/bo/FuzzParams.java
0 → 100644
View file @
5148ec7b
package
com
.
example
.
fuzzControll
.
domain
.
bo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
@Getter
@Setter
public
class
FuzzParams
{
private
int
id
;
private
String
params
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
editTime
;
}
fuzzIntegration/src/main/java/com/example/fuzzControll/mapper/FuzzParamsMapper.java
0 → 100644
View file @
5148ec7b
package
com
.
example
.
fuzzControll
.
mapper
;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Mapper
@Component
(
"FuzzParamsMapper"
)
public
interface
FuzzParamsMapper
{
void
saveFuzzParams
(
FuzzParams
fuzzParams
);
List
<
FuzzParams
>
getFuzzParamsList
();
FuzzParams
getFuzzParamsById
(
int
id
);
boolean
editFuzzParams
(
FuzzParams
fuzzParams
);
}
fuzzIntegration/src/main/java/com/example/fuzzControll/service/FuzzParamsService.java
0 → 100644
View file @
5148ec7b
package
com
.
example
.
fuzzControll
.
service
;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
java.util.List
;
public
interface
FuzzParamsService
{
List
<
FuzzParams
>
getFuzzParamsList
();
FuzzParams
getFuzzParamById
(
int
id
);
//todo 使用切面在运行时插入参数
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
);
boolean
editFuzzParams
(
FuzzParams
fuzzParams
);
}
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/FuzzParamsServiceImpl.java
0 → 100644
View file @
5148ec7b
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.domain.bo.FuzzParams
;
import
com.example.fuzzControll.mapper.FuzzParamsMapper
;
import
com.example.fuzzControll.service.FuzzParamsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@Service
(
"FuzzParamsService"
)
public
class
FuzzParamsServiceImpl
implements
FuzzParamsService
{
@Autowired
FuzzParamsMapper
fuzzParamsMapper
;
@Override
public
List
<
FuzzParams
>
getFuzzParamsList
()
{
List
<
FuzzParams
>
list
=
null
;
try
{
list
=
fuzzParamsMapper
.
getFuzzParamsList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"FuzzParamsService.getFuzzParamsList error:{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
}
return
list
;
}
@Override
public
FuzzParams
getFuzzParamById
(
int
id
)
{
FuzzParams
fuzzParams
=
null
;
try
{
fuzzParams
=
fuzzParamsMapper
.
getFuzzParamsById
(
id
);
}
catch
(
Exception
e
)
{
log
.
error
(
"FuzzParamsService.getFuzzParamById error:{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
}
return
fuzzParams
;
}
@Override
public
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
)
{
return
false
;
}
@Override
public
boolean
editFuzzParams
(
FuzzParams
fuzzParams
)
{
return
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
);
}
}
fuzzIntegration/src/main/resources/mapper/FuzzParamsMapper.xml
0 → 100644
View file @
5148ec7b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.example.fuzzControll.mapper.FuzzParamsMapper"
>
<resultMap
type=
"com.example.fuzzControll.domain.bo.FuzzParams"
id=
"fuzzParams"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"params"
column=
"params"
/>
<result
property=
"editTime"
column=
"editTime"
/>
</resultMap>
<sql
id=
"selectFuzzParams"
>
select id, params,editTime from fuzz_params
</sql>
<insert
id=
"saveFuzzParams"
>
insert into fuzz_params(id, params,editTime) values(#{id}, #{params},#{editTime})
</insert>
<update
id=
"editFuzzParams"
>
</update>
<select
id=
"getFuzzParamsById"
resultMap=
"fuzzParams"
>
<include
refid=
"selectFuzzParams"
/>
where id = #{id}
</select>
<select
id=
"getFuzzParamsList"
resultMap=
"fuzzParams"
>
<include
refid=
"selectFuzzParams"
/>
</select>
</mapper>
\ No newline at end of file
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