Commit 4eb776e98e52f9fb6cb3d5a8d50cc9c5adf84951
1 parent
0cccb4b4d3
Exists in
master
修改类名
Showing 8 changed files with 302 additions and 17 deletions
- mainData/src/main/java/com/lymsh/yimiao/main/data/dao/YmFeedBacksMapper.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/model/YmFeedBacks.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/model/YmFeedBacksQuery.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/service/YmFeedBacksService.java
- mainData/src/main/java/com/lymsh/yimiao/main/data/service/impl/YmFeedBacksServiceImpl.java
- mainData/src/main/resources/mainOrm/YmFeedbacks.xml
- webApi/src/main/java/com/lyms/yimiao/web/controller/v1/FeedbackController.java
- webApi/src/main/java/com/lyms/yimiao/web/controller/v1/VaccineNamesController.java
mainData/src/main/java/com/lymsh/yimiao/main/data/dao/YmFeedBacksMapper.java
View file @
4eb776e
| 1 | +package com.lymsh.yimiao.main.data.dao; | |
| 2 | + | |
| 3 | +import com.lymsh.yimiao.main.data.model.YmFeedBacks; | |
| 4 | +import com.lymsh.yimiao.main.data.model.YmFeedBacksQuery; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface YmFeedBacksMapper { | |
| 9 | + public void addYmFeedBacks(YmFeedBacks obj); | |
| 10 | + | |
| 11 | + public void updateYmFeedBacks(YmFeedBacks obj); | |
| 12 | + | |
| 13 | + public void deleteYmFeedBacks(Integer id); | |
| 14 | + | |
| 15 | + public YmFeedBacks getYmFeedBacks(Integer id); | |
| 16 | + | |
| 17 | + public int queryYmFeedBacksCount(YmFeedBacksQuery query); | |
| 18 | + | |
| 19 | + public List<YmFeedBacks> queryYmFeedBacks(YmFeedBacksQuery query); | |
| 20 | + | |
| 21 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/model/YmFeedBacks.java
View file @
4eb776e
| 1 | +package com.lymsh.yimiao.main.data.model; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | + | |
| 5 | +public class YmFeedBacks { | |
| 6 | + private Integer id; | |
| 7 | + private String content; | |
| 8 | + private Integer type; | |
| 9 | + private Integer replyId; | |
| 10 | + private Date created; | |
| 11 | + private Integer yn; | |
| 12 | + private Integer publishId; | |
| 13 | + private String publishName; | |
| 14 | + | |
| 15 | + public Integer getId() { | |
| 16 | + return id; | |
| 17 | + } | |
| 18 | + | |
| 19 | + | |
| 20 | + public void setId(Integer id) { | |
| 21 | + this.id = id; | |
| 22 | + | |
| 23 | + } | |
| 24 | + | |
| 25 | + public String getContent() { | |
| 26 | + return content; | |
| 27 | + } | |
| 28 | + | |
| 29 | + | |
| 30 | + public void setContent(String content) { | |
| 31 | + this.content = content; | |
| 32 | + | |
| 33 | + } | |
| 34 | + | |
| 35 | + public Integer getType() { | |
| 36 | + return type; | |
| 37 | + } | |
| 38 | + | |
| 39 | + | |
| 40 | + public void setType(Integer type) { | |
| 41 | + this.type = type; | |
| 42 | + | |
| 43 | + } | |
| 44 | + | |
| 45 | + public Integer getReplyId() { | |
| 46 | + return replyId; | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 50 | + public void setReplyId(Integer replyId) { | |
| 51 | + this.replyId = replyId; | |
| 52 | + | |
| 53 | + } | |
| 54 | + | |
| 55 | + public Date getCreated() { | |
| 56 | + return created; | |
| 57 | + } | |
| 58 | + | |
| 59 | + | |
| 60 | + public void setCreated(Date created) { | |
| 61 | + this.created = created; | |
| 62 | + | |
| 63 | + } | |
| 64 | + | |
| 65 | + public Integer getYn() { | |
| 66 | + return yn; | |
| 67 | + } | |
| 68 | + | |
| 69 | + | |
| 70 | + public void setYn(Integer yn) { | |
| 71 | + this.yn = yn; | |
| 72 | + | |
| 73 | + } | |
| 74 | + | |
| 75 | + public Integer getPublishId() { | |
| 76 | + return publishId; | |
| 77 | + } | |
| 78 | + | |
| 79 | + | |
| 80 | + public void setPublishId(Integer publishId) { | |
| 81 | + this.publishId = publishId; | |
| 82 | + | |
| 83 | + } | |
| 84 | + | |
| 85 | + public String getPublishName() { | |
| 86 | + return publishName; | |
| 87 | + } | |
| 88 | + | |
| 89 | + | |
| 90 | + public void setPublishName(String publishName) { | |
| 91 | + this.publishName = publishName; | |
| 92 | + | |
| 93 | + } | |
| 94 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/model/YmFeedBacksQuery.java
View file @
4eb776e
| 1 | +package com.lymsh.yimiao.main.data.model; | |
| 2 | + | |
| 3 | + | |
| 4 | +import java.util.Date; | |
| 5 | + | |
| 6 | +import com.lymsh.mommybaby.basecommon.base.BaseQuery; | |
| 7 | + | |
| 8 | + | |
| 9 | +public class YmFeedBacksQuery extends BaseQuery { | |
| 10 | + private Integer id; | |
| 11 | + private String content; | |
| 12 | + private Integer type; | |
| 13 | + private Integer replyId; | |
| 14 | + private Date created; | |
| 15 | + private Integer yn; | |
| 16 | + private Integer publishId; | |
| 17 | + private String publishName; | |
| 18 | + | |
| 19 | + public Integer getId() { | |
| 20 | + return id; | |
| 21 | + } | |
| 22 | + | |
| 23 | + | |
| 24 | + public void setId(Integer id) { | |
| 25 | + this.id = id; | |
| 26 | + | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getContent() { | |
| 30 | + return content; | |
| 31 | + } | |
| 32 | + | |
| 33 | + | |
| 34 | + public void setContent(String content) { | |
| 35 | + this.content = content; | |
| 36 | + | |
| 37 | + } | |
| 38 | + | |
| 39 | + public Integer getType() { | |
| 40 | + return type; | |
| 41 | + } | |
| 42 | + | |
| 43 | + | |
| 44 | + public void setType(Integer type) { | |
| 45 | + this.type = type; | |
| 46 | + | |
| 47 | + } | |
| 48 | + | |
| 49 | + public Integer getReplyId() { | |
| 50 | + return replyId; | |
| 51 | + } | |
| 52 | + | |
| 53 | + | |
| 54 | + public void setReplyId(Integer replyId) { | |
| 55 | + this.replyId = replyId; | |
| 56 | + | |
| 57 | + } | |
| 58 | + | |
| 59 | + public Date getCreated() { | |
| 60 | + return created; | |
| 61 | + } | |
| 62 | + | |
| 63 | + | |
| 64 | + public void setCreated(Date created) { | |
| 65 | + this.created = created; | |
| 66 | + | |
| 67 | + } | |
| 68 | + | |
| 69 | + public Integer getYn() { | |
| 70 | + return yn; | |
| 71 | + } | |
| 72 | + | |
| 73 | + | |
| 74 | + public void setYn(Integer yn) { | |
| 75 | + this.yn = yn; | |
| 76 | + | |
| 77 | + } | |
| 78 | + | |
| 79 | + public Integer getPublishId() { | |
| 80 | + return publishId; | |
| 81 | + } | |
| 82 | + | |
| 83 | + | |
| 84 | + public void setPublishId(Integer publishId) { | |
| 85 | + this.publishId = publishId; | |
| 86 | + | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getPublishName() { | |
| 90 | + return publishName; | |
| 91 | + } | |
| 92 | + | |
| 93 | + | |
| 94 | + public void setPublishName(String publishName) { | |
| 95 | + this.publishName = publishName; | |
| 96 | + | |
| 97 | + } | |
| 98 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/service/YmFeedBacksService.java
View file @
4eb776e
| 1 | +package com.lymsh.yimiao.main.data.service; | |
| 2 | + | |
| 3 | +import com.lymsh.yimiao.main.data.model.YmFeedBacks; | |
| 4 | +import com.lymsh.yimiao.main.data.model.YmFeedBacksQuery; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface YmFeedBacksService { | |
| 9 | + public void addYmFeedBacks(YmFeedBacks obj); | |
| 10 | + | |
| 11 | + public void updateYmFeedBacks(YmFeedBacks obj); | |
| 12 | + | |
| 13 | + public void deleteYmFeedBacks(Integer id); | |
| 14 | + | |
| 15 | + public YmFeedBacks getYmFeedBacks(Integer id); | |
| 16 | + | |
| 17 | + public int queryYmFeedBacksCount(YmFeedBacksQuery query); | |
| 18 | + | |
| 19 | + public List<YmFeedBacks> queryYmFeedBacks(YmFeedBacksQuery query); | |
| 20 | + | |
| 21 | +} |
mainData/src/main/java/com/lymsh/yimiao/main/data/service/impl/YmFeedBacksServiceImpl.java
View file @
4eb776e
| 1 | +package com.lymsh.yimiao.main.data.service.impl; | |
| 2 | + | |
| 3 | +import com.lymsh.yimiao.main.data.dao.YmFeedBacksMapper; | |
| 4 | +import com.lymsh.yimiao.main.data.model.YmFeedBacks; | |
| 5 | +import com.lymsh.yimiao.main.data.model.YmFeedBacksQuery; | |
| 6 | +import com.lymsh.yimiao.main.data.service.YmFeedBacksService; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +@Service | |
| 13 | +public class YmFeedBacksServiceImpl implements YmFeedBacksService { | |
| 14 | + | |
| 15 | + @Autowired | |
| 16 | + private YmFeedBacksMapper ymFeedbacksMapper; | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public void addYmFeedBacks(YmFeedBacks obj) { | |
| 20 | + ymFeedbacksMapper.addYmFeedBacks(obj); | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public void updateYmFeedBacks(YmFeedBacks obj) { | |
| 25 | + ymFeedbacksMapper.updateYmFeedBacks(obj); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public void deleteYmFeedBacks(Integer id) { | |
| 30 | + ymFeedbacksMapper.deleteYmFeedBacks(id); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public YmFeedBacks getYmFeedBacks(Integer id) { | |
| 35 | + return ymFeedbacksMapper.getYmFeedBacks(id); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public int queryYmFeedBacksCount(YmFeedBacksQuery query) { | |
| 40 | + return ymFeedbacksMapper.queryYmFeedBacksCount(query); | |
| 41 | + } | |
| 42 | + | |
| 43 | + @Override | |
| 44 | + public List<YmFeedBacks> queryYmFeedBacks(YmFeedBacksQuery query) { | |
| 45 | + if (query.getNeed() != null) { | |
| 46 | + query.mysqlBuild(ymFeedbacksMapper.queryYmFeedBacksCount(query)); | |
| 47 | + } | |
| 48 | + return ymFeedbacksMapper.queryYmFeedBacks(query); | |
| 49 | + } | |
| 50 | + | |
| 51 | +} |
mainData/src/main/resources/mainOrm/YmFeedbacks.xml
View file @
4eb776e
| 1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| 3 | -<mapper namespace="com.lymsh.yimiao.main.data.dao.YmFeedbacksMapper"> | |
| 3 | +<mapper namespace="com.lymsh.yimiao.main.data.dao.YmFeedBacksMapper"> | |
| 4 | 4 | |
| 5 | -<resultMap id="YmFeedbacksResultMap" type="com.lymsh.yimiao.main.data.model.YmFeedbacks"> | |
| 5 | +<resultMap id="YmFeedBacksResultMap" type="com.lymsh.yimiao.main.data.model.YmFeedBacks"> | |
| 6 | 6 | <result column="id" property="id" jdbcType="INTEGER" /> |
| 7 | 7 | <result column="content" property="content" jdbcType="VARCHAR" /> |
| 8 | 8 | <result column="type" property="type" jdbcType="INTEGER" /> |
| 9 | 9 | |
| ... | ... | @@ -15,13 +15,13 @@ |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | |
| 18 | -<insert id="addYmFeedbacks" parameterType="com.lymsh.yimiao.main.data.model.YmFeedbacks"> | |
| 18 | +<insert id="addYmFeedBacks" parameterType="com.lymsh.yimiao.main.data.model.YmFeedBacks"> | |
| 19 | 19 | insert into ym_feedbacks (id,content,type,reply_id,created,yn,publish_id,publish_name) values (#{id},#{content},#{type},#{replyId},#{created},#{yn},#{publishId},#{publishName}) |
| 20 | 20 | </insert> |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -<update id="updateYmFeedbacks" parameterType="com.lymsh.yimiao.main.data.model.YmFeedbacks"> | |
| 24 | +<update id="updateYmFeedBacks" parameterType="com.lymsh.yimiao.main.data.model.YmFeedBacks"> | |
| 25 | 25 | update ym_feedbacks <set><if test="id != null and id >= 0"> |
| 26 | 26 | id = #{id,jdbcType=INTEGER}, |
| 27 | 27 | </if> |
| 28 | 28 | |
| ... | ... | @@ -50,12 +50,12 @@ |
| 50 | 50 | </update> |
| 51 | 51 | |
| 52 | 52 | |
| 53 | -<delete id="deleteYmFeedbacks" parameterType="java.lang.Integer"> | |
| 53 | +<delete id="deleteYmFeedBacks" parameterType="java.lang.Integer"> | |
| 54 | 54 | </delete> |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | -<select id="getYmFeedbacks" resultMap="YmFeedbacksResultMap" parameterType="java.lang.Integer"> | |
| 58 | +<select id="getYmFeedBacks" resultMap="YmFeedBacksResultMap" parameterType="java.lang.Integer"> | |
| 59 | 59 | select id,content,type,reply_id,created,yn,publish_id,publish_name |
| 60 | 60 | </select> |
| 61 | 61 | |
| ... | ... | @@ -71,7 +71,7 @@ |
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | |
| 74 | -<sql id="YmFeedbacksCondition"> | |
| 74 | +<sql id="YmFeedBacksCondition"> | |
| 75 | 75 | <where> |
| 76 | 76 | 1 = 1 |
| 77 | 77 | <if test="id != null and id >= 0"> |
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | |
| ... | ... | @@ -103,18 +103,18 @@ |
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | |
| 106 | -<select id="queryYmFeedbacks" resultMap="YmFeedbacksResultMap" parameterType="com.lymsh.yimiao.main.data.model.YmFeedbacksQuery"> | |
| 106 | +<select id="queryYmFeedBacks" resultMap="YmFeedBacksResultMap" parameterType="com.lymsh.yimiao.main.data.model.YmFeedBacksQuery"> | |
| 107 | 107 | select id,content,type,reply_id,created,yn,publish_id,publish_name |
| 108 | 108 | from ym_feedbacks |
| 109 | -<include refid="YmFeedbacksCondition" /> | |
| 109 | +<include refid="YmFeedBacksCondition" /> | |
| 110 | 110 | <include refid="orderAndLimit" /> |
| 111 | 111 | </select> |
| 112 | 112 | |
| 113 | 113 | |
| 114 | 114 | |
| 115 | -<select id="queryYmFeedbacksCount" resultType="int" parameterType="com.lymsh.yimiao.main.data.model.YmFeedbacksQuery"> | |
| 115 | +<select id="queryYmFeedBacksCount" resultType="int" parameterType="com.lymsh.yimiao.main.data.model.YmFeedBacksQuery"> | |
| 116 | 116 | select count(1) from ym_feedbacks |
| 117 | -<include refid="YmFeedbacksCondition" /> | |
| 117 | +<include refid="YmFeedBacksCondition" /> | |
| 118 | 118 | </select> |
| 119 | 119 | |
| 120 | 120 |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/FeedbackController.java
View file @
4eb776e
| ... | ... | @@ -7,9 +7,9 @@ |
| 7 | 7 | import com.lymsh.mommybaby.basecommon.util.ContextHolder; |
| 8 | 8 | import com.lymsh.mommybaby.basecommon.util.ResultUtils; |
| 9 | 9 | import com.lymsh.yimiao.main.data.enumdata.YnEnum; |
| 10 | -import com.lymsh.yimiao.main.data.model.YmFeedbacks; | |
| 10 | +import com.lymsh.yimiao.main.data.model.YmFeedBacks; | |
| 11 | 11 | import com.lymsh.yimiao.main.data.model.YmUsers; |
| 12 | -import com.lymsh.yimiao.main.data.service.YmFeedbacksService; | |
| 12 | +import com.lymsh.yimiao.main.data.service.YmFeedBacksService; | |
| 13 | 13 | import com.lymsh.yimiao.main.data.service.YmUsersService; |
| 14 | 14 | import com.lymsh.yimiao.main.data.util.JsonUtil; |
| 15 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -36,7 +36,7 @@ |
| 36 | 36 | @Autowired |
| 37 | 37 | private YmUsersService usersService; |
| 38 | 38 | @Autowired |
| 39 | - private YmFeedbacksService feedBacksService; | |
| 39 | + private YmFeedBacksService feedBacksService; | |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * 提交意见反馈 |
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | Integer userId = mommyBobyContext.getUserId(); |
| 58 | 58 | if (null != userId) { |
| 59 | 59 | |
| 60 | - YmFeedbacks feedBacks = new YmFeedbacks(); | |
| 60 | + YmFeedBacks feedBacks = new YmFeedBacks(); | |
| 61 | 61 | feedBacks.setYn(YnEnum.yes.getId()); |
| 62 | 62 | feedBacks.setCreated(new Date()); |
| 63 | 63 | feedBacks.setType(1);//默认是反馈 |
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | if (null != users) { |
| 69 | 69 | feedBacks.setPublishName(users.getNickname()); |
| 70 | 70 | } |
| 71 | - feedBacksService.addYmFeedbacks(feedBacks); | |
| 71 | + feedBacksService.addYmFeedBacks(feedBacks); | |
| 72 | 72 | ResultUtils.buildSuccessResultAndWrite(httpServletResponse); |
| 73 | 73 | } else { |
| 74 | 74 | Map<String, Object> result = new HashMap<>(); |
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/VaccineNamesController.java
View file @
4eb776e
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | @RequestMapping(value = "/vaccineNames", method = RequestMethod.GET) |
| 34 | 34 | public void getVaccineNames(HttpServletResponse response, |
| 35 | 35 | @RequestParam("id") String id){ |
| 36 | - MedVaccineName medVaccineName = medVaccineNameService.getMedVaccinename(id); | |
| 36 | + MedVaccineName medVaccineName = medVaccineNameService.getMedVaccineName(id); | |
| 37 | 37 | if (medVaccineName==null){ |
| 38 | 38 | ResultUtils.buildParameterErrorResultAndWrite(response,"疫苗名称信息不存在"); |
| 39 | 39 | return; |