package com.tanpu.community.util; import com.tanpu.community.api.beans.TopicDTO; import com.tanpu.community.dao.entity.community.TopicEntity; public class TopicConverter { public static TopicDTO convertToDTO(TopicEntity topicEntity){ TopicDTO topicDTO = new TopicDTO(); topicDTO.setTopicTitle(topicEntity.getTopicTitle()); topicDTO.setId(topicEntity.getId()); topicDTO.setIsTop(topicEntity.getIsTop()); topicDTO.setIsConceal(topicEntity.getIsConceal()); topicDTO.setCreateBy(topicEntity.getCreateBy()); topicDTO.setCreateTime(topicEntity.getCreateTime()); topicDTO.setUpdateTime(topicEntity.getUpdateTime()); topicDTO.setUpdateBy(topicEntity.getUpdateBy()); topicDTO.setDeleteTag(topicEntity.getDeleteTag()); return topicDTO; } }