From 8bbba61d9d475a5f52cb7d67ac535ff5e99e9b95 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 4 May 2018 18:13:50 +0800 Subject: [PATCH] update --- .../manage/merchants/core/impls/ClientManagerImpl.java | 4 ++-- .../manage/merchants/entity/ClientConfigModify.java | 10 +++++----- .../payment/manage/merchants/entity/ClientModify.java | 10 +++++----- .../manage/merchants/entity/impls/EmailModify.java | 8 ++++---- src/main/resources/application.properties | 2 +- 5 files changed, 17 insertions(+), 17 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 c45656eaa..f306fdc06 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 @@ -802,9 +802,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid try { String emailId = mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", mailTo, emails.isEmpty() ? "" : StringUtils.join(emails, ","), content); - clientModifySupport.processClientConfigModify(new EmailModify(account, client.getString("client_moniker"), 3, emailId)); + clientModifySupport.processClientModify(new EmailModify(account, client.getString("client_moniker"), 3, emailId)); } catch (Exception e) { - clientModifySupport.processClientConfigModify(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); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientConfigModify.java b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientConfigModify.java index 1666526fe..207ce00b1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientConfigModify.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientConfigModify.java @@ -39,11 +39,11 @@ public abstract class ClientConfigModify { public int doModify(MerchantInfoProvider merchantInfoProvider, ClientConfigMapper clientConfigMapper, ClientMapper clientMapper, MongoTemplate mongoTemplate) { JSONObject client = merchantInfoProvider.getClientInfoByMoniker(clientMoniker); JSONObject modifyResult = getModifyResult(); -// try { -// saveModifyHistory(client, modifyResult, mongoTemplate); -// }catch (Exception e){ -// -// } + try { + saveModifyHistory(client, modifyResult, mongoTemplate); + }catch (Exception e){ + + } int clientId = client.getIntValue("client_id"); modifyResult.put("client_id", clientId); clientConfigMapper.update(modifyResult); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientModify.java b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientModify.java index 49830f8d3..cf33238d9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientModify.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/ClientModify.java @@ -38,11 +38,11 @@ public abstract class ClientModify { public int doModify(MerchantInfoProvider merchantInfoProvider, ClientMapper clientMapper, MongoTemplate mongoTemplate) { JSONObject client = merchantInfoProvider.getClientInfoByMoniker(clientMoniker); JSONObject modifyResult = getModifyResult(); -// try { -// saveModifyHistory(client, modifyResult, mongoTemplate); -// }catch (Exception e){ -// -// } + try { + saveModifyHistory(client, modifyResult, mongoTemplate); + }catch (Exception e){ + + } int clientId = client.getIntValue("client_id"); modifyResult.put("client_id", clientId); clientMapper.update(modifyResult); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/impls/EmailModify.java b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/impls/EmailModify.java index 3060246b2..3a2818bff 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/entity/impls/EmailModify.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/entity/impls/EmailModify.java @@ -1,13 +1,13 @@ package au.com.royalpay.payment.manage.merchants.entity.impls; -import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify; +import au.com.royalpay.payment.manage.merchants.entity.ClientModify; import com.alibaba.fastjson.JSONObject; /** * Create by yixian at 2018-04-12 16:43 */ -public class EmailModify extends ClientConfigModify { +public class EmailModify extends ClientModify { private int approve_email_send; private String approve_email_id; @@ -25,8 +25,8 @@ public class EmailModify extends ClientConfigModify { @Override protected JSONObject getModifyResult() { JSONObject modify = new JSONObject(); - modify.put("approve_email_send", 4); - modify.put("approve_email_id", null); + modify.put("approve_email_send", approve_email_send); + modify.put("approve_email_id", approve_email_id); return modify; } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index eb5667272..7a0ba348a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -22,7 +22,7 @@ spring.redis.host=127.0.0.1 spring.redis.port=6379 spring.redis.database=1 -spring.data.mongodb.host=119.28.215.173 +spring.data.mongodb.host=10.30.0.8 spring.data.mongodb.port=27017 spring.data.mongodb.database=admin spring.data.mongodb.username=mongouser