1
zj
yesterday befbf57e4112d07003bff18102f556a1e5a154de
trading-order-service/src/main/java/com/yami/trading/service/notify/WalletTransactionMailNotificationService.java
@@ -26,16 +26,10 @@
            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);
        }
@@ -48,20 +42,10 @@
            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);
        }