|
|
|
@@ -1,6 +1,7 @@ |
|
|
|
package com.iformall.service.msg.impl; |
|
|
|
|
|
|
|
import com.iformall.domain.po.WxMsgValidationcodeModel; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.msg.BaseMsg; |
|
|
|
import com.iformall.domain.po.msg.MailMsg; |
|
|
|
import com.iformall.enums.EnumMsgOpen; |
|
|
|
@@ -9,6 +10,7 @@ import com.iformall.mapper.WxMsgValidationcodeModelMapper; |
|
|
|
import com.iformall.service.msg.MsgSendService; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.flowable.task.service.impl.persistence.entity.TaskEntity; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -44,10 +46,12 @@ public class SendEmailServiceImpl implements MsgSendService { |
|
|
|
@Override |
|
|
|
public void send(BaseMsg baseMsg) throws Exception{ |
|
|
|
MailMsg mailMsg = (MailMsg)baseMsg; |
|
|
|
|
|
|
|
TenantEntity tenantEntity = mailMsg.getTenantInfo(); |
|
|
|
//根据模板替换动态内容 |
|
|
|
if(mailMsg.getModelId() != null){ |
|
|
|
WxMsgValidationcodeModel msgModel = new WxMsgValidationcodeModel(); |
|
|
|
msgModel.setTenantId(mailMsg.getTenantId()); |
|
|
|
msgModel.updateTenantInfo(tenantEntity); |
|
|
|
msgModel.setType(mailMsg.getModelType()); |
|
|
|
msgModel.setModelId(mailMsg.getModelId()); |
|
|
|
msgModel.setOpen(EnumMsgOpen.OPEN.getCode()); |
|
|
|
|