|
@@ -1,5 +1,6 @@
|
|
|
package com.simuwang.manage.service.impl;
|
|
|
|
|
|
+import com.simuwang.base.common.enums.OpenStatusType;
|
|
|
import com.simuwang.base.mapper.CompanyEmailConfigMapper;
|
|
|
import com.simuwang.base.pojo.dos.CompanyEmailConfigDO;
|
|
|
import com.simuwang.base.pojo.vo.CompanyEmailConfigVO;
|
|
@@ -7,6 +8,7 @@ import com.simuwang.manage.service.CompanyEmailConfigService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -65,4 +67,26 @@ public class CompanyEmailConfigServiceImpl implements CompanyEmailConfigService
|
|
|
companyEmailConfigMapper.updateCompanyEmailConfig(configDO);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void sendCompanyEmail(List<String> companyIdList) {
|
|
|
+ for(String companyId : companyIdList){
|
|
|
+ List<CompanyEmailConfigVO> configVOs = companyEmailConfigMapper.searchEmailConfig(companyId);
|
|
|
+ if(configVOs .size() > 0){
|
|
|
+ List<String> emailList = new ArrayList<>();
|
|
|
+ for(CompanyEmailConfigVO configVO : configVOs){
|
|
|
+ if(configVO.getOpenStatus().equals(OpenStatusType.YES.getCode())){
|
|
|
+ //获取开启的邮箱地址
|
|
|
+ emailList.add(configVO.getEmail());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //把缺失数据的邮件发送到该公司名下的邮箱地址
|
|
|
+ sendEmail(companyId,emailList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //邮件校验处理
|
|
|
+ private void sendEmail(String companyId, List<String> emailList) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|