edit
Esse commit está contido em:
@@ -8,51 +8,10 @@ import lombok.Data;
|
|||||||
* 问题反馈
|
* 问题反馈
|
||||||
*
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class Bug {
|
public class Bug {
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Integer id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProduct() {
|
|
||||||
return product;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProduct(String product) {
|
|
||||||
this.product = product;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBugRemark() {
|
|
||||||
return bugRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBugRemark(String bugRemark) {
|
|
||||||
this.bugRemark = bugRemark;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCreateBy() {
|
|
||||||
return createBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateBy(String createBy) {
|
|
||||||
this.createBy = createBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateDate() {
|
|
||||||
return createDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateDate(Date createDate) {
|
|
||||||
this.createDate = createDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
private String product;
|
private String product;
|
||||||
@@ -62,4 +21,6 @@ public class Bug {
|
|||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
|
||||||
|
private String answer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,13 +54,21 @@ public class BugController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加角色
|
* 添加
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/addBug")
|
@RequestMapping("/addBug")
|
||||||
public Msg addBug(Bug bug, HttpSession session) {
|
public Msg addBug(Bug bug, HttpSession session) {
|
||||||
return bugService.addBug(bug, session);
|
return bugService.addBug(bug, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
@RequestMapping("/updateBug")
|
||||||
|
public Msg updateBug(Bug bug, HttpSession session) {
|
||||||
|
return bugService.updateBug(bug);
|
||||||
|
}
|
||||||
|
|
||||||
// 图片上传及新增
|
// 图片上传及新增
|
||||||
@RequestMapping("/bugUpload")
|
@RequestMapping("/bugUpload")
|
||||||
public Msg upload(@RequestParam("file") MultipartFile file) throws Exception {
|
public Msg upload(@RequestParam("file") MultipartFile file) throws Exception {
|
||||||
@@ -82,7 +90,6 @@ public class BugController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param prefixSelf 根据上传的接口存入自己的文件夹
|
* @param prefixSelf 根据上传的接口存入自己的文件夹
|
||||||
* @param suffix 文件的后缀
|
* @param suffix 文件的后缀
|
||||||
* @param fileName 文件名
|
* @param fileName 文件名
|
||||||
|
|||||||
@@ -9,4 +9,6 @@ public interface BugMapper {
|
|||||||
List<Bug> getBugs(Bug bug);
|
List<Bug> getBugs(Bug bug);
|
||||||
|
|
||||||
int addBug(Bug bug);
|
int addBug(Bug bug);
|
||||||
|
|
||||||
|
int updateBug(Bug bug);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,4 +32,12 @@ public class BugService {
|
|||||||
return Msg.success();
|
return Msg.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Msg updateBug(Bug bug) {
|
||||||
|
int i = bugMapper.updateBug(bug);
|
||||||
|
if (i < 0) {
|
||||||
|
return Msg.fail();
|
||||||
|
}
|
||||||
|
return Msg.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="lingtao.net.dao.BugMapper">
|
<mapper namespace="lingtao.net.dao.BugMapper">
|
||||||
|
|
||||||
<select id="getBugs" parameterType="Bug" resultType="Bug">
|
<select id="getBugs" parameterType="Bug" resultType="Bug">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
@@ -18,20 +17,20 @@
|
|||||||
|
|
||||||
<insert id="addBug" parameterType="Bug">
|
<insert id="addBug" parameterType="Bug">
|
||||||
INSERT INTO bug
|
INSERT INTO bug
|
||||||
(
|
(id,
|
||||||
id,
|
|
||||||
product,
|
product,
|
||||||
bugRemark,
|
bugRemark,
|
||||||
createBy,
|
createBy,
|
||||||
createDate
|
createDate)
|
||||||
)
|
VALUES (NULL,
|
||||||
VALUES
|
|
||||||
(
|
|
||||||
NULL,
|
|
||||||
#{product},
|
#{product},
|
||||||
#{bugRemark},
|
#{bugRemark},
|
||||||
#{createBy},
|
#{createBy},
|
||||||
now()
|
now())
|
||||||
)
|
|
||||||
</insert>
|
</insert>
|
||||||
|
<update id="updateBug" parameterType="Bug">
|
||||||
|
update bug
|
||||||
|
set answer = #{answer}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
Referência em uma Nova Issue
Bloquear um usuário