提交 c1f67b79 编写于 作者: O o2sword

内容管理消息发送条件修改

上级 cbded4b7
......@@ -5,8 +5,10 @@ import com.x.base.core.entity.JpaObject;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.bean.WrapCopier;
import com.x.base.core.project.bean.WrapCopierFactory;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.message.MessageConnector;
import com.x.base.core.project.queue.AbstractQueue;
import com.x.base.core.project.tools.ListTools;
import com.x.cms.assemble.control.MessageFactory;
......@@ -40,7 +42,7 @@ public class QueueSendDocumentNotify extends AbstractQueue<String> {
Document document = null;
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
document = emc.find(documentId, Document.class);
if(document !=null && StringUtils.equals( "信息" , document.getDocumentType())) {
if(document !=null && StringUtils.equals( "信息" , document.getDocumentType()) && Config.messages().get(MessageConnector.TYPE_CMS_PUBLISH)!=null) {
logger.debug("send publish notify for new document:" + document.getTitle() );
AppInfo appInfo = emc.find(document.getAppId(), AppInfo.class);
CategoryInfo category = emc.find(document.getCategoryId(), CategoryInfo.class);
......@@ -90,7 +92,8 @@ public class QueueSendDocumentNotify extends AbstractQueue<String> {
}
logger.debug(documentId +" cms send total count:" + persons.size() );
}
if(StringUtils.isNotBlank(document.getCreatorPerson())){
if(document!=null && StringUtils.equals( "信息" , document.getDocumentType())
&& StringUtils.isNotBlank(document.getCreatorPerson())){
MessageWo wo = MessageWo.copier.copy(document);
MessageFactory.cms_publish_creator(wo);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册