From 1d4231a21d432f4775bd439ab29ce71b11fbfdf7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 23 Dec 2020 17:05:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/TopicAttachmentResultDTO.java | 6 ++--- .../dto/topic/result/TopicFileResultDTO.java | 26 +++++++++++++++++++ .../service/impl/ResiTopicServiceImpl.java | 15 ++++++----- 3 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicFileResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java index 0b28664ce0..fa4bb92fdb 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicAttachmentResultDTO.java @@ -17,14 +17,14 @@ public class TopicAttachmentResultDTO implements Serializable { /** * 文件附件Url集合 */ - private LinkedList docList; + private LinkedList docList; /** * 语音附件Url集合 */ - private LinkedList voiceList; + private LinkedList voiceList; /** * 视频附件Url集合 */ - private LinkedList videoList; + private LinkedList videoList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicFileResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicFileResultDTO.java new file mode 100644 index 0000000000..88a3a0061c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/TopicFileResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * @Author sun + * @Description 获取话题附件信息-接口返参 + */ +@Data +public class TopicFileResultDTO implements Serializable { + + private static final long serialVersionUID = -8606257390921799432L; + + /** + * 文件Url + */ + private String url; + /** + * 语音或视频文件的时长,单位毫秒 + */ + private Integer duration; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 0dfd79c075..dedf0a4bf3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -1869,18 +1869,21 @@ public class ResiTopicServiceImpl extends BaseServiceImpl docList = new LinkedList<>(); - LinkedList voiceList = new LinkedList<>(); - LinkedList videoList = new LinkedList<>(); + LinkedList docList = new LinkedList<>(); + LinkedList voiceList = new LinkedList<>(); + LinkedList videoList = new LinkedList<>(); list.forEach(l->{ + TopicFileResultDTO dto = new TopicFileResultDTO(); + dto.setUrl(l.getAttachmentUrl()); + dto.setDuration(l.getDuration()); if(TopicConstant.FILE_DOC.equals(l.getAttachmentType())){ - docList.add(l.getAttachmentUrl()); + docList.add(dto); } if(TopicConstant.FILE_VOICE.equals(l.getAttachmentType())){ - voiceList.add(l.getAttachmentUrl()); + voiceList.add(dto); } if(TopicConstant.FILE_VIDEO.equals(l.getAttachmentType())){ - videoList.add(l.getAttachmentUrl()); + videoList.add(dto); } }); resultDTO.setDocList(docList); From 84576d84c81169f506e5823afadd21c511209dd6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 23 Dec 2020 17:36:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=84=E5=88=99functio?= =?UTF-8?q?nId=E8=A6=81=E5=92=8Coper=5Fcustomize=E7=9A=84fuction=E8=A1=A8?= =?UTF-8?q?=E5=AF=B9=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.4__addNewRuleTemplate.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql b/epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql index 24b27a47b0..069008ec48 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.4__addNewRuleTemplate.sql @@ -24,43 +24,43 @@ VALUES ( '3','发布话题', '对小组内话题进行15字以上评论','publish_one_topic', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '4','参与话题', '楼院小组内通过我有话说功能发布话题','participate_one_topic', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 6,'每天上限为6分',null,'day',2,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '5','话题被转为议题', '小组中发布的话题被组长转为议题','topic_shifted_to_issue', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 0,'无上限',null,'day',15,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '6','话题被转为项目', '小组中发布的话题被组长转为议题 又被网格员转为项目','topic_shifted_to_project', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '7','转话题为议题', '将自建小组中话题转为议题','shift_topic_to_issue', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 15,'每天上限为15分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '8','邀请新人入组', '通过话题/议题分享链接邀请新用户入组,需注册居民成功入组方能获得','invite_new_resident_into_group', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 0,'无上限',null,'day',30,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ), ( '9','邀请入组', '通过话题/议题分享链接邀请已注册用户入组,需通过入组审核方能获得','invite_resident_into_group', - '43addd0735230c01eedbb38d721076b0','plus', + '1','plus', 25,'每天上限为25分',null,'day',5,'time','0','0',0,'APP_USER',now(),'APP_USER',now() ) From 490fc0c970a74ee2d9276f65d7cfa9372ffab678 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 23 Dec 2020 18:03:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/mybatis/service/BaseService.java | 2 + .../dto/topic/TopicDraftAttachmentDTO.java | 2 + .../topic/dao/TopicDraftScanTaskDao.java | 2 +- .../entity/TopicDraftAttachmentEntity.java | 2 + .../service/TopicDraftScanTaskService.java | 2 + .../impl/TopicDraftAttachmentServiceImpl.java | 1 + .../impl/TopicDraftScanTaskServiceImpl.java | 6 + .../service/impl/TopicDraftServiceImpl.java | 206 +++++++++++++++--- .../db/migration/V0.0.11__topicShare.sql | 6 +- .../mapper/topic/TopicDraftScanTaskDao.xml | 5 + 10 files changed, 200 insertions(+), 34 deletions(-) diff --git a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java index a42cd2ca84..c82dce8253 100644 --- a/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java +++ b/epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/service/BaseService.java @@ -122,4 +122,6 @@ public interface BaseService { * @param idList 主键ID列表 */ boolean deleteBatchIds(Collection idList); + + } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java index d6e3337904..378f03ae8a 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/TopicDraftAttachmentDTO.java @@ -84,6 +84,8 @@ public class TopicDraftAttachmentDTO implements Serializable { */ private String status; + private String reason; + /** * 语音或视频时长,秒 * */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.java index 7181ae4308..15be6e2e7c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/TopicDraftScanTaskDao.java @@ -29,5 +29,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface TopicDraftScanTaskDao extends BaseDao { - + void updateByTask(TopicDraftScanTaskEntity entity); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicDraftAttachmentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicDraftAttachmentEntity.java index f29df3c174..343e362ec4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicDraftAttachmentEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/TopicDraftAttachmentEntity.java @@ -84,6 +84,8 @@ public class TopicDraftAttachmentEntity extends BaseEpmetEntity { */ private String status; + private String reason; + /** * 语音或视频时长,秒 * */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicDraftScanTaskService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicDraftScanTaskService.java index 795b939b90..91ae43076d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicDraftScanTaskService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/TopicDraftScanTaskService.java @@ -92,4 +92,6 @@ public interface TopicDraftScanTaskService extends BaseService implements TopicDraftService { private static Logger logger = LoggerFactory.getLogger(TopicDraftServiceImpl.class); + private ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("TopicDraftService-pool-%d").build(); + private ExecutorService threadPool = new ThreadPoolExecutor(1, 1, + 1L, TimeUnit.MINUTES, + new LinkedBlockingQueue<>(500), namedThreadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + @Autowired private GovOrgOpenFeignClient govOrgOpenFeignClient; @@ -132,6 +141,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl page(Map params) { @@ -234,6 +249,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl imageDTOList = new ArrayList<>(); if(CollectionUtils.isNotEmpty(formDTO.getImageList())){ TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); int sort = 0; @@ -271,9 +287,14 @@ public class TopicDraftServiceImpl extends BaseServiceImpl voiceDTOList = new ArrayList<>(); if(CollectionUtils.isNotEmpty(formDTO.getVideoList())){ TopicDraftAttachmentDTO attachment = new TopicDraftAttachmentDTO(); int sort = 0; @@ -283,8 +304,13 @@ public class TopicDraftServiceImpl extends BaseServiceImpl { - ImgTaskDTO task = new ImgTaskDTO(); - task.setDataId(UUID.randomUUID().toString().replace("-", "")); - task.setUrl(url); - imgScanParamDTO.getTasks().add(task); - }); + imgScanParamDTO.setTasks(imageDTOList); Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); if (!imgScanResult.success()){ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); @@ -345,7 +366,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl { + TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); + dto.setId(item); + dto.setStatus(TopicConstant.AUTO_PASSED); + topicDraftAttachmentService.update(dto); + }); + } + if(CollectionUtils.isNotEmpty(imgScanResult.getData().getFailDataIds())) { + imgScanResult.getData().getFailDataIds().forEach(item -> { + TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); + dto.setId(item); + dto.setStatus(TopicConstant.BLOCK); + dto.setReason("图片存在违规内容"); + topicDraftAttachmentService.update(dto); + }); + } } } - //TODO 创建话题语音审核 - if (CollectionUtils.isNotEmpty(formDTO.getVideoList())){ - ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); - formDTO.getVideoList().forEach(url -> { - ImgTaskDTO task = new ImgTaskDTO(); - task.setDataId(UUID.randomUUID().toString().replace("-", "")); - task.setUrl(url); - imgScanParamDTO.getTasks().add(task); - //TODO 根据返回值, - }); + //创建话题语音审核 + if (CollectionUtils.isNotEmpty(voiceDTOList)){ + VoiceScanParamDTO voiceScanParamDTO = new VoiceScanParamDTO(); + voiceScanParamDTO.setTasks(voiceDTOList); + voiceScanParamDTO.setOpenCallBack(false); + Result voiceScanResult = ScanContentUtils.voiceAsyncScan(scanApiUrl.concat(voiceAsyncScanMethod), voiceScanParamDTO); + if (!voiceScanResult.success() || !voiceScanResult.getData().isAllSuccess()){ + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + List taskList = voiceScanResult.getData().getSuccessTasks(); + List taskIds = taskList.stream().map(AsyncScanTaskDTO :: getTaskId).collect(Collectors.toList()); + //提交记录存入task表 + + List scanTaskEntityList = taskList.stream().map(item -> { + TopicDraftScanTaskEntity taskEntity = new TopicDraftScanTaskEntity(); + taskEntity.setCustomerId(formDTO.getCustomerId()); + taskEntity.setTopicDraftId(topic.getId()); + taskEntity.setTopicDraftAttachmentId(item.getDataId()); + taskEntity.setTaskId(item.getTaskId()); + taskEntity.setStatus(TopicConstant.AUDITING); + taskEntity.setAttachmentType(TopicConstant.VOICE); + return taskEntity; + }).collect(Collectors.toList()); + topicDraftScanTaskService.insertBatch(scanTaskEntityList); + + //轮询 + threadPool.submit(() -> { + while (true) { + Result> voiceResults = ScanContentUtils.voiceResults(scanApiUrl.concat(voiceResultsMethod), taskIds); + if (voiceResults.success()) { + boolean isAllPass = true; + List list = voiceResults.getData(); + for (VoiceResultDTO item : list) { + if (TopicConstant.REVIEW.equals(item.getSuggestion())) { + //结果不确定 + TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); + dto.setId(item.getDataId()); + dto.setStatus(TopicConstant.REVIEW); + dto.setReason(item.getLabelDesc()); + topicDraftAttachmentService.update(dto); + + TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); + taskDTO.setTaskId(item.getTaskId()); + taskDTO.setStatus(TopicConstant.REVIEW); + topicDraftScanTaskService.updateByTask(taskDTO); + isAllPass = false; + } else if (TopicConstant.BLOCK.equals(item.getSuggestion())) { + //结果违规 + TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); + dto.setId(item.getDataId()); + dto.setStatus(TopicConstant.BLOCK); + dto.setReason(item.getLabelDesc()); + topicDraftAttachmentService.update(dto); + + TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); + taskDTO.setTaskId(item.getTaskId()); + taskDTO.setStatus(TopicConstant.BLOCK); + topicDraftScanTaskService.updateByTask(taskDTO); + isAllPass = false; + } else { + //审核通过 + TopicDraftAttachmentDTO dto = new TopicDraftAttachmentDTO(); + dto.setId(item.getDataId()); + dto.setStatus(TopicConstant.AUTO_PASSED); + dto.setReason(item.getLabelDesc()); + topicDraftAttachmentService.update(dto); + + TopicDraftScanTaskDTO taskDTO = new TopicDraftScanTaskDTO(); + taskDTO.setTaskId(item.getTaskId()); + taskDTO.setStatus(TopicConstant.AUTO_PASSED); + topicDraftScanTaskService.updateByTask(taskDTO); + } + //审核通过,发布话题 + if(isAllPass) { + saveTopic(tokenDto, formDTO, topic.getId()); + } + } + break; + } + try { + Thread.sleep(600000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }); + + } } else { - //TODO 话题草稿状态为 auto_passed: 自动通过 + //话题草稿状态为 auto_passed: 自动通过 //更新话题状态block TopicDraftEntity draftEntity = new TopicDraftEntity(); draftEntity.setId(topic.getId()); @@ -512,6 +628,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl item.setStatus(TopicConstant.APPROVED)); topicDraftAttachmentService.updateBatchById(ConvertUtils.sourceToTarget(voiceList, TopicDraftAttachmentEntity.class)); } + //发送积分 + sendMqMsg(draft.getCreatedBy(), draft.getCustomerId()); } //记录操作记录 TopicDraftOperationDTO operationDTO = new TopicDraftOperationDTO(); @@ -605,6 +723,30 @@ public class TopicDraftServiceImpl extends BaseServiceImpl actPointEventMsgList=new ArrayList<>(); + BasePointEventMsg actPointEventMsg=new BasePointEventMsg(); + actPointEventMsg.setCustomerId(customerId); + actPointEventMsg.setUserId(userId); + actPointEventMsg.setActionFlag(MqConstant.PLUS); + actPointEventMsg.setIsCommon(false); + actPointEventMsgList.add(actPointEventMsg); + + mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList)); + Result mqResult = SendMqMsgUtils.sendMsg(mqBaseMsgDTO); + if(!mqResult.success()){ + logger.error("发表话题积分添加失败"); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.11__topicShare.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.11__topicShare.sql index 7fef4d7c45..6e69f29d81 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.11__topicShare.sql +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.11__topicShare.sql @@ -37,4 +37,8 @@ CREATE TABLE `topic_share_link_visit_record` `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='话题分享链接访问记录表'; \ No newline at end of file + DEFAULT CHARSET = utf8mb4 COMMENT ='话题分享链接访问记录表'; + + +ALTER TABLE `topic_draft_attachment` + ADD COLUMN `REASON` varchar(255) NULL COMMENT '失败原因' AFTER `STATUS`; \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicDraftScanTaskDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicDraftScanTaskDao.xml index 1623b9f5a1..83c0305ab6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicDraftScanTaskDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/TopicDraftScanTaskDao.xml @@ -18,6 +18,11 @@ + + update topic_draft_scan_task set + `STATUS` = #{status} + WHERE TASK_ID = #{taskId} + \ No newline at end of file From eb863ab50321a968481f630a1e23a702803965ab Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 24 Dec 2020 14:18:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/topic/form/CreateTopicFormDTO.java | 8 ++--- .../resi/group/dto/topic/form/FileDTO.java | 24 +++++++++++++ .../service/impl/TopicDraftServiceImpl.java | 36 +++++++++++++------ 3 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/FileDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java index a53a8f36db..9369470945 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CreateTopicFormDTO.java @@ -62,17 +62,17 @@ public class CreateTopicFormDTO implements Serializable { /** * 图片附件 */ - private List imageList; + private List imageList; /** * 文件附件 */ - private List docList; + private List docList; /** * 语音附件 */ - private List voiceList; + private List voiceList; /** * 视频附件 */ - private List videoList; + private List videoList; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/FileDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/FileDTO.java new file mode 100644 index 0000000000..eb187299e0 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/FileDTO.java @@ -0,0 +1,24 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/24 14:09 + */ +@NoArgsConstructor +@Data +public class FileDTO 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; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java index bbe765d0de..098c05e3b1 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java @@ -279,18 +279,18 @@ public class TopicDraftServiceImpl extends BaseServiceImpl