|
|
@ -40,8 +40,10 @@ import com.epmet.commons.tools.utils.*; |
|
|
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.modules.group.dao.GroupMessageDao; |
|
|
|
import com.epmet.modules.group.dao.ResiGroupDao; |
|
|
|
import com.epmet.modules.group.dao.ResiGroupStatisticalDao; |
|
|
|
import com.epmet.modules.group.entity.GroupMessageEntity; |
|
|
|
import com.epmet.modules.group.entity.ResiGroupEntity; |
|
|
|
import com.epmet.modules.group.entity.ResiGroupStatisticalEntity; |
|
|
|
import com.epmet.modules.group.redis.ResiGroupRedis; |
|
|
@ -105,37 +107,26 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
private ExecutorService threadPool = new ThreadPoolExecutor(1, 1, |
|
|
|
1L, TimeUnit.MINUTES, |
|
|
|
new LinkedBlockingQueue<>(500), namedThreadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiGroupMemberService resiGroupMemberService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiTopicAttachmentDao resiTopicAttachmentDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiTopicOperationDao resiTopicOperationDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EpmetUserFeignClient epmetUserFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiGroupDao resiGroupDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiGroupMemberDao resiGroupMemberDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiGroupStatisticalDao resiGroupStatisticalDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiTopicDao resiTopicDao; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ResiGroupRedis resiGroupRedis; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private TopicDraftAttachmentService topicDraftAttachmentService; |
|
|
|
@Autowired |
|
|
@ -155,6 +146,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
private String voiceAsyncScanMethod; |
|
|
|
@Value("${openapi.scan.method.voiceResults}") |
|
|
|
private String voiceResultsMethod; |
|
|
|
@Autowired |
|
|
|
private GroupMessageDao groupMessageDao; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<TopicDraftDTO> page(Map<String, Object> params) { |
|
|
@ -778,6 +771,19 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
breviary.append("话题"); |
|
|
|
} |
|
|
|
sendMqMsg(draft.getCreatedBy(), draft.getCustomerId(),draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),breviary.toString()); |
|
|
|
|
|
|
|
//2021.4.22 start sun 因业务调整,新增组内消息记录表,新增话题时相应的初始数据
|
|
|
|
GroupMessageEntity messageEntity = new GroupMessageEntity(); |
|
|
|
messageEntity.setCustomerId(draft.getCustomerId()); |
|
|
|
messageEntity.setGridId(draft.getGridId()); |
|
|
|
messageEntity.setGroupId(draft.getGroupId()); |
|
|
|
messageEntity.setType("topic"); |
|
|
|
messageEntity.setMessageId(resiTopic.getId()); |
|
|
|
messageEntity.setPublishUserId(resiTopic.getCreatedBy()); |
|
|
|
messageEntity.setStatus(TopicConstant.PUBLISHMENT); |
|
|
|
messageEntity.setOperateTime(null == resiTopic.getCreatedTime() ? new Date() : resiTopic.getCreatedTime()); |
|
|
|
groupMessageDao.insert(messageEntity); |
|
|
|
//2021.4.22 end sun
|
|
|
|
} |
|
|
|
//记录操作记录
|
|
|
|
entity = baseDao.selectById(formDTO.getTopicDraftId()); |
|
|
@ -899,13 +905,28 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD |
|
|
|
TopicDraftEntity draft = baseDao.selectById(draftId); |
|
|
|
StringBuilder breviary = new StringBuilder(); |
|
|
|
String content = CharMatcher.WHITESPACE.trimFrom(draft.getTopicContent()); |
|
|
|
if(!StringUtils.isBlank(content) && !StringUtils.equals("语音话题",content)){ |
|
|
|
if (!StringUtils.isBlank(content) && !StringUtils.equals("语音话题", content)) { |
|
|
|
breviary.append("话题\""); |
|
|
|
breviary.append(content.length() > NumConstant.TEN ? (content.substring(NumConstant.ZERO,NumConstant.TEN) + "…") : content); |
|
|
|
breviary.append(content.length() > NumConstant.TEN ? (content.substring(NumConstant.ZERO, NumConstant.TEN) + "…") : content); |
|
|
|
breviary.append("\""); |
|
|
|
}else breviary.append("语音话题"); |
|
|
|
} else { |
|
|
|
breviary.append("语音话题"); |
|
|
|
} |
|
|
|
sendMqMsg(tokenDto.getUserId(), formDTO.getCustomerId(),draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),breviary.toString()); |
|
|
|
|
|
|
|
//2021.4.22 start sun 因业务调整,新增组内消息记录表,新增话题时相应的初始数据
|
|
|
|
GroupMessageEntity messageEntity = new GroupMessageEntity(); |
|
|
|
messageEntity.setCustomerId(formDTO.getCustomerId()); |
|
|
|
messageEntity.setGridId(formDTO.getGridId()); |
|
|
|
messageEntity.setGroupId(formDTO.getGroupId()); |
|
|
|
messageEntity.setType("topic"); |
|
|
|
messageEntity.setMessageId(topic.getId()); |
|
|
|
messageEntity.setPublishUserId(topic.getCreatedBy()); |
|
|
|
messageEntity.setStatus(TopicConstant.PUBLISHMENT); |
|
|
|
messageEntity.setOperateTime(null == topic.getCreatedTime() ? currentTime : topic.getCreatedTime()); |
|
|
|
groupMessageDao.insert(messageEntity); |
|
|
|
//2021.4.22 end sun
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|