From 1ceb7399d2b16a6bffdc47904384a6148d7ac639 Mon Sep 17 00:00:00 2001 From: x ronger Date: Thu, 30 Jul 2020 09:36:17 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=A0=87=E7=AD=BE/=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/vertical/entity/Tag.java | 2 ++ src/main/java/com/rymcu/vertical/entity/Topic.java | 2 ++ src/main/java/com/rymcu/vertical/mapper/TopicMapper.java | 4 +++- .../com/rymcu/vertical/service/impl/TopicServiceImpl.java | 3 ++- src/main/java/mapper/TopicMapper.xml | 4 ++-- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/rymcu/vertical/entity/Tag.java b/src/main/java/com/rymcu/vertical/entity/Tag.java index b53e68a..9184f90 100644 --- a/src/main/java/com/rymcu/vertical/entity/Tag.java +++ b/src/main/java/com/rymcu/vertical/entity/Tag.java @@ -44,4 +44,6 @@ public class Tag implements Serializable,Cloneable { private Date updatedTime; /** 保留标签 */ private String tagReservation; + /** 描述 */ + private String tagDescriptionHtml; } diff --git a/src/main/java/com/rymcu/vertical/entity/Topic.java b/src/main/java/com/rymcu/vertical/entity/Topic.java index 4cb6c72..0011dda 100644 --- a/src/main/java/com/rymcu/vertical/entity/Topic.java +++ b/src/main/java/com/rymcu/vertical/entity/Topic.java @@ -42,5 +42,7 @@ public class Topic { private Date createdTime; /** 更新时间 */ private Date updatedTime; + /** 专题描述 Html */ + private String topicDescriptionHtml; } diff --git a/src/main/java/com/rymcu/vertical/mapper/TopicMapper.java b/src/main/java/com/rymcu/vertical/mapper/TopicMapper.java index 266d867..d1dbd99 100644 --- a/src/main/java/com/rymcu/vertical/mapper/TopicMapper.java +++ b/src/main/java/com/rymcu/vertical/mapper/TopicMapper.java @@ -32,6 +32,7 @@ public interface TopicMapper extends Mapper { List selectTopicTag(@Param("idTopic") Integer idTopic); /** + * 更新 * @param idTopic * @param topicTitle * @param topicUri @@ -40,9 +41,10 @@ public interface TopicMapper extends Mapper { * @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 diff --git a/src/main/java/com/rymcu/vertical/service/impl/TopicServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/TopicServiceImpl.java index e875202..84f51f8 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/TopicServiceImpl.java @@ -82,6 +82,7 @@ public class TopicServiceImpl extends AbstractService 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 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","操作失败!"); diff --git a/src/main/java/mapper/TopicMapper.xml b/src/main/java/mapper/TopicMapper.xml index fbc19fc..59996f0 100644 --- a/src/main/java/mapper/TopicMapper.xml +++ b/src/main/java/mapper/TopicMapper.xml @@ -54,8 +54,8 @@ insert into vertical_topic_tag (id_topic, id_tag, created_time, updated_time) values (#{idTopic}, #{idTag}, sysdate(), sysdate()) - 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}