From f86c8c0b982efd38a519a2c8453754da3c8718c4 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Tue, 3 Apr 2018 16:15:07 +0800 Subject: [PATCH] update --- .../manage/appclient/core/impls/RetailAppServiceImp.java | 6 +++--- .../manage/system/core/impl/ClientContractServiceImpl.java | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 90c432179..a391817b5 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -1129,11 +1129,10 @@ public class RetailAppServiceImp implements RetailAppService { int update_type = 0;// 0:不更新 1:更新 2:强制更新 String [] oldVersion = version.split("\\."); String [] newVersion = newAppVersion.split("\\."); - JSONObject res = null; + JSONObject res = new JSONObject(); + res.put("update_content", updateContent); for (int i = 0; i < newVersion.length; i++) { if(Integer.valueOf(newVersion[i])>Integer.valueOf(oldVersion[i])){ - res = new JSONObject(); - res.put("update_content", updateContent); update_type = 1; if (isUpdate) { update_type = 2; @@ -1142,6 +1141,7 @@ public class RetailAppServiceImp implements RetailAppService { return res; } } + res.put("update_type", update_type); return res; } diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java index 563120196..dbc70175d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java @@ -78,6 +78,8 @@ public class ClientContractServiceImpl implements ClientContractService { if (contract != null && contract.getBoolean("has_sign")) { return; } + + getOrGenerateSourceAgreement(client_id, channel); Date now = new Date(); JSONObject account = clientAccountMapper.findById(account_id); contract.put("has_sign", 1); @@ -86,7 +88,6 @@ public class ClientContractServiceImpl implements ClientContractService { contract.put("confirm_time", now); contract.put("signatory", account.getString("display_name")); clientsContractMapper.update(contract); - getOrGenerateSourceAgreement(client_id, channel); clientManager.setClientTaxInSurcharge(client.getString("client_moniker"), false); }