|
|
|
@ -92,7 +92,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
private ClientConfigMapper clientConfigMapper;
|
|
|
|
|
private ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
|
|
|
private SmsSingleSender sender = null;
|
|
|
|
@ -164,22 +163,23 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
Context ctx = new Context();
|
|
|
|
|
ctx.setVariable("url", PlatformEnvironment.getEnv().concatUrl("/register/account/mail/" + address + "/verify/" + key + "/jump?username=" + username));
|
|
|
|
|
final String content = thymeleaf.process("mail/register_application", ctx);
|
|
|
|
|
// SendMail sendMail = new SendMail();
|
|
|
|
|
// Set<String> to = new HashSet<>();
|
|
|
|
|
// to.add(address);
|
|
|
|
|
// sendMail.setMailTos(to);
|
|
|
|
|
// sendMail.setFrom("info@mail.royalpay.com.au");
|
|
|
|
|
// sendMail.setTitle("Royalpay");
|
|
|
|
|
// sendMail.setContent(content);
|
|
|
|
|
// sendMail.setTags(tags);
|
|
|
|
|
// mailGunService.sendMail(sendMail);
|
|
|
|
|
// SendMail sendMail = new SendMail();
|
|
|
|
|
// Set<String> to = new HashSet<>();
|
|
|
|
|
// to.add(address);
|
|
|
|
|
// sendMail.setMailTos(to);
|
|
|
|
|
// sendMail.setFrom("info@mail.royalpay.com.au");
|
|
|
|
|
// sendMail.setTitle("Royalpay");
|
|
|
|
|
// sendMail.setContent(content);
|
|
|
|
|
// sendMail.setTags(tags);
|
|
|
|
|
// mailGunService.sendMail(sendMail);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String emailId = mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", address,
|
|
|
|
|
"", content);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new EmailException("Email Sending Failed", e);
|
|
|
|
|
}
|
|
|
|
|
Runnable task2 = () -> {
|
|
|
|
|
try {
|
|
|
|
|
String emailId = mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", address, "", content);
|
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
pool.execute(task2);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -362,7 +362,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
clientConfig.put("common_sub_merchant_id", 1);
|
|
|
|
|
clientConfigMapper.save(clientConfig);
|
|
|
|
|
|
|
|
|
|
apply.put("client_moniker",clientMoniker);
|
|
|
|
|
apply.put("client_moniker", clientMoniker);
|
|
|
|
|
sysClientPreMapperMapper.update(apply);
|
|
|
|
|
|
|
|
|
|
JSONObject sysRate = new JSONObject();
|
|
|
|
@ -374,7 +374,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
sysRate.put("active_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
|
|
|
|
|
sysRate.put("expiry_time", DateFormatUtils.format(DateUtils.addYears(new Date(), 1), "yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject rateConfig = JSONObject.parseObject(sysConfig.getString("sys_apply_rates"));
|
|
|
|
|
JSONObject chooseRate = new JSONObject();
|
|
|
|
|
if (apply.getIntValue("clean_days") == 1) {
|
|
|
|
@ -401,7 +400,6 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
|
|
|
|
|
};
|
|
|
|
|
pool.execute(task2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String generateClientMoniker() {
|
|
|
|
|