Merge branch 'develop' into clientApply

master
eason.qian 7 years ago
commit 0851f793a0

@ -16,11 +16,6 @@
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>tools</artifactId> <artifactId>tools</artifactId>
</dependency> </dependency>
<dependency>
<groupId>cn.yixblog</groupId>
<artifactId>yixblog-platform</artifactId>
<version>1.2.0</version>
</dependency>
<dependency> <dependency>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-core</artifactId> <artifactId>payment-core</artifactId>

@ -493,3 +493,16 @@ CREATE TABLE `pmt_directed_bill_code` (
ALTER TABLE `act_red_packets_customer` ADD COLUMN `rule_max_num_limit` tinyint(1) DEFAULT 1 COMMENT '0:Whole Activity,1day' ALTER TABLE `act_red_packets_customer` ADD COLUMN `rule_max_num_limit` tinyint(1) DEFAULT 1 COMMENT '0:Whole Activity,1day'
CREATE TABLE `sys_mail_send` (
`id` int(11) NOT NULL,
`mail_address` varchar(100) NOT NULL COMMENT '邮箱地址',
`cc_mail_address` varchar(100) NOT NULL COMMENT '邮箱地址',
`message_id` varchar(60) NOT NULL COMMENT 'Mailgun Message id',
`status` int(9) NOT NULL DEFAULT 0,
`create_time` datetime not null DEFAULT now(),
`title` varchar(50) NOT NULL comment '邮件标题',
PRIMARY KEY (`id`,`mail_address`),
KEY `mail_address` (`mail_address`),
KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

@ -0,0 +1,24 @@
package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
/**
* Create by yixian at 2017-12-13 19:10
*/
@AutoMapper(tablename = "sys_mail_send", pkName = "id")
public interface MailSendMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject record);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject record);
@AutoSql(type = SqlType.SELECT)
JSONObject find(String emailId, String contact_email);
}

@ -71,6 +71,8 @@ public interface ClientManager {
void checkEmailStatus(); void checkEmailStatus();
void newCheckEmailStatus();
@Transactional @Transactional
void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow); void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow);

@ -29,6 +29,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper; import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper; import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper;
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper; import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper; import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper; import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
@ -69,6 +70,7 @@ import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider; import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.manage.system.core.ClientContractService; import au.com.royalpay.payment.manage.system.core.ClientContractService;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
@ -83,6 +85,7 @@ import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.exceptions.event.WechatExceptionEvent; import au.com.royalpay.payment.tools.exceptions.event.WechatExceptionEvent;
import au.com.royalpay.payment.tools.locale.LocaleSupport; import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.mail.SendMail;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO; import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
@ -145,13 +148,16 @@ import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
@ -260,6 +266,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private ClientInfoCacheSupport clientInfoCacheSupport; private ClientInfoCacheSupport clientInfoCacheSupport;
@Resource @Resource
private MongoTemplate mongoTemplate; private MongoTemplate mongoTemplate;
@Resource
private MailGunService mailGunService;
@Resource
private MailSendMapper mailSendMapper;
private static final String SOURCE_AGREE_FILE = "source_agree_file"; private static final String SOURCE_AGREE_FILE = "source_agree_file";
private static final String CLIENT_BANK_FILE = "client_bank_file"; private static final String CLIENT_BANK_FILE = "client_bank_file";
@ -267,6 +277,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private static final String CLIENT_AGREE_FILE = "client_agree_file"; private static final String CLIENT_AGREE_FILE = "client_agree_file";
private static final String CLIENT_COMPANY_FILE = "client_company_file"; private static final String CLIENT_COMPANY_FILE = "client_company_file";
private static final String CLIENT_APPLY_FILE = "client_apply_file"; private static final String CLIENT_APPLY_FILE = "client_apply_file";
private static final List<String> tags = new ArrayList<>();
@Value("${app.agreetemplate.classic.path}") @Value("${app.agreetemplate.classic.path}")
private String agreetemplatePdfPath; private String agreetemplatePdfPath;
@ -276,6 +287,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private MpWechatApiProvider mpWechatApiProvider; private MpWechatApiProvider mpWechatApiProvider;
@PostConstruct
public void init(){
tags.add("account");
}
@Override @Override
public JSONObject getSysRateConfig() { public JSONObject getSysRateConfig() {
String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates"); String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates");
@ -572,6 +588,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientApplyMapper.updatePartnerApplication(apply); clientApplyMapper.updatePartnerApplication(apply);
} }
} }
try {
mailGunService.addClientToMailList(partner);
}catch (Exception e){
logger.error("邮件列表添加成员失败",e);
}
return partner; return partner;
} }
@ -607,6 +628,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
clientMapper.update(updateInfo); clientMapper.update(updateInfo);
if(client.getString("contact_email").equals(updateInfo.getString("contact_email"))){
mailGunService.updateClientOfMailList(updateInfo,client);
}
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
} }
@ -712,6 +736,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client) { private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client) {
if(StringUtils.isEmpty(client.getString("sub_merchant_id"))){
throw new BadRequestException("Sub Merchant ID Can't be null ");
}
String username = clientMoniker + client.getString("sub_merchant_id"); String username = clientMoniker + client.getString("sub_merchant_id");
boolean duplicated = true; boolean duplicated = true;
String pwd = RandomStringUtils.random(8, true, true); String pwd = RandomStringUtils.random(8, true, true);
@ -790,7 +817,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (StringUtils.isEmpty(mailTo)) { if (StringUtils.isEmpty(mailTo)) {
throw new EmailException("Client Contact Email is invalid"); throw new EmailException("Client Contact Email is invalid");
} }
final List<String> emails = new ArrayList<>(); final Set<String> emails = new HashSet<>();
for (JSONObject bd : bds) { for (JSONObject bd : bds) {
String email = bd.getString("email"); String email = bd.getString("email");
if (StringUtils.isNotEmpty(email)) { if (StringUtils.isNotEmpty(email)) {
@ -801,9 +828,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override @Override
public void run() { public void run() {
try { try {
String emailId = mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", mailTo, SendMail sendMail = new SendMail();
emails.isEmpty() ? "" : StringUtils.join(emails, ","), content); Set<String> to = new HashSet<>();
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, emailId)); to.add(mailTo);
sendMail.setFrom("info@mail.royalpay.com.au");
sendMail.setMailTos(to);
sendMail.setMailCcs(emails);
sendMail.setTitle("Your RoyalPay Cross-border Payment has been set up");
sendMail.setContent(content);
sendMail.setTags(tags);
JSONObject mailResult = mailGunService.sendMail(sendMail);
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, mailResult.getString("mail_id")));
} catch (Exception e) { } catch (Exception e) {
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 0, null)); clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 0, null));
throw new EmailException("Email Sending Failed", e); throw new EmailException("Email Sending Failed", e);
@ -837,7 +872,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date()); List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
final List<String> emails = new ArrayList<>(); final Set<String> emails = new HashSet<>();
for (JSONObject bd : bds) { for (JSONObject bd : bds) {
String email = bd.getString("email"); String email = bd.getString("email");
if (StringUtils.isNotEmpty(email)) { if (StringUtils.isNotEmpty(email)) {
@ -848,9 +883,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override @Override
public void run() { public void run() {
try { try {
String emailId = mailService.sendEmail("Your Partner Account Has Been Authenticated Successfully", mailTo, SendMail sendMail = new SendMail();
emails.isEmpty() ? "" : StringUtils.join(emails, ","), content); Set<String> to = new HashSet<>();
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, emailId)); to.add(mailTo);
sendMail.setMailTos(to);
sendMail.setFrom("info@mail.royalpay.com.au");
sendMail.setMailCcs(emails);
sendMail.setTitle("Your Partner Account Has Been Authenticated Successfully");
sendMail.setContent(content);
sendMail.setTags(tags);
JSONObject mailResult = mailGunService.sendMail(sendMail);
clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, mailResult.getString("mail_id")));
} catch (Exception e) { } catch (Exception e) {
throw new EmailException("Email Sending Failed", e); throw new EmailException("Email Sending Failed", e);
} }
@ -907,6 +950,37 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
public void newCheckEmailStatus() {
List<JSONObject> clients = clientMapper.listClientsWithEmailNotVerify();
for (JSONObject client : clients) {
try {
String emailId = client.getString("approve_email_id");
JSONObject status = mailSendMapper.find(emailId,client.getString("contact_email"));
if (status!=null) {
int statusNo = status.getIntValue("status");
logger.debug("get mail status:" + emailId + "--" + statusNo);
int mailStatus = 3;
switch (statusNo) {
case 1:
mailStatus = 1;
break;
case 2:
mailStatus = 2;
break;
}
updateClientApproveEmailStatus(mailStatus, null, client.getString("client_moniker"));
} else {
logger.debug("get mail status:" + emailId + "-- none");
// updateClientApproveEmailStatus(client.getIntValue("client_id"), 0);
}
} catch (Exception e) {
logger.error("check email status failed", e);
}
}
}
@Override @Override
public void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow) { public void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -3,15 +3,13 @@ package au.com.royalpay.payment.manage.notice.core.impls;
import au.com.royalpay.payment.manage.notice.beans.NoticeBean; import au.com.royalpay.payment.manage.notice.beans.NoticeBean;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
@ -27,6 +25,9 @@ import java.net.URISyntaxException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
/** /**
* Created by yishuqian on 18/01/2017. * Created by yishuqian on 18/01/2017.
*/ */
@ -97,6 +98,12 @@ public class MailServiceImp implements MailService {
noticeBean.setSenderAddress("info@royalpay.com.au"); noticeBean.setSenderAddress("info@royalpay.com.au");
noticeBean.setPassword("Vaba6439"); noticeBean.setPassword("Vaba6439");
String postUrl = mailHost + "/mail?" + generateMailSignParam(); String postUrl = mailHost + "/mail?" + generateMailSignParam();
HttpRequestResult result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).execute(); HttpRequestResult result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).execute();
if (result.isSuccess()) { if (result.isSuccess()) {
String mail_id = result.getResponseContentJSONObj().getString("mail_id"); String mail_id = result.getResponseContentJSONObj().getString("mail_id");

@ -10,6 +10,7 @@ import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
import au.com.royalpay.payment.manage.notice.beans.NoticeQuery; import au.com.royalpay.payment.manage.notice.beans.NoticeQuery;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.notice.core.NoticeManage; import au.com.royalpay.payment.manage.notice.core.NoticeManage;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -29,7 +30,9 @@ import java.io.IOException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -50,6 +53,8 @@ public class NoticeManageImpl implements NoticeManage {
@Resource @Resource
private MailService mailService; private MailService mailService;
@Resource @Resource
private MailGunService mailGunService;
@Resource
private RetailAppService retailAppService; private RetailAppService retailAppService;
@Resource @Resource
private NotifyErrorLogMapper notifyErrorLogMapper; private NotifyErrorLogMapper notifyErrorLogMapper;
@ -156,19 +161,13 @@ public class NoticeManageImpl implements NoticeManage {
if (info.getStatus() != null && info.getSend_clients() != null) { if (info.getStatus() != null && info.getSend_clients() != null) {
if (info.getStatus().equals("1") && noticeInfo.getString("status").equals("0") && !info.getSend_clients().isEmpty()) { if (info.getStatus().equals("1") && noticeInfo.getString("status").equals("0") && !info.getSend_clients().isEmpty()) {
String client_monikers []=info.getSend_clients().split(","); String client_monikers []=info.getSend_clients().split(",");
List<JSONObject> mailto = new ArrayList<>(); Set<String> mailto = new HashSet<>();
ArrayList<String> mailboxs = new ArrayList<>(); ArrayList<String> mailboxs = new ArrayList<>();
for (String clientMoniker : client_monikers) { for (String clientMoniker : client_monikers) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
JSONObject c = new JSONObject();
c.put("create_time", date);
c.put("notice_id", noticeId);
c.put("client_id", client.getIntValue("client_id"));
noticePartnerMapper.save(c);
String contact_email = client.getString("contact_email"); String contact_email = client.getString("contact_email");
if (contact_email!=null && !mailboxs.contains(contact_email)){ if (contact_email!=null && !mailboxs.contains(contact_email)){
c.put("mailto",contact_email); mailto.add(contact_email);
mailto.add(c);
mailboxs.add(contact_email); mailboxs.add(contact_email);
} }
} }
@ -177,17 +176,13 @@ public class NoticeManageImpl implements NoticeManage {
if (info.isIs_tomail_cc_stockholder()){ if (info.isIs_tomail_cc_stockholder()){
String stockholder_mails_mailto [] = stockholder_mails.trim().split(","); String stockholder_mails_mailto [] = stockholder_mails.trim().split(",");
for (String stockholder_mailto:stockholder_mails_mailto){ for (String stockholder_mailto:stockholder_mails_mailto){
JSONObject stockholder = new JSONObject(); mailto.add(stockholder_mailto);
stockholder.put("mailto",stockholder_mailto);
stockholder.put("client_id",0);
mailto.add(stockholder);
} }
} }
try { try {
logger.info(noticeId+"|"+info.getTitle()+"|"+mailto); logger.info(noticeId+"|"+info.getTitle()+"|"+mailto);
JSONObject mailResult = mailGunService.sendEmail(noticeId,info.getTitle(),mailto,info.getContent());
String mail_id = mailService.sendEmail(noticeId,info.getTitle(),mailto,info.getContent()); notice.put("mail_id",mailResult.getString("mail_id"));
notice.put("mail_id",mail_id);
noticeManageMapper.updateNotice(notice); noticeManageMapper.updateNotice(notice);
} catch (URISyntaxException | IOException e) { } catch (URISyntaxException | IOException e) {
e.printStackTrace(); e.printStackTrace();

@ -12,18 +12,21 @@ import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils; import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.annotation.Resource;
/** /**
* Create by yixian at 2018-03-20 17:44 * Create by yixian at 2018-03-20 17:44
*/ */

@ -9,18 +9,19 @@ import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService; import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean; import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.beans.LoginInfo; import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager; import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.manage.signin.events.ClientLoginEvent; import au.com.royalpay.payment.manage.signin.events.ClientLoginEvent;
import au.com.royalpay.payment.manage.signin.events.ManagerLoginEvent; import au.com.royalpay.payment.manage.signin.events.ManagerLoginEvent;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.RequestEnvironment; import au.com.royalpay.payment.tools.env.RequestEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.locale.LocaleSupport; import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.mail.SendMail;
import au.com.royalpay.payment.tools.utils.PasswordUtils; import au.com.royalpay.payment.tools.utils.PasswordUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -39,9 +40,12 @@ import org.thymeleaf.spring4.SpringTemplateEngine;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
@ -60,7 +64,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
@Resource @Resource
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
private MailService mailService; private MailGunService mailService;
@Resource @Resource
private PermissionManager permissionManager; private PermissionManager permissionManager;
@Resource @Resource
@ -72,7 +76,13 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
@Resource @Resource
private ClientConfigService clientConfigService; private ClientConfigService clientConfigService;
private ApplicationEventPublisher publisher; private ApplicationEventPublisher publisher;
private static final List<String> tags = new ArrayList<>();
@PostConstruct
public void init(){
tags.add("account");
}
@Override @Override
@Cacheable(value = ":login:managers:", key = "''+#accountId") @Cacheable(value = ":login:managers:", key = "''+#accountId")
public JSONObject getManager(String accountId) { public JSONObject getManager(String accountId) {
@ -306,12 +316,15 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
// final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/reset_password.vm", // final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/reset_password.vm",
// "utf-8", map); // "utf-8", map);
new Thread(() -> { SendMail sendMail = new SendMail();
try { Set<String> to = new HashSet<>();
mailService.sendEmail("Reset Password", contact_email, "", content); to.add(contact_email);
} catch (Exception ignored) { sendMail.setMailTos(to);
} sendMail.setFrom("info@mail.royalpay.com.au");
}).start(); sendMail.setTitle("Reset Password");
sendMail.setContent(content);
sendMail.setTags(tags);
mailService.sendMail(sendMail);
return contact_email; return contact_email;
@ -363,4 +376,5 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
account.put("is_password_expired", 0); account.put("is_password_expired", 0);
clientAccountMapper.update(account); clientAccountMapper.update(account);
} }
} }

@ -0,0 +1,26 @@
package au.com.royalpay.payment.manage.system.core;
import au.com.royalpay.payment.tools.mail.SendMail;
import com.alibaba.fastjson.JSONObject;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Set;
public interface MailGunService {
void dealNotify(String nofityString) throws Exception;
void dealDroppedNotify(String content) throws Exception;
JSONObject sendMail(SendMail sendMail);
JSONObject addClientToMailList(JSONObject client);
JSONObject updateClientOfMailList(JSONObject newClient,JSONObject oldClient);
JSONObject sendEmail(String notice_id, String title, Set<String> mailTo, String content) throws URISyntaxException, IOException ;
}

@ -0,0 +1,169 @@
package au.com.royalpay.payment.manage.system.core.impl;
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.mail.MailGunClient;
import au.com.royalpay.payment.tools.mail.SendMail;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
@Service
public class MailGunServiceImpl implements MailGunService {
Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private MailSendMapper mailSendMapper;
@Resource
private MailGunClient mailGunClient;
@Value("${mail.mailgun.default.merchantlist}")
private String mailListDefault;
@Resource
private AttachmentClient attachmentClient;
@Override
public void dealNotify(String nofityString) throws Exception {
String dd = URLDecoder.decode(nofityString, "UTF-8");
Map<String, String> mailgunNotify = getQueryMap(dd);
String myData = mailgunNotify.get("my-custom-data");
String recipient = mailgunNotify.get("recipient");
if (StringUtils.isNotEmpty(myData) && StringUtils.isNotEmpty(recipient)) {
JSONObject tmpJSONObject = JSONObject.parseObject(myData);
String[] mailAddresses = recipient.split(",");
for (String mailAddress : mailAddresses) {
JSONObject record = new JSONObject();
record.put("id", tmpJSONObject.getString("id"));
record.put("mail_address", mailAddress);
record.put("status", 1);
mailSendMapper.update(record);
}
}
}
@Override
public void dealDroppedNotify(String content) throws Exception {
String dd = URLDecoder.decode(content, "UTF-8");
Map<String, String> mailgunNotify = getQueryMap(dd);
String myData = mailgunNotify.get("my-custom-data");
String recipient = mailgunNotify.get("recipient");
if (StringUtils.isNotEmpty(myData) && StringUtils.isNotEmpty(recipient)) {
JSONObject tmpJSONObject = JSONObject.parseObject(myData);
String[] mailAddresses = recipient.split(",");
for (String mailAddress : mailAddresses) {
JSONObject record = new JSONObject();
record.put("id", tmpJSONObject.getString("id"));
record.put("mail_address", mailAddress);
record.put("status", 2);
mailSendMapper.update(record);
}
}
}
@Override
public JSONObject sendMail(SendMail sendMail) {
return mailGunClient.sendMail(sendMail);
}
@Override
public JSONObject addClientToMailList(JSONObject client) {
JSONObject result = null;
try {
JSONObject var = new JSONObject();
var.put("client_moniker", client.getString("client_moniker"));
var.put("short_name", client.getString("short_name"));
result = mailGunClient.addListMember(client.getString("contact_email"), mailListDefault, client.getString("contact_person"),"", var);
} catch (Exception ignore) {
logger.info("add Mail List Failed email:" + client.getString("contact_email") + " client_moniker:" + client.getString("client_moniker"));
}
return result;
}
@Override
public JSONObject updateClientOfMailList(JSONObject newClient, JSONObject oldClient) {
JSONObject result = null;
try {
JSONObject var = new JSONObject();
var.put("client_moniker", newClient.getString("client_moniker"));
var.put("short_name", newClient.getString("short_name"));
result = mailGunClient.updateClientOfMailList(newClient.getString("contact_email"), mailListDefault, newClient.getString("contact_person"),
oldClient.getString("contact_email"), var);
} catch (Exception ignore) {
logger.info("Modify Mail List Failed oldEmail:" + oldClient.getString("contact_email") + " client_moniker:" + newClient.getString("client_moniker")
+ " newEmail:" + newClient.getString("contact_email"));
}
return result;
}
@Override
public JSONObject sendEmail(String notice_id, String title, Set<String> mailTo, String content) throws URISyntaxException, IOException {
List<String> tags = new ArrayList<>();
tags.add("notice");
Document doc = Jsoup.parse(content);
Elements links = doc.select("a[href]");
List<JSONObject> files = new ArrayList<>();
for (Element link : links) {
String linkHref = link.attr("href");
String linkText = link.text();
Element e = link.previousElementSibling();
if (e != null && "img".equalsIgnoreCase(e.tagName())) {
e.remove();
}
if (linkHref.contains("mailto")) {
continue;
}
JSONObject file = new JSONObject();
file.put("name", linkText);
file.put("byteArr", attachmentClient.getFileByUrl(linkHref));
files.add(file);
}
SendMail sendMail = new SendMail();
sendMail.setFrom("info@mail.royalpay.com.au");
sendMail.setTitle(title);
sendMail.setContent(doc.outerHtml());
sendMail.setNotice_id(notice_id);
sendMail.setMailTos(mailTo);
sendMail.setAttachFiles(files);
sendMail.setTags(tags);
return mailGunClient.sendMail(sendMail);
}
public Map<String, String> getQueryMap(String query) {
String[] params = query.split("&");
Map<String, String> map = new HashMap<>();
for (String param : params) {
String[] tmpArr = param.split("=");
if (tmpArr.length < 2) {
continue;
}
map.put(tmpArr[0], tmpArr[1]);
}
return map;
}
}

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.system.web; package au.com.royalpay.payment.manage.system.web;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -7,16 +9,29 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Map; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RestController @RestController
@RequestMapping(value = "/mailgun") @RequestMapping(value = "/mailgun")
public class MailCallBackController { public class MailCallBackController {
Logger logger = LoggerFactory.getLogger(getClass());
private Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private MailGunService mailService;
@RequestMapping(value = "/callback", method = RequestMethod.POST) @RequestMapping(value = "/callback", method = RequestMethod.POST)
public void contractList(@RequestBody String content, HttpServletRequest req) { public void dealSuccessNptify(@RequestBody String content) throws Exception {
logger.info(content); mailService.dealNotify(content);
} }
@RequestMapping(value = "/callback/dropped", method = RequestMethod.POST)
public void contractList(HttpServletRequest req, HttpServletResponse res) throws Exception {
logger.info("kira"+req.getRequestURL().toString());
// logger.info("kira"+content);
// mailService.dealDroppedNotify(content);
}
} }

@ -26,7 +26,7 @@ public class PartnerInitEmailChecker {
public void checkPartnerInitEmail() { public void checkPartnerInitEmail() {
if (PlatformEnvironment.getEnv().taskEnabled()) { if (PlatformEnvironment.getEnv().taskEnabled()) {
synchronizedScheduler.executeProcess("manage_task:checkPartnerInitEmail", 120_000, synchronizedScheduler.executeProcess("manage_task:checkPartnerInitEmail", 120_000,
() -> clientManager.checkEmailStatus()); () -> clientManager.newCheckEmailStatus());
} }
} }
} }

@ -1,6 +1,6 @@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.schema-name=royalpay_production spring.datasource.schema-name=royalpay_production
spring.datasource.host=192.168.99.103:3306 spring.datasource.host=192.168.0.49:3306
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root spring.datasource.password=root

@ -1,6 +1,6 @@
server.port=5000 server.port=5000
spring.profiles.active=local,alipay,bestpay,jd,wechat spring.profiles.active=dev,alipay,bestpay,jd,wechat
env.company=RoyalPay env.company=RoyalPay
@ -99,3 +99,10 @@ app.foreign-currency=AUD
app.ofei.md5-key=Khjx6wejblaJzmG0JBWFlPFKAUxhFIXQ app.ofei.md5-key=Khjx6wejblaJzmG0JBWFlPFKAUxhFIXQ
app.ofei.pwd=aomi@8888 app.ofei.pwd=aomi@8888
app.ofei.sp-code=A1407200 app.ofei.sp-code=A1407200
mail.mailgun.api_key=api:key-2e67b891a1a7974bf3a40ea440d5a77f
mail.mailgun.public_key=api:pubkey-1aaaffc2662ba1b400c409d3e974ba7e
mail.mailgun.domain=mail.royalpay.com.au
mail.mailgun.default.merchantlist=merchants@mail.royalpay.com.au

@ -31,7 +31,7 @@
<tr> <tr>
<th>Client Moniker</th> <th>Client Moniker</th>
<th>Create Time</th> <th>Create Time</th>
<th>Waring Time</th> <th>Expire Time</th>
<th>Risk Types</th> <th>Risk Types</th>
<th>Status</th> <th>Status</th>
<th>Risk Counts</th> <th>Risk Counts</th>

@ -3,6 +3,10 @@ package au.com.royalpay.payment.manage.apps.core.impls;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.tools.mail.MailGunClient;
import au.com.royalpay.payment.tools.mail.SendMail;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
@ -18,6 +22,8 @@ import java.io.IOException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.Date; import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -28,7 +34,7 @@ import cn.yixblog.platform.http.HttpRequestResult;
* Created by wangning on 05/01/2018. * Created by wangning on 05/01/2018.
*/ */
@SpringBootTest @SpringBootTest
@ActiveProfiles({ "proxy", "alipay", "wechat", "jd", "bestpay" }) @ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
public class CustomerImpressionImplTest { public class CustomerImpressionImplTest {
@Resource @Resource
@ -40,8 +46,9 @@ public class CustomerImpressionImplTest {
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
private OrgMapper orgMapper; private OrgMapper orgMapper;
// @Resource @Resource
// private MailGunClient mailGunClient; private MailGunClient mailGunClient;
// @Test // @Test
// public void redisQueue() { // public void redisQueue() {
@ -87,12 +94,37 @@ public class CustomerImpressionImplTest {
// } // }
// } // }
@Test @Test
public void sendSimpleMessage() throws Exception { public void sendSimpleMessage() throws Exception {
String url = "https://api.mailgun.net/v3/dev.showcodes.com/messages?from=postmaster@mail.royalpay.com.au&to=164851225@qq.com,1029811920@qq.com&subject=啊是记录&text=暗杀苏&v:my-custom-data={\"key\":\"value\"}";
String asd = "王宁测试标题";
HttpRequestGenerator generator = new HttpRequestGenerator(url, RequestMethod.POST).addHeader("Authorization", getHeader());
HttpRequestResult res = null;
try {
res = generator.execute();
} catch (URISyntaxException e) {
e.printStackTrace();
}
System.out.println(res.getException());
System.out.println();
System.out.println();
try {
System.out.println(res.getResponseContentJSONObj().toJSONString());
} catch (IOException e) {
e.printStackTrace();
}
}
@Test
public void sendSimeMessage() throws Exception {
String url = "https://api.mailgun.net/v3/dev.showcodes.com/events"; String url = "https://api.mailgun.net/v3/dev.showcodes.com/events";
HttpRequestGenerator generator = new HttpRequestGenerator(url, RequestMethod.POST).addHeader("Authorization", getHeader()); HttpRequestGenerator generator = new HttpRequestGenerator(url, RequestMethod.POST).addHeader("Authorization", getHeader());
generator.addQueryString("ascending", "yes"); generator.addQueryString("ascending", "yes");
generator.addQueryString("v:my-custom-data", "123456789");
generator.addQueryString("limit", "12"); generator.addQueryString("limit", "12");
System.out.println(String.valueOf(DateUtils.addDays(new Date(),1))); System.out.println(String.valueOf(DateUtils.addDays(new Date(),1)));
HttpRequestResult res = null; HttpRequestResult res = null;
@ -119,22 +151,24 @@ public class CustomerImpressionImplTest {
return authHeader; return authHeader;
} }
// @Test @Test
// public void sendSimpleMessages() throws Exception { public void sendSimpleMessages() throws Exception {
// SendMail sendMail = new SendMail(); SendMail sendMail = new SendMail();
// sendMail.setContent("<html><p>Hi kira</p ></html>"); sendMail.setFrom("info@mail.royalpay.com.au");
// Set<String> mailCCs = new HashSet<>(); sendMail.setContent("<html><p>Hi kira</p ></html>");
// mailCCs.add("164851225@qq.com"); Set<String> mailCCs = new HashSet<>();
// sendMail.setMailCcs(mailCCs); mailCCs.add("asd1159111@163.com");
// Set<String> mailtos = new HashSet<>(); sendMail.setMailCcs(mailCCs);
// mailtos.add("1029811920@qq.com"); Set<String> mailtos = new HashSet<>();
// sendMail.setMailTos(mailtos); mailtos.add("eason.qian@royalpay.com.au");
// sendMail.setTitle("Final Test"); mailtos.add("164851225@qq.com");
// sendMail.setMailTos(mailtos);
// JSONObject result = mailGunClient.sendMail(sendMail); sendMail.setTitle("Final Test");
// System.out.println(result.toJSONString());
// System.out.println(result.toJSONString()); JSONObject result = mailGunClient.sendMail(sendMail);
// System.out.println(result.toJSONString()); System.out.println(result.toJSONString());
// } System.out.println(result.toJSONString());
System.out.println(result.toJSONString());
}
} }

@ -0,0 +1,30 @@
package au.com.royalpay.payment.manage.system.core.impl;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
@SpringBootTest
@ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class MailGunServiceImplTest {
@Resource
MailGunService mailService;
@Test
public void dealNotify() {
String dd= "timestamp=1526298391&token=b7ad8dc0905c46b1c4853200941d30417b4d3f3695815dc729&signature=a3507be4d7ad2b48c4b57202eabd6f63b75abfacd974a9bc7773dc968a12c34e&X-Mailgun-Sid=WyJlMjYwYSIsICI0NjQ1NjMxMThAcXEuY29tIiwgIjQzODY0NiJd&domain=dev.showcodes.com&X-Mailgun-Tag=test1&event=delivered&event-timestamp=1526298391.16&message-headers=[[\"X-Mailgun-Sending-Ip\", \"184.173.153.207\"], [\"X-Mailgun-Sid\", \"WyJlMjYwYSIsICI0NjQ1NjMxMThAcXEuY29tIiwgIjQzODY0NiJd\"], [\"List-Unsubscribe\", \"<mailto:u+mq6timzygy2dmjtjhuzdamjyga2tcnbrge2dmmrzfyys4msdivdecmkegi3uenbwgu4ugnbfgqygizlwfzzwq33xmnxwizltfzrw63jgna6tgmbummzdqnjzga2tkylggfqwkzjqhbrwiyzumzqtkztgg44donrgnu6tknjugqytomjgoi6tinrugu3dgmjrhastimdroexgg33nezwxslldovzxi33nfvsgc5dbhustoqrfgizgwzlzeuzdejjtiestemtwmfwhkzjfgizckn2e@dev.showcodes.com>\"], [\"Received\", \"by luna.mailgun.net with SMTP X-Mailgun-List-Id=5544171, 8794346058393; Mon, 14 May 2018 11:46:29 +0000\"], [\"X-Mailgun-List-Id\", \"5544171\"], [\"X-Mailgun-List-Address\", \"info@dev.showcodes.com\"], [\"List-Id\", \"<info.dev.showcodes.com>\"], [\"Received\", \"by luna.mailgun.net with HTTP; Mon, 14 May 2018 11:46:27 +0000\"], [\"Date\", \"Mon, 14 May 2018 11:46:27 +0000\"], [\"Sender\", \"postmaster@mail.royalpay.com.au\"], [\"X-Mailgun-Variables\", \"{\\\"my-custom-data\\\": \\\"{\\\\\\\"key\\\\\\\":\\\\\\\"value\\\\\\\"}\\\"}\"], [\"X-Mailgun-Tag\", \"test1\"], [\"From\", \"postmaster@mail.royalpay.com.au\"], [\"Subject\", \"Testqweasdzxc1\"], [\"Mime-Version\", \"1.0\"], [\"Content-Type\", [\"multipart/alternative\", {\"boundary\": \"12109fc0295a479385fcbed01f501455\"}]], [\"Message-Id\", \"<20180514114629.1.2CEFA1D27B4659C4@dev.showcodes.com>\"], [\"To\", \"yz <464563118@qq.com>\"]]&Message-Id=<20180514114629.1.2CEFA1D27B4659C4@dev.showcodes.com>&recipient=464563118@qq.com&my-custom-data={\"id\":\"123\"}&body-plain=";
try {
mailService.dealNotify(dd);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Loading…
Cancel
Save