| | |
| | | return; |
| | | } |
| | | String subject = "Deposit successful"; |
| | | String amt = amount == null ? "-" : amount.stripTrailingZeros().toPlainString(); |
| | | String asset = assetDescription == null ? "" : assetDescription; |
| | | String body = "Hello,\n\n" |
| | | + "Your deposit has been credited successfully.\n\n" |
| | | + "Order number: " + orderNo + "\n" |
| | | + "Amount: " + amt + " " + asset + "\n\n" |
| | | + "If you did not make this transaction, please contact support immediately.\n\n" |
| | | + "Best regards"; |
| | | String amountCode = amount == null ? "-" : amount.stripTrailingZeros().toPlainString(); |
| | | try { |
| | | emailSendService.sendEmail(to, subject, body); |
| | | // 充值邮件走模板,code=充值金额 |
| | | emailSendService.sendEmail(to, subject, amountCode); |
| | | } catch (Exception e) { |
| | | log.error("Failed to send deposit success email, orderNo={}", orderNo, e); |
| | | } |
| | |
| | | return; |
| | | } |
| | | String subject = "Withdrawal successful"; |
| | | String amt = amount == null ? "-" : amount.stripTrailingZeros().toPlainString(); |
| | | String feeStr = (fee == null || fee.compareTo(BigDecimal.ZERO) == 0) |
| | | ? "none" |
| | | : fee.stripTrailingZeros().toPlainString(); |
| | | String asset = assetDescription == null ? "" : assetDescription; |
| | | String body = "Hello,\n\n" |
| | | + "Your withdrawal has been completed successfully.\n\n" |
| | | + "Order number: " + orderNo + "\n" |
| | | + "Amount: " + amt + " " + asset + "\n" |
| | | + "Fee: " + feeStr + "\n\n" |
| | | + "If you did not request this withdrawal, please contact support immediately.\n\n" |
| | | + "Best regards"; |
| | | String amountCode = amount == null ? "-" : amount.stripTrailingZeros().toPlainString(); |
| | | try { |
| | | emailSendService.sendEmail(to, subject, body); |
| | | // 提现邮件走模板,code=提现金额 |
| | | emailSendService.sendEmail(to, subject, amountCode); |
| | | } catch (Exception e) { |
| | | log.error("Failed to send withdrawal success email, orderNo={}", orderNo, e); |
| | | } |