diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/entity/TopicEntity.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/entity/TopicEntity.java index 9789292..d546baa 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/entity/TopicEntity.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/entity/TopicEntity.java @@ -75,6 +75,11 @@ public class TopicEntity extends BaseEpdcEntity { */ private String itemId; + /** + * 社群类别 0:党员群,1:自建群 + */ + private String groupCategory; + // /** // * 区 // */ diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/service/impl/TopicServiceImpl.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/service/impl/TopicServiceImpl.java index e6944dd..f89f569 100644 --- a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/service/impl/TopicServiceImpl.java +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/topic/service/impl/TopicServiceImpl.java @@ -29,6 +29,7 @@ import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.comment.EpdcCommentsAndAttitudeFromTopicFormDTO; import com.elink.esua.epdc.dto.comment.EventCommentDTO; import com.elink.esua.epdc.dto.comment.EventCommentUserAttitudeDTO; +import com.elink.esua.epdc.dto.constant.GroupConstant; import com.elink.esua.epdc.dto.constant.GroupNoticeConstant; import com.elink.esua.epdc.dto.constant.TopicImageConstant; import com.elink.esua.epdc.dto.enums.GroupStateEnum; @@ -123,11 +124,11 @@ public class TopicServiceImpl extends BaseServiceImpl imp @Override public List list(Map params) { - return baseDao.selectListTopic(params); + return baseDao.selectListTopic(params); } - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); @@ -145,6 +146,7 @@ public class TopicServiceImpl extends BaseServiceImpl imp @Transactional(rollbackFor = Exception.class) public void save(TopicDTO dto) { TopicEntity entity = ConvertUtils.sourceToTarget(dto, TopicEntity.class); + entity.setGroupCategory(GroupConstant.PROPERTY_GROUP_CATEGORY); insert(entity); } @@ -171,13 +173,14 @@ public class TopicServiceImpl extends BaseServiceImpl imp @Transactional(rollbackFor = Exception.class) public Result saveTopic(TopicSubmitFormDTO formDto) { TopicEntity entity = ConvertUtils.sourceToTarget(formDto, TopicEntity.class); + entity.setGroupCategory(GroupConstant.PROPERTY_GROUP_CATEGORY); if (insert(entity)) { // 保存图片 topicImgService.saveImages(formDto.getImages(), entity.getId(), TopicImageConstant.TYPE_IMAGE_BIZ_TOPIC); // 记录社群用户未读记录 List groupUsers = userGroupService.listOfUserGroup(formDto.getGroupId(), GroupUserStateEnum.GROUP_USER_STATE_EXAMINATION_PASSED.getValue()); List readEntities = new ArrayList<>(groupUsers.size()); - for (GroupUserListResultDTO userDto: + for (GroupUserListResultDTO userDto : groupUsers) { if (!formDto.getUserId().equals(userDto.getUserId())) { GroupTopicUserReadEntity readEntity = new GroupTopicUserReadEntity(); @@ -258,7 +261,7 @@ public class TopicServiceImpl extends BaseServiceImpl imp informationFormDTO.setBusinessId(topicDto.getId()); informationFormDTO.setUserId(topicDto.getUserId()); informationFormDTO.setBusinessType(GroupNoticeConstant.NOTICE_BUSINESS_TYPE_GROUP_TOPIC_CLOSED); - informationFormDTO.setRelBusinessContent("关闭原因:"+formDto.getProcessingOpinions()); + informationFormDTO.setRelBusinessContent("关闭原因:" + formDto.getProcessingOpinions()); // 发送通知 newsTask.insertUserInformation(informationFormDTO); @@ -386,7 +389,7 @@ public class TopicServiceImpl extends BaseServiceImpl imp noticeList.add(lordNotice); topicAuditRecordService.insert(auditRecordEntity); // 发送消息 - for (EpdcInformationFormDTO information: + for (EpdcInformationFormDTO information : noticeList) { newsTask.insertUserInformation(information); } @@ -400,11 +403,10 @@ public class TopicServiceImpl extends BaseServiceImpl imp } /** - * * 话题转议题校验 * - * @params [topicDto, userId] * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [topicDto, userId] * @author liuchuang * @since 2019/11/8 11:16 */ @@ -433,11 +435,10 @@ public class TopicServiceImpl extends BaseServiceImpl imp } /** - * * 拷贝评论、评论的支持反对到事件 * - * @params [formDto] * @return void + * @params [formDto] * @author liuchuang * @since 2019/11/13 11:18 */ @@ -454,11 +455,10 @@ public class TopicServiceImpl extends BaseServiceImpl imp } /** - * * 发送消息 * - * @params [issueId, userId] * @return void + * @params [issueId, userId] * @author liuchuang * @since 2019/11/26 15:04 */ @@ -491,17 +491,16 @@ public class TopicServiceImpl extends BaseServiceImpl imp } /** - * * 组织机构信息处理 * - * @params [dto, topicList] * @return java.util.List + * @params [dto, topicList] * @author liuchuang * @since 2020/3/7 2:14 */ private List handleOrganizationInfo(OrganizationModifyDTO dto, List topicList) { List entities = new ArrayList<>(); - for (TopicDTO topic: topicList) { + for (TopicDTO topic : topicList) { TopicEntity entity = new TopicEntity(); if (StringUtils.isNotEmpty(topic.getParentDeptIds()) && StringUtils.isNotEmpty(topic.getParentDeptNames())) { List parentDeptIds = Arrays.asList(topic.getParentDeptIds().split(","));