|
@@ -21,15 +21,9 @@ import com.dragon.tj.portal.common.vo.notice.NoticeInfoParam;
|
|
import com.dragon.tj.portal.common.vo.notice.NoticeInfoVO;
|
|
import com.dragon.tj.portal.common.vo.notice.NoticeInfoVO;
|
|
import com.dragon.tj.portal.component.exception.message.MessageInfoException;
|
|
import com.dragon.tj.portal.component.exception.message.MessageInfoException;
|
|
import com.dragon.tj.portal.component.message.MessageProducer;
|
|
import com.dragon.tj.portal.component.message.MessageProducer;
|
|
-import com.dragon.tj.portal.entity.MessageInfo;
|
|
|
|
-import com.dragon.tj.portal.entity.MsgRecord;
|
|
|
|
-import com.dragon.tj.portal.entity.NoticeInfo;
|
|
|
|
-import com.dragon.tj.portal.entity.NoticeInfoScope;
|
|
|
|
|
|
+import com.dragon.tj.portal.entity.*;
|
|
import com.dragon.tj.portal.mapper.NoticeInfoMapper;
|
|
import com.dragon.tj.portal.mapper.NoticeInfoMapper;
|
|
-import com.dragon.tj.portal.service.MsgRecordService;
|
|
|
|
-import com.dragon.tj.portal.service.NoticeInfoScopeService;
|
|
|
|
-import com.dragon.tj.portal.service.NoticeInfoService;
|
|
|
|
-import com.dragon.tj.portal.service.SysUserMenuService;
|
|
|
|
|
|
+import com.dragon.tj.portal.service.*;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Sets;
|
|
import com.google.common.collect.Sets;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -42,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Objects;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -74,6 +69,9 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
|
|
@Autowired
|
|
@Autowired
|
|
private NoticeInfoVOConvert noticeInfoVOConvert;
|
|
private NoticeInfoVOConvert noticeInfoVOConvert;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private AppInfoService appInfoService;
|
|
|
|
+
|
|
@Value("${notice-secret:true}")
|
|
@Value("${notice-secret:true}")
|
|
private boolean noticeSecret;
|
|
private boolean noticeSecret;
|
|
|
|
|
|
@@ -136,6 +134,11 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
|
|
boolean isSend = false;
|
|
boolean isSend = false;
|
|
Integer messageType = noticeInfoReq.getMessageType();
|
|
Integer messageType = noticeInfoReq.getMessageType();
|
|
String scopeId = noticeInfoReq.getScopeId();
|
|
String scopeId = noticeInfoReq.getScopeId();
|
|
|
|
+ AppInfo appInfo = appInfoService.getOneByCode(noticeInfoReq.getScopeId());
|
|
|
|
+ if (Objects.isNull(appInfo)) {
|
|
|
|
+ throw new MessageInfoException(MessageInfoErrorEnums.Code.NOTICE_INFO_ERROR);
|
|
|
|
+ }
|
|
|
|
+ noticeInfoReq.setScopeName(appInfo.getSystemName());
|
|
Set<String> messageClientIds = this.getMessageClientIds(messageType, scopeId);
|
|
Set<String> messageClientIds = this.getMessageClientIds(messageType, scopeId);
|
|
log.info("transferIds-scopeId-{}-{}", scopeId, messageClientIds);
|
|
log.info("transferIds-scopeId-{}-{}", scopeId, messageClientIds);
|
|
if (CollUtil.isNotEmpty(messageClientIds)) {
|
|
if (CollUtil.isNotEmpty(messageClientIds)) {
|
|
@@ -203,8 +206,12 @@ public class NoticeInfoServiceImpl extends ServiceImpl<NoticeInfoMapper, NoticeI
|
|
|
|
|
|
NoticeInfo noticeInfo = noticeReqConvert.reqToInfo(noticeInfoReq);
|
|
NoticeInfo noticeInfo = noticeReqConvert.reqToInfo(noticeInfoReq);
|
|
noticeInfo.setCreateBy(noticeInfoReq.getClientId());
|
|
noticeInfo.setCreateBy(noticeInfoReq.getClientId());
|
|
|
|
+ noticeInfo.setCreateUser(noticeInfoReq.getClientName());
|
|
noticeInfo.setCreateOrgCode(noticeInfoReq.getClientOrgCode());
|
|
noticeInfo.setCreateOrgCode(noticeInfoReq.getClientOrgCode());
|
|
noticeInfo.setCreateOrgName(noticeInfoReq.getClientOrgName());
|
|
noticeInfo.setCreateOrgName(noticeInfoReq.getClientOrgName());
|
|
|
|
+ noticeInfo.setScopeId(noticeInfoReq.getScopeId());
|
|
|
|
+ noticeInfo.setScopeUrl(noticeInfoReq.getScopeUrl());
|
|
|
|
+ noticeInfo.setScopeName(noticeInfoReq.getScopeName());
|
|
// 存储
|
|
// 存储
|
|
boolean isSaveBatchSuccess = false;
|
|
boolean isSaveBatchSuccess = false;
|
|
try {
|
|
try {
|