forked from rongchao/epmet-cloud-rizhao
				
			
			
			
				Browse Source
			
			
			
			
				
		# Conflicts: # epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java # epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.javadev
				 85 changed files with 3520 additions and 100 deletions
			
			
		| @ -0,0 +1,12 @@ | |||
| package com.epmet.commons.tools.redis.common.bean; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| @Data | |||
| public class GridInfoCache { | |||
|     private String gridId; | |||
|     private String gridNamePath; | |||
|     private String customerId; | |||
|     private String pid; | |||
|     private String pids; | |||
| } | |||
| @ -0,0 +1,126 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.resi.group.dto.act; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| public class ActCommentAttachmentDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 主键 | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 活动Id[group_act_info.id] | |||
|      */ | |||
| 	private String groupActId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String actCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
|     /** | |||
|      * 删除标记 0:未删除,1:已删除 | |||
|      */ | |||
| 	private String delFlag; | |||
| 
 | |||
|     /** | |||
|      * 乐观锁 | |||
|      */ | |||
| 	private Integer revision; | |||
| 
 | |||
|     /** | |||
|      * 创建人 | |||
|      */ | |||
| 	private String createdBy; | |||
| 
 | |||
|     /** | |||
|      * 创建时间 | |||
|      */ | |||
| 	private Date createdTime; | |||
| 
 | |||
|     /** | |||
|      * 更新人 | |||
|      */ | |||
| 	private String updatedBy; | |||
| 
 | |||
|     /** | |||
|      * 更新时间 | |||
|      */ | |||
| 	private Date updatedTime; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| package com.epmet.resi.group.dto.group.form; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| import javax.validation.constraints.NotNull; | |||
| 
 | |||
| /** | |||
|  * @Description 根据成员查询组列表form | |||
|  * @author wxz | |||
|  * @date 2021.09.08 14:12:44 | |||
| */ | |||
| @Data | |||
| public class GroupsByMemberFormDTO { | |||
|     private String gridId; | |||
|     @NotNull(message = "成员用户ID不能为空") | |||
|     private String userId; | |||
| } | |||
| @ -0,0 +1,28 @@ | |||
| package com.epmet.resi.group.dto.group.result; | |||
| 
 | |||
| import com.fasterxml.jackson.annotation.JsonIgnore; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| 
 | |||
| import java.io.Serializable; | |||
| 
 | |||
| /** | |||
|  * @Author sun | |||
|  * @Description 话题、通知、活动评论附件 | |||
|  */ | |||
| @NoArgsConstructor | |||
| @Data | |||
| public class CommentFileDTO implements Serializable { | |||
| 
 | |||
| 	private static final long serialVersionUID = -3930520724652521552L; | |||
| 	private String name; | |||
| 	private String url; | |||
| 	private String type; | |||
| 	private String format; | |||
| 	private Integer size; | |||
| 	private Integer duration; | |||
| 	@JsonIgnore | |||
| 	private String commentId; | |||
| 	@JsonIgnore | |||
| 	private String userId; | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| package com.epmet.resi.group.dto.group.result; | |||
| 
 | |||
| import lombok.Data; | |||
| 
 | |||
| @Data | |||
| public class RankingResultDTO { | |||
| 
 | |||
|     private Integer gridRanking; | |||
|     private Integer customerRanking; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,126 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.resi.group.dto.notice; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| public class NoticeCommentAttachmentDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 主键 | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 通知Id | |||
|      */ | |||
| 	private String noticeId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String noticeCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
|     /** | |||
|      * 删除标记 0:未删除,1:已删除 | |||
|      */ | |||
| 	private String delFlag; | |||
| 
 | |||
|     /** | |||
|      * 乐观锁 | |||
|      */ | |||
| 	private Integer revision; | |||
| 
 | |||
|     /** | |||
|      * 创建人 | |||
|      */ | |||
| 	private String createdBy; | |||
| 
 | |||
|     /** | |||
|      * 创建时间 | |||
|      */ | |||
| 	private Date createdTime; | |||
| 
 | |||
|     /** | |||
|      * 更新人 | |||
|      */ | |||
| 	private String updatedBy; | |||
| 
 | |||
|     /** | |||
|      * 更新时间 | |||
|      */ | |||
| 	private Date updatedTime; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,126 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.resi.group.dto.topic; | |||
| 
 | |||
| import java.io.Serializable; | |||
| import java.util.Date; | |||
| import lombok.Data; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| public class ResiTopicCommentAttachmentDTO implements Serializable { | |||
| 
 | |||
|     private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 主键 | |||
|      */ | |||
| 	private String id; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 话题Id | |||
|      */ | |||
| 	private String topicId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String topicCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
|     /** | |||
|      * 删除标记 0:未删除,1:已删除 | |||
|      */ | |||
| 	private String delFlag; | |||
| 
 | |||
|     /** | |||
|      * 乐观锁 | |||
|      */ | |||
| 	private Integer revision; | |||
| 
 | |||
|     /** | |||
|      * 创建人 | |||
|      */ | |||
| 	private String createdBy; | |||
| 
 | |||
|     /** | |||
|      * 创建时间 | |||
|      */ | |||
| 	private Date createdTime; | |||
| 
 | |||
|     /** | |||
|      * 更新人 | |||
|      */ | |||
| 	private String updatedBy; | |||
| 
 | |||
|     /** | |||
|      * 更新时间 | |||
|      */ | |||
| 	private Date updatedTime; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,22 @@ | |||
| package com.epmet.resi.group.enums; | |||
| 
 | |||
| /** | |||
| 	 * @Description 搜索范围类型枚举 | |||
| 	 * @author wxz | |||
| 	 * @date 2021.09.07 20:14:21 | |||
| 	*/ | |||
| public enum SearchScopeTypeEnum { | |||
| 
 | |||
| 	CUSTOMER("customer"), | |||
| 	GRID("grid"); | |||
| 
 | |||
| 	private String scopeType; | |||
| 
 | |||
| 	SearchScopeTypeEnum(String scopeType) { | |||
| 		this.scopeType = scopeType; | |||
| 	} | |||
| 
 | |||
| 	public String getScopeType() { | |||
| 		return scopeType; | |||
| 	} | |||
| } | |||
| @ -0,0 +1,85 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.act.controller; | |||
| 
 | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.commons.tools.validator.AssertUtils; | |||
| import com.epmet.commons.tools.validator.ValidatorUtils; | |||
| import com.epmet.commons.tools.validator.group.AddGroup; | |||
| import com.epmet.commons.tools.validator.group.DefaultGroup; | |||
| import com.epmet.commons.tools.validator.group.UpdateGroup; | |||
| import com.epmet.modules.act.service.ActCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.act.ActCommentAttachmentDTO; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| 
 | |||
| import java.util.Map; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @RestController | |||
| @RequestMapping("actcommentattachment") | |||
| public class ActCommentAttachmentController { | |||
|      | |||
|     @Autowired | |||
|     private ActCommentAttachmentService actCommentAttachmentService; | |||
| 
 | |||
|     @GetMapping("page") | |||
|     public Result<PageData<ActCommentAttachmentDTO>> page(@RequestParam Map<String, Object> params){ | |||
|         PageData<ActCommentAttachmentDTO> page = actCommentAttachmentService.page(params); | |||
|         return new Result<PageData<ActCommentAttachmentDTO>>().ok(page); | |||
|     } | |||
| 
 | |||
|     @GetMapping("{id}") | |||
|     public Result<ActCommentAttachmentDTO> get(@PathVariable("id") String id){ | |||
|         ActCommentAttachmentDTO data = actCommentAttachmentService.get(id); | |||
|         return new Result<ActCommentAttachmentDTO>().ok(data); | |||
|     } | |||
| 
 | |||
|     @PostMapping | |||
|     public Result save(@RequestBody ActCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | |||
|         actCommentAttachmentService.save(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @PutMapping | |||
|     public Result update(@RequestBody ActCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | |||
|         actCommentAttachmentService.update(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @DeleteMapping | |||
|     public Result delete(@RequestBody String[] ids){ | |||
|         //效验数据
 | |||
|         AssertUtils.isArrayEmpty(ids, "id"); | |||
|         actCommentAttachmentService.delete(ids); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,43 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.act.dao; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.modules.act.entity.ActCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| 
 | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Mapper | |||
| public interface ActCommentAttachmentDao extends BaseDao<ActCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> selectActComFile(@Param("groupActId") String groupActId); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,93 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.act.entity; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("act_comment_attachment") | |||
| public class ActCommentAttachmentEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 活动Id[group_act_info.id] | |||
|      */ | |||
| 	private String groupActId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String actCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,103 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.act.service; | |||
| 
 | |||
| import com.epmet.commons.mybatis.service.BaseService; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.modules.act.entity.ActCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.act.ActCommentAttachmentDTO; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| 
 | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| public interface ActCommentAttachmentService extends BaseService<ActCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * 默认分页 | |||
|      * | |||
|      * @param params | |||
|      * @return PageData<ActCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     PageData<ActCommentAttachmentDTO> page(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 默认查询 | |||
|      * | |||
|      * @param params | |||
|      * @return java.util.List<ActCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     List<ActCommentAttachmentDTO> list(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 单条查询 | |||
|      * | |||
|      * @param id | |||
|      * @return ActCommentAttachmentDTO | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     ActCommentAttachmentDTO get(String id); | |||
| 
 | |||
|     /** | |||
|      * 默认保存 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void save(ActCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 默认更新 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void update(ActCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 批量删除 | |||
|      * | |||
|      * @param ids | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void delete(String[] ids); | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询活动评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> getActComFile(String groupActId); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,110 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.act.service.impl; | |||
| 
 | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.core.metadata.IPage; | |||
| import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | |||
| import com.epmet.commons.tools.constant.FieldConstant; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.ConvertUtils; | |||
| import com.epmet.modules.act.dao.ActCommentAttachmentDao; | |||
| import com.epmet.modules.act.entity.ActCommentAttachmentEntity; | |||
| import com.epmet.modules.act.service.ActCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.act.ActCommentAttachmentDTO; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| 
 | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 活动评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Service | |||
| public class ActCommentAttachmentServiceImpl extends BaseServiceImpl<ActCommentAttachmentDao, ActCommentAttachmentEntity> implements ActCommentAttachmentService { | |||
| 
 | |||
| 
 | |||
|     @Override | |||
|     public PageData<ActCommentAttachmentDTO> page(Map<String, Object> params) { | |||
|         IPage<ActCommentAttachmentEntity> page = baseDao.selectPage( | |||
|                 getPage(params, FieldConstant.CREATED_TIME, false), | |||
|                 getWrapper(params) | |||
|         ); | |||
|         return getPageData(page, ActCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public List<ActCommentAttachmentDTO> list(Map<String, Object> params) { | |||
|         List<ActCommentAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); | |||
| 
 | |||
|         return ConvertUtils.sourceToTarget(entityList, ActCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     private QueryWrapper<ActCommentAttachmentEntity> getWrapper(Map<String, Object> params){ | |||
|         String id = (String)params.get(FieldConstant.ID_HUMP); | |||
| 
 | |||
|         QueryWrapper<ActCommentAttachmentEntity> wrapper = new QueryWrapper<>(); | |||
|         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | |||
| 
 | |||
|         return wrapper; | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public ActCommentAttachmentDTO get(String id) { | |||
|         ActCommentAttachmentEntity entity = baseDao.selectById(id); | |||
|         return ConvertUtils.sourceToTarget(entity, ActCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void save(ActCommentAttachmentDTO dto) { | |||
|         ActCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ActCommentAttachmentEntity.class); | |||
|         insert(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void update(ActCommentAttachmentDTO dto) { | |||
|         ActCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ActCommentAttachmentEntity.class); | |||
|         updateById(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void delete(String[] ids) { | |||
|         // 逻辑删除(@TableLogic 注解)
 | |||
|         baseDao.deleteBatchIds(Arrays.asList(ids)); | |||
|     } | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     @Override | |||
|     public List<CommentFileDTO> getActComFile(String groupActId) { | |||
|         return baseDao.selectActComFile(groupActId); | |||
|     } | |||
| 
 | |||
| } | |||
| @ -0,0 +1,85 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.notice.controller; | |||
| 
 | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.commons.tools.validator.AssertUtils; | |||
| import com.epmet.commons.tools.validator.ValidatorUtils; | |||
| import com.epmet.commons.tools.validator.group.AddGroup; | |||
| import com.epmet.commons.tools.validator.group.DefaultGroup; | |||
| import com.epmet.commons.tools.validator.group.UpdateGroup; | |||
| import com.epmet.modules.notice.service.NoticeCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.notice.NoticeCommentAttachmentDTO; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| 
 | |||
| import java.util.Map; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @RestController | |||
| @RequestMapping("noticecommentattachment") | |||
| public class NoticeCommentAttachmentController { | |||
|      | |||
|     @Autowired | |||
|     private NoticeCommentAttachmentService noticeCommentAttachmentService; | |||
| 
 | |||
|     @GetMapping("page") | |||
|     public Result<PageData<NoticeCommentAttachmentDTO>> page(@RequestParam Map<String, Object> params){ | |||
|         PageData<NoticeCommentAttachmentDTO> page = noticeCommentAttachmentService.page(params); | |||
|         return new Result<PageData<NoticeCommentAttachmentDTO>>().ok(page); | |||
|     } | |||
| 
 | |||
|     @GetMapping("{id}") | |||
|     public Result<NoticeCommentAttachmentDTO> get(@PathVariable("id") String id){ | |||
|         NoticeCommentAttachmentDTO data = noticeCommentAttachmentService.get(id); | |||
|         return new Result<NoticeCommentAttachmentDTO>().ok(data); | |||
|     } | |||
| 
 | |||
|     @PostMapping | |||
|     public Result save(@RequestBody NoticeCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | |||
|         noticeCommentAttachmentService.save(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @PutMapping | |||
|     public Result update(@RequestBody NoticeCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | |||
|         noticeCommentAttachmentService.update(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @DeleteMapping | |||
|     public Result delete(@RequestBody String[] ids){ | |||
|         //效验数据
 | |||
|         AssertUtils.isArrayEmpty(ids, "id"); | |||
|         noticeCommentAttachmentService.delete(ids); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,43 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.notice.dao; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.modules.notice.entity.NoticeCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| 
 | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Mapper | |||
| public interface NoticeCommentAttachmentDao extends BaseDao<NoticeCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> selectNoticeComFile(@Param("noticeId") String noticeId); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,93 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.notice.entity; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("notice_comment_attachment") | |||
| public class NoticeCommentAttachmentEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 通知Id | |||
|      */ | |||
| 	private String noticeId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String noticeCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,103 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.notice.service; | |||
| 
 | |||
| import com.epmet.commons.mybatis.service.BaseService; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.modules.notice.entity.NoticeCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import com.epmet.resi.group.dto.notice.NoticeCommentAttachmentDTO; | |||
| 
 | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| public interface NoticeCommentAttachmentService extends BaseService<NoticeCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * 默认分页 | |||
|      * | |||
|      * @param params | |||
|      * @return PageData<NoticeCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     PageData<NoticeCommentAttachmentDTO> page(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 默认查询 | |||
|      * | |||
|      * @param params | |||
|      * @return java.util.List<NoticeCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     List<NoticeCommentAttachmentDTO> list(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 单条查询 | |||
|      * | |||
|      * @param id | |||
|      * @return NoticeCommentAttachmentDTO | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     NoticeCommentAttachmentDTO get(String id); | |||
| 
 | |||
|     /** | |||
|      * 默认保存 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void save(NoticeCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 默认更新 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void update(NoticeCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 批量删除 | |||
|      * | |||
|      * @param ids | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void delete(String[] ids); | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> getNoticeComFile(String noticeId); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,110 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.notice.service.impl; | |||
| 
 | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.core.metadata.IPage; | |||
| import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | |||
| import com.epmet.commons.tools.constant.FieldConstant; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.ConvertUtils; | |||
| import com.epmet.modules.notice.dao.NoticeCommentAttachmentDao; | |||
| import com.epmet.modules.notice.entity.NoticeCommentAttachmentEntity; | |||
| import com.epmet.modules.notice.service.NoticeCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import com.epmet.resi.group.dto.notice.NoticeCommentAttachmentDTO; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| 
 | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 通知评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Service | |||
| public class NoticeCommentAttachmentServiceImpl extends BaseServiceImpl<NoticeCommentAttachmentDao, NoticeCommentAttachmentEntity> implements NoticeCommentAttachmentService { | |||
| 
 | |||
| 
 | |||
|     @Override | |||
|     public PageData<NoticeCommentAttachmentDTO> page(Map<String, Object> params) { | |||
|         IPage<NoticeCommentAttachmentEntity> page = baseDao.selectPage( | |||
|                 getPage(params, FieldConstant.CREATED_TIME, false), | |||
|                 getWrapper(params) | |||
|         ); | |||
|         return getPageData(page, NoticeCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public List<NoticeCommentAttachmentDTO> list(Map<String, Object> params) { | |||
|         List<NoticeCommentAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); | |||
| 
 | |||
|         return ConvertUtils.sourceToTarget(entityList, NoticeCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     private QueryWrapper<NoticeCommentAttachmentEntity> getWrapper(Map<String, Object> params){ | |||
|         String id = (String)params.get(FieldConstant.ID_HUMP); | |||
| 
 | |||
|         QueryWrapper<NoticeCommentAttachmentEntity> wrapper = new QueryWrapper<>(); | |||
|         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | |||
| 
 | |||
|         return wrapper; | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public NoticeCommentAttachmentDTO get(String id) { | |||
|         NoticeCommentAttachmentEntity entity = baseDao.selectById(id); | |||
|         return ConvertUtils.sourceToTarget(entity, NoticeCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void save(NoticeCommentAttachmentDTO dto) { | |||
|         NoticeCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentAttachmentEntity.class); | |||
|         insert(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void update(NoticeCommentAttachmentDTO dto) { | |||
|         NoticeCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentAttachmentEntity.class); | |||
|         updateById(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void delete(String[] ids) { | |||
|         // 逻辑删除(@TableLogic 注解)
 | |||
|         baseDao.deleteBatchIds(Arrays.asList(ids)); | |||
|     } | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     @Override | |||
|     public List<CommentFileDTO> getNoticeComFile(String noticeId) { | |||
|         return baseDao.selectNoticeComFile(noticeId); | |||
|     } | |||
| 
 | |||
| } | |||
| @ -0,0 +1,85 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.topic.controller; | |||
| 
 | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.commons.tools.validator.AssertUtils; | |||
| import com.epmet.commons.tools.validator.ValidatorUtils; | |||
| import com.epmet.commons.tools.validator.group.AddGroup; | |||
| import com.epmet.commons.tools.validator.group.DefaultGroup; | |||
| import com.epmet.commons.tools.validator.group.UpdateGroup; | |||
| import com.epmet.modules.topic.service.ResiTopicCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.topic.ResiTopicCommentAttachmentDTO; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| 
 | |||
| import java.util.Map; | |||
| 
 | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @RestController | |||
| @RequestMapping("resitopiccommentattachment") | |||
| public class ResiTopicCommentAttachmentController { | |||
|      | |||
|     @Autowired | |||
|     private ResiTopicCommentAttachmentService resiTopicCommentAttachmentService; | |||
| 
 | |||
|     @GetMapping("page") | |||
|     public Result<PageData<ResiTopicCommentAttachmentDTO>> page(@RequestParam Map<String, Object> params){ | |||
|         PageData<ResiTopicCommentAttachmentDTO> page = resiTopicCommentAttachmentService.page(params); | |||
|         return new Result<PageData<ResiTopicCommentAttachmentDTO>>().ok(page); | |||
|     } | |||
| 
 | |||
|     @GetMapping("{id}") | |||
|     public Result<ResiTopicCommentAttachmentDTO> get(@PathVariable("id") String id){ | |||
|         ResiTopicCommentAttachmentDTO data = resiTopicCommentAttachmentService.get(id); | |||
|         return new Result<ResiTopicCommentAttachmentDTO>().ok(data); | |||
|     } | |||
| 
 | |||
|     @PostMapping | |||
|     public Result save(@RequestBody ResiTopicCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | |||
|         resiTopicCommentAttachmentService.save(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @PutMapping | |||
|     public Result update(@RequestBody ResiTopicCommentAttachmentDTO dto){ | |||
|         //效验数据
 | |||
|         ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | |||
|         resiTopicCommentAttachmentService.update(dto); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
|     @DeleteMapping | |||
|     public Result delete(@RequestBody String[] ids){ | |||
|         //效验数据
 | |||
|         AssertUtils.isArrayEmpty(ids, "id"); | |||
|         resiTopicCommentAttachmentService.delete(ids); | |||
|         return new Result(); | |||
|     } | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -0,0 +1,43 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.topic.dao; | |||
| 
 | |||
| import com.epmet.commons.mybatis.dao.BaseDao; | |||
| import com.epmet.modules.topic.entity.ResiTopicCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import org.apache.ibatis.annotations.Mapper; | |||
| import org.apache.ibatis.annotations.Param; | |||
| 
 | |||
| import java.util.List; | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Mapper | |||
| public interface ResiTopicCommentAttachmentDao extends BaseDao<ResiTopicCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> selectTopicComFile(@Param("topicId") String topicId); | |||
| 
 | |||
| } | |||
| @ -0,0 +1,93 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.topic.entity; | |||
| 
 | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper=false) | |||
| @TableName("resi_topic_comment_attachment") | |||
| public class ResiTopicCommentAttachmentEntity extends BaseEpmetEntity { | |||
| 
 | |||
| 	private static final long serialVersionUID = 1L; | |||
| 
 | |||
|     /** | |||
|      * 客户ID | |||
|      */ | |||
| 	private String customerId; | |||
| 
 | |||
|     /** | |||
|      * 话题Id | |||
|      */ | |||
| 	private String topicId; | |||
| 
 | |||
|     /** | |||
|      * 评论Id | |||
|      */ | |||
| 	private String topicCommentId; | |||
| 
 | |||
|     /** | |||
|      * 文件名 | |||
|      */ | |||
| 	private String fileName; | |||
| 
 | |||
|     /** | |||
|      * 附件名(uuid随机生成) | |||
|      */ | |||
| 	private String attachmentName; | |||
| 
 | |||
|     /** | |||
|      * 文件大小,单位b | |||
|      */ | |||
| 	private Integer attachmentSize; | |||
| 
 | |||
|     /** | |||
|      * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) | |||
|      */ | |||
| 	private String attachmentFormat; | |||
| 
 | |||
|     /** | |||
|      * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) | |||
|      */ | |||
| 	private String attachmentType; | |||
| 
 | |||
|     /** | |||
|      * 附件地址 | |||
|      */ | |||
| 	private String attachmentUrl; | |||
| 
 | |||
|     /** | |||
|      * 排序字段 | |||
|      */ | |||
| 	private Integer sort; | |||
| 
 | |||
|     /** | |||
|      * 语音或视频时长,秒 | |||
|      */ | |||
| 	private Integer duration; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,102 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.topic.service; | |||
| 
 | |||
| import com.epmet.commons.mybatis.service.BaseService; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.modules.topic.entity.ResiTopicCommentAttachmentEntity; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import com.epmet.resi.group.dto.topic.ResiTopicCommentAttachmentDTO; | |||
| 
 | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| public interface ResiTopicCommentAttachmentService extends BaseService<ResiTopicCommentAttachmentEntity> { | |||
| 
 | |||
|     /** | |||
|      * 默认分页 | |||
|      * | |||
|      * @param params | |||
|      * @return PageData<ResiTopicCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     PageData<ResiTopicCommentAttachmentDTO> page(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 默认查询 | |||
|      * | |||
|      * @param params | |||
|      * @return java.util.List<ResiTopicCommentAttachmentDTO> | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     List<ResiTopicCommentAttachmentDTO> list(Map<String, Object> params); | |||
| 
 | |||
|     /** | |||
|      * 单条查询 | |||
|      * | |||
|      * @param id | |||
|      * @return ResiTopicCommentAttachmentDTO | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     ResiTopicCommentAttachmentDTO get(String id); | |||
| 
 | |||
|     /** | |||
|      * 默认保存 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void save(ResiTopicCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 默认更新 | |||
|      * | |||
|      * @param dto | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void update(ResiTopicCommentAttachmentDTO dto); | |||
| 
 | |||
|     /** | |||
|      * 批量删除 | |||
|      * | |||
|      * @param ids | |||
|      * @return void | |||
|      * @author generator | |||
|      * @date 2021-09-06 | |||
|      */ | |||
|     void delete(String[] ids); | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询话题评论所有人员的附件信息 | |||
|      **/ | |||
|     List<CommentFileDTO> getTopicComFile(String topicId); | |||
| } | |||
| @ -0,0 +1,110 @@ | |||
| /** | |||
|  * Copyright 2018 人人开源 https://www.renren.io
 | |||
|  * <p> | |||
|  * This program is free software: you can redistribute it and/or modify | |||
|  * it under the terms of the GNU General Public License as published by | |||
|  * the Free Software Foundation, either version 3 of the License, or | |||
|  * (at your option) any later version. | |||
|  * <p> | |||
|  * This program is distributed in the hope that it will be useful, | |||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |||
|  * GNU General Public License for more details. | |||
|  * <p> | |||
|  * You should have received a copy of the GNU General Public License | |||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | |||
|  */ | |||
| 
 | |||
| package com.epmet.modules.topic.service.impl; | |||
| 
 | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.baomidou.mybatisplus.core.metadata.IPage; | |||
| import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | |||
| import com.epmet.commons.tools.constant.FieldConstant; | |||
| import com.epmet.commons.tools.page.PageData; | |||
| import com.epmet.commons.tools.utils.ConvertUtils; | |||
| import com.epmet.modules.topic.dao.ResiTopicCommentAttachmentDao; | |||
| import com.epmet.modules.topic.entity.ResiTopicCommentAttachmentEntity; | |||
| import com.epmet.modules.topic.service.ResiTopicCommentAttachmentService; | |||
| import com.epmet.resi.group.dto.group.result.CommentFileDTO; | |||
| import com.epmet.resi.group.dto.topic.ResiTopicCommentAttachmentDTO; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| 
 | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| 
 | |||
| /** | |||
|  * 话题评论附件表 | |||
|  * | |||
|  * @author generator generator@elink-cn.com | |||
|  * @since v1.0.0 2021-09-06 | |||
|  */ | |||
| @Service | |||
| public class ResiTopicCommentAttachmentServiceImpl extends BaseServiceImpl<ResiTopicCommentAttachmentDao, ResiTopicCommentAttachmentEntity> implements ResiTopicCommentAttachmentService { | |||
| 
 | |||
| 
 | |||
|     @Override | |||
|     public PageData<ResiTopicCommentAttachmentDTO> page(Map<String, Object> params) { | |||
|         IPage<ResiTopicCommentAttachmentEntity> page = baseDao.selectPage( | |||
|                 getPage(params, FieldConstant.CREATED_TIME, false), | |||
|                 getWrapper(params) | |||
|         ); | |||
|         return getPageData(page, ResiTopicCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public List<ResiTopicCommentAttachmentDTO> list(Map<String, Object> params) { | |||
|         List<ResiTopicCommentAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); | |||
| 
 | |||
|         return ConvertUtils.sourceToTarget(entityList, ResiTopicCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     private QueryWrapper<ResiTopicCommentAttachmentEntity> getWrapper(Map<String, Object> params){ | |||
|         String id = (String)params.get(FieldConstant.ID_HUMP); | |||
| 
 | |||
|         QueryWrapper<ResiTopicCommentAttachmentEntity> wrapper = new QueryWrapper<>(); | |||
|         wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | |||
| 
 | |||
|         return wrapper; | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     public ResiTopicCommentAttachmentDTO get(String id) { | |||
|         ResiTopicCommentAttachmentEntity entity = baseDao.selectById(id); | |||
|         return ConvertUtils.sourceToTarget(entity, ResiTopicCommentAttachmentDTO.class); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void save(ResiTopicCommentAttachmentDTO dto) { | |||
|         ResiTopicCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicCommentAttachmentEntity.class); | |||
|         insert(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void update(ResiTopicCommentAttachmentDTO dto) { | |||
|         ResiTopicCommentAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicCommentAttachmentEntity.class); | |||
|         updateById(entity); | |||
|     } | |||
| 
 | |||
|     @Override | |||
|     @Transactional(rollbackFor = Exception.class) | |||
|     public void delete(String[] ids) { | |||
|         // 逻辑删除(@TableLogic 注解)
 | |||
|         baseDao.deleteBatchIds(Arrays.asList(ids)); | |||
|     } | |||
| 
 | |||
|     /** | |||
|      * @Author sun | |||
|      * @Description 查询通知评论所有人员的附件信息 | |||
|      **/ | |||
|     @Override | |||
|     public List<CommentFileDTO> getTopicComFile(String topicId) { | |||
|         return baseDao.selectTopicComFile(topicId); | |||
|     } | |||
| 
 | |||
| } | |||
| @ -0,0 +1,65 @@ | |||
| CREATE TABLE `resi_topic_comment_attachment` ( | |||
|   `ID` varchar(64) NOT NULL COMMENT '主键', | |||
|   `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', | |||
|   `TOPIC_ID` varchar(64) NOT NULL COMMENT '话题Id', | |||
|   `TOPIC_COMMENT_ID` varchar(64) NOT NULL COMMENT '评论Id', | |||
|   `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', | |||
|   `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', | |||
|   `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', | |||
|   `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', | |||
|   `ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', | |||
|   `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', | |||
|   `SORT` int(1) NOT NULL COMMENT '排序字段', | |||
|   `DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', | |||
|   `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', | |||
|   `REVISION` int(11) NOT NULL COMMENT '乐观锁', | |||
|   `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', | |||
|   `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', | |||
|   `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', | |||
|   `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', | |||
|   PRIMARY KEY (`ID`) USING BTREE | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='话题评论附件表'; | |||
| 
 | |||
| CREATE TABLE `act_comment_attachment` ( | |||
|   `ID` varchar(64) NOT NULL COMMENT '主键', | |||
|   `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', | |||
|   `GROUP_ACT_ID` varchar(64) NOT NULL COMMENT '活动Id[group_act_info.id]', | |||
|   `ACT_COMMENT_ID` varchar(64) NOT NULL COMMENT '评论Id', | |||
|   `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', | |||
|   `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', | |||
|   `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', | |||
|   `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', | |||
|   `ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', | |||
|   `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', | |||
|   `SORT` int(1) NOT NULL COMMENT '排序字段', | |||
|   `DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', | |||
|   `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', | |||
|   `REVISION` int(11) NOT NULL COMMENT '乐观锁', | |||
|   `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', | |||
|   `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', | |||
|   `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', | |||
|   `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', | |||
|   PRIMARY KEY (`ID`) USING BTREE | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='活动评论附件表'; | |||
| 
 | |||
| CREATE TABLE `notice_comment_attachment` ( | |||
|   `ID` varchar(64) NOT NULL COMMENT '主键', | |||
|   `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', | |||
|   `NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', | |||
|   `NOTICE_COMMENT_ID` varchar(64) NOT NULL COMMENT '评论Id', | |||
|   `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', | |||
|   `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', | |||
|   `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', | |||
|   `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', | |||
|   `ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', | |||
|   `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', | |||
|   `SORT` int(1) NOT NULL COMMENT '排序字段', | |||
|   `DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', | |||
|   `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', | |||
|   `REVISION` int(11) NOT NULL COMMENT '乐观锁', | |||
|   `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', | |||
|   `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', | |||
|   `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', | |||
|   `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', | |||
|   PRIMARY KEY (`ID`) USING BTREE | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='通知评论附件表'; | |||
| @ -0,0 +1,26 @@ | |||
| <?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.modules.act.dao.ActCommentAttachmentDao"> | |||
| 
 | |||
|     <select id="selectActComFile" resultType="com.epmet.resi.group.dto.group.result.CommentFileDTO"> | |||
|         SELECT | |||
|             file_name name, | |||
|             attachment_size size, | |||
|             attachment_format format, | |||
|             attachment_type type, | |||
|             attachment_url url, | |||
|             sort sort, | |||
|             duration duration, | |||
|             act_comment_id commentId, | |||
|             created_by userId | |||
|         FROM | |||
|             act_comment_attachment | |||
|         WHERE | |||
|             del_flag = '0' | |||
|         AND group_act_id = #{groupActId} | |||
|         ORDER BY | |||
|             created_by, sort ASC | |||
|     </select> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,26 @@ | |||
| <?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.modules.notice.dao.NoticeCommentAttachmentDao"> | |||
| 
 | |||
|     <select id="selectNoticeComFile" resultType="com.epmet.resi.group.dto.group.result.CommentFileDTO"> | |||
|         SELECT | |||
|             file_name name, | |||
|             attachment_size size, | |||
|             attachment_format format, | |||
|             attachment_type type, | |||
|             attachment_url url, | |||
|             sort sort, | |||
|             duration duration, | |||
|             notice_comment_id commentId, | |||
|             created_by userId | |||
|         FROM | |||
|             notice_comment_attachment | |||
|         WHERE | |||
|             del_flag = '0' | |||
|         AND notice_id = #{noticeId} | |||
|         ORDER BY | |||
|             created_by, sort ASC<!-- 同一个人各类型文件靠在一起,按sort升序 --> | |||
|     </select> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,26 @@ | |||
| <?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.modules.topic.dao.ResiTopicCommentAttachmentDao"> | |||
| 
 | |||
|     <select id="selectTopicComFile" resultType="com.epmet.resi.group.dto.group.result.CommentFileDTO"> | |||
|         SELECT | |||
|             file_name name, | |||
|             attachment_size size, | |||
|             attachment_format format, | |||
|             attachment_type type, | |||
|             attachment_url url, | |||
|             sort sort, | |||
|             duration duration, | |||
|             topic_comment_id commentId, | |||
|             created_by userId | |||
|         FROM | |||
|             resi_topic_comment_attachment | |||
|         WHERE | |||
|             del_flag = '0' | |||
|         AND topic_id = #{topicId} | |||
|         ORDER BY | |||
|             created_by, sort ASC | |||
|     </select> | |||
| 
 | |||
| </mapper> | |||
					Loading…
					
					
				
		Reference in new issue