标签/主题功能完善

This commit is contained in:
x ronger 2020-07-30 09:36:17 +08:00
parent e1aa873e33
commit 1ceb7399d2
5 changed files with 11 additions and 4 deletions

View File

@ -44,4 +44,6 @@ public class Tag implements Serializable,Cloneable {
private Date updatedTime;
/** 保留标签 */
private String tagReservation;
/** 描述 */
private String tagDescriptionHtml;
}

View File

@ -42,5 +42,7 @@ public class Topic {
private Date createdTime;
/** 更新时间 */
private Date updatedTime;
/** 专题描述 Html */
private String topicDescriptionHtml;
}

View File

@ -32,6 +32,7 @@ public interface TopicMapper extends Mapper<Topic> {
List<TagDTO> selectTopicTag(@Param("idTopic") Integer idTopic);
/**
* 更新
* @param idTopic
* @param topicTitle
* @param topicUri
@ -40,9 +41,10 @@ public interface TopicMapper extends Mapper<Topic> {
* @param topicStatus
* @param topicSort
* @param topicDescription
* @param topicDescriptionHtml
* @return
*/
Integer update(@Param("idTopic") Integer idTopic, @Param("topicTitle") String topicTitle, @Param("topicUri") String topicUri, @Param("topicIconPath") String topicIconPath, @Param("topicNva") String topicNva, @Param("topicStatus") String topicStatus, @Param("topicSort") Integer topicSort, @Param("topicDescription") String topicDescription);
Integer update(@Param("idTopic") Integer idTopic, @Param("topicTitle") String topicTitle, @Param("topicUri") String topicUri, @Param("topicIconPath") String topicIconPath, @Param("topicNva") String topicNva, @Param("topicStatus") String topicStatus, @Param("topicSort") Integer topicSort, @Param("topicDescription") String topicDescription, @Param("topicDescriptionHtml") String topicDescriptionHtml);
/**
* @param idTopic

View File

@ -82,6 +82,7 @@ public class TopicServiceImpl extends AbstractService<Topic> implements TopicSer
newTopic.setTopicStatus(topic.getTopicStatus());
newTopic.setTopicSort(topic.getTopicSort());
newTopic.setTopicDescription(topic.getTopicDescription());
newTopic.setTopicDescriptionHtml(topic.getTopicDescriptionHtml());
newTopic.setCreatedTime(new Date());
newTopic.setUpdatedTime(topic.getCreatedTime());
result = topicMapper.insertSelective(newTopic);
@ -89,7 +90,7 @@ public class TopicServiceImpl extends AbstractService<Topic> implements TopicSer
topic.setCreatedTime(new Date());
result = topicMapper.update(topic.getIdTopic(),topic.getTopicTitle(),topic.getTopicUri()
,topic.getTopicIconPath(),topic.getTopicNva(),topic.getTopicStatus()
,topic.getTopicSort(),topic.getTopicDescription());
,topic.getTopicSort(),topic.getTopicDescription(),topic.getTopicDescriptionHtml());
}
if (result == 0) {
map.put("message","操作失败!");

View File

@ -54,8 +54,8 @@
insert into vertical_topic_tag (id_topic, id_tag, created_time, updated_time) values (#{idTopic}, #{idTag}, sysdate(), sysdate())
</insert>
<update id="update">
update vertical_topic set topic_title = #{topicTitle},topic_uri = #{topicUri},topic_icon_path = #{topicIconPath}
,topic_nva = #{topicNva},topic_status = #{topicStatus},topic_sort = #{topicSort},topic_description = #{topicDescription}
update vertical_topic set topic_title = #{topicTitle},topic_uri = #{topicUri},topic_icon_path = #{topicIconPath}, updated_time = sysdate(),
,topic_nva = #{topicNva},topic_status = #{topicStatus},topic_sort = #{topicSort},topic_description = #{topicDescription},topic_description_html = #{topicDescriptionHtml}
where id = #{idTopic}
</update>
<delete id="deleteTopicTag">