forked from rongchao/epmet-cloud-rizhao
				
			
				 16 changed files with 486 additions and 40 deletions
			
			
		@ -1,10 +1,24 @@ | 
				
			|||
package com.epmet.resi.group.dto.topic.form; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import javax.validation.constraints.NotBlank; | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Description | 
				
			|||
 * @ClassName ResiCommentFormDTO | 
				
			|||
 * @Author wangc | 
				
			|||
 * @date 2020.03.31 17:32 | 
				
			|||
 */ | 
				
			|||
public class ResiCommentFormDTO { | 
				
			|||
@Data | 
				
			|||
public class ResiCommentFormDTO implements Serializable { | 
				
			|||
 | 
				
			|||
   private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
   @NotBlank(message = "话题Id不能为空") | 
				
			|||
   private String topicId; | 
				
			|||
 | 
				
			|||
   @NotBlank(message = "评论内容不能为空") | 
				
			|||
   private String commentContent; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
@ -0,0 +1,41 @@ | 
				
			|||
package com.epmet.resi.group.dto.topic.form; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import javax.validation.constraints.Min; | 
				
			|||
import javax.validation.constraints.NotBlank; | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Description | 
				
			|||
 * @ClassName ResiTopicPageFormDTO | 
				
			|||
 * @Author wangc | 
				
			|||
 * @date 2020.04.01 10:09 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ResiTopicPageFormDTO implements Serializable{ | 
				
			|||
 | 
				
			|||
    private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 组Id | 
				
			|||
     * */ | 
				
			|||
    @NotBlank(message = "组Id不能为空") | 
				
			|||
    private String groupId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 请求页码 | 
				
			|||
     * */ | 
				
			|||
    @Min(value = 1) | 
				
			|||
    private int pageNo; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 每页多少条数据 | 
				
			|||
     * */ | 
				
			|||
    private int pageSize = 20; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 搜索时可以带状态的查询,也可以不带 | 
				
			|||
     * */ | 
				
			|||
    private String status; | 
				
			|||
} | 
				
			|||
@ -1,10 +1,67 @@ | 
				
			|||
package com.epmet.resi.group.dto.topic.result; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * @Description | 
				
			|||
 * @Description 查看历史话题返回对象 | 
				
			|||
 * @ClassName ResiTopicInfoResultDTO | 
				
			|||
 * @Author wangc | 
				
			|||
 * @date 2020.04.01 08:46 | 
				
			|||
 */ | 
				
			|||
public class ResiTopicInfoResultDTO { | 
				
			|||
@Data | 
				
			|||
public class ResiTopicInfoResultDTO  implements Serializable{ | 
				
			|||
 | 
				
			|||
    private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 话题Id | 
				
			|||
     * */ | 
				
			|||
    private String topicId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户Id | 
				
			|||
     * */ | 
				
			|||
    private String userId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 发布人名称 | 
				
			|||
     * */ | 
				
			|||
    private String releaseUserName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 发布人头像 | 
				
			|||
     * */ | 
				
			|||
    private String releaseUserHeadPhoto; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 发布时间 yyyy-MM-dd HH:mm:ss | 
				
			|||
     * */ | 
				
			|||
    private String releaseTime; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 话题内容 | 
				
			|||
     * */ | 
				
			|||
    private String topicContent; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 话题状态 讨论中  已关闭 | 
				
			|||
     * */ | 
				
			|||
    private String status; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 网格名称 | 
				
			|||
     * */ | 
				
			|||
    private String gridName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 是否本人 0不是 1是 | 
				
			|||
     * */ | 
				
			|||
    private String releaseUserFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 第一张图片 | 
				
			|||
     * */ | 
				
			|||
    private String firstPhoto; | 
				
			|||
} | 
				
			|||
 | 
				
			|||
@ -1,22 +1,43 @@ | 
				
			|||
<?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"> | 
				
			|||
 | 
				
			|||
<mapper namespace="com.epmet.dao.ResiTopicAttachmentDao"> | 
				
			|||
<mapper namespace="com.epmet.modules.topic.dao.ResiTopicAttachmentDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.epmet.entity.ResiTopicAttachmentEntity" id="resiTopicAttachmentMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="topicId" column="TOPIC_ID"/> | 
				
			|||
        <result property="attachmentName" column="ATTACHMENT_NAME"/> | 
				
			|||
        <result property="attachmentFormat" column="ATTACHMENT_FORMAT"/> | 
				
			|||
        <result property="attachmentType" column="ATTACHMENT_TYPE"/> | 
				
			|||
        <result property="attachmentUrl" column="ATTACHMENT_URL"/> | 
				
			|||
        <result property="delFlag" column="DEL_FLAG"/> | 
				
			|||
        <result property="revision" column="REVISION"/> | 
				
			|||
        <result property="createdBy" column="CREATED_BY"/> | 
				
			|||
        <result property="createdTime" column="CREATED_TIME"/> | 
				
			|||
        <result property="updatedBy" column="UPDATED_BY"/> | 
				
			|||
        <result property="updatedTime" column="UPDATED_TIME"/> | 
				
			|||
    </resultMap> | 
				
			|||
 | 
				
			|||
    <insert id="insertBatch" parameterType="java.util.List"> | 
				
			|||
 | 
				
			|||
        insert into user | 
				
			|||
        ( | 
				
			|||
        id, | 
				
			|||
        topic_id, | 
				
			|||
        attachment_name, | 
				
			|||
        attachment_format, | 
				
			|||
        attachment_type, | 
				
			|||
        attachment_url, | 
				
			|||
        del_flag, | 
				
			|||
        revision, | 
				
			|||
        created_by, | 
				
			|||
        created_time, | 
				
			|||
        updated_by, | 
				
			|||
        updated_time | 
				
			|||
        ) values | 
				
			|||
        <foreach collection="list" item="item" index="index" separator=","> | 
				
			|||
            ( | 
				
			|||
            (SELECT REPLACE(UUID(), '-', '') AS id), | 
				
			|||
            #{item.topicId}, | 
				
			|||
            #{item.attachmentName}, | 
				
			|||
            #{item.attachmentFormat}, | 
				
			|||
            #{item.attachmentType}, | 
				
			|||
            #{item.attachmentUrl}, | 
				
			|||
            #{item.delFlag}, | 
				
			|||
            #{item.revision}, | 
				
			|||
            #{item.createdBy}, | 
				
			|||
            #{item.createdTime}, | 
				
			|||
            #{item.updatedBy}, | 
				
			|||
            #{item.updatedTime} | 
				
			|||
            ) | 
				
			|||
        </foreach> | 
				
			|||
    </insert> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
</mapper> | 
				
			|||
					Loading…
					
					
				
		Reference in new issue