master
james.zhao 6 years ago
parent bfb248a735
commit a40ea34bad

@ -17,7 +17,7 @@ public interface MailService {
String sendEmail(String title, String mailTos, String mailCcs, String content, List<JSONObject> attachFiles) throws URISyntaxException, IOException;
String sendRiskEmail(String title, String mailTos, String mailCcs, String content, List<JSONObject> attachFiles, int order_type) throws URISyntaxException, IOException;
String sendRiskEmail(String title, String mailTos, String mailCcs,String mailBcc, String content, List<JSONObject> attachFiles, int order_type) throws URISyntaxException, IOException;
List<JSONObject> checkEmailStatus(String emailId);

@ -248,9 +248,7 @@ public class MailServiceImp implements MailService {
Key aesKey = AESCrypt.fromKeyString(Base64.decodeBase64(settleAESKey));
String mailPwd = new String(AESCrypt.decrypt(Base64.decodeBase64(mailPwdEncrypted), aesKey), StandardCharsets.UTF_8);
noticeBean.setPassword(mailPwd);
if(attachFiles!=null){
noticeBean.setAttachFiles(attachFiles);
}
noticeBean.setAttachFiles(attachFiles);
String postUrl = mailHost + "/mail/single?" + generateMailSignParam();
HttpRequestResult result = null;
try {
@ -269,13 +267,14 @@ public class MailServiceImp implements MailService {
}
@Override
public String sendRiskEmail(String title, String mailTos, String mailCcs, String content, List<JSONObject> attachFiles, int order_type) throws URISyntaxException, IOException {
public String sendRiskEmail(String title, String mailTos, String mailCcs,String mailBcc, String content, List<JSONObject> attachFiles, int order_type) throws URISyntaxException, IOException {
NoticeBean noticeBean = new NoticeBean();
noticeBean.setTitle(title);
List<JSONObject> mailClients = new ArrayList<>();
JSONObject mailClient = new JSONObject();
mailClient.put("mailto", mailTos);
mailClient.put("mailcc", mailCcs);
mailClient.put("mailbcc", mailBcc);
mailClients.add(mailClient);
noticeBean.setMailClients(mailClients);
noticeBean.setContent(content);

@ -262,7 +262,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
royalThreadPoolExecutor.execute(() -> {
try {
String emailId = mailService.sendRiskEmail(title, emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, null,event.getIntValue("order_type"));
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type"));
event.put("email_status",1);
event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
event.put("submit_url",uploadUrl);
@ -349,7 +349,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
royalThreadPoolExecutor.execute(() -> {
try {
String emailId = mailService.sendRiskEmail("You need to resubmit risk materials", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, null,event.getIntValue("order_type"));
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type"));
event.put("email_status",2);
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
event.put("submit_url",uploadUrl);
@ -370,7 +370,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
royalThreadPoolExecutor.execute(() -> {
try {
String emailId = mailService.sendRiskEmail("Please submit risk materials as soon as possible", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, null,event.getIntValue("order_type"));
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","),"", content, null,event.getIntValue("order_type"));
event.put("email_status",3);
riskEventMapper.update(event);
} catch (Exception e) {

Loading…
Cancel
Save