From fc22178c039d750f4273a6ba0b1b35b08129e97f Mon Sep 17 00:00:00 2001 From: yangkai Date: Wed, 5 Sep 2018 15:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=B4=A7=E5=B8=81=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/merchants/core/impls/ClientManagerImpl.java | 9 ++++++++- src/main/resources/templates/mail/hf_email_notice.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index da95e6eea..5d47d013c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3779,7 +3779,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid ctx.setVariable("name", client.getString("contact_person")); ctx.setVariable("order_id", order.getString("order_id")); ctx.setVariable("amount", order.getString("total_amount")); - String create_time = DateFormatUtils.format(order.getDate("create_time"), "yyyy-MM-dd HH:mm:ss"); + ctx.setVariable("currency", order.getString("currency")); + String create_time = ""; + if (client.getString("timezone") != null) { + create_time = DateFormatUtils.format(order.getDate("create_time"), + "yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone(client.getString("timezone"))); + } else { + create_time = DateFormatUtils.format(order.getDate("create_time"), "yyyy-MM-dd HH:mm:ss"); + } ctx.setVariable("time", create_time); final String content = thymeleaf.process( "mail/hf_email_notice", ctx); final String mailTo = client.getString("contact_email"); diff --git a/src/main/resources/templates/mail/hf_email_notice.html b/src/main/resources/templates/mail/hf_email_notice.html index d7f5e6275..d71bbe71d 100644 --- a/src/main/resources/templates/mail/hf_email_notice.html +++ b/src/main/resources/templates/mail/hf_email_notice.html @@ -17,7 +17,7 @@