From da102239b01f090e5b20dce1439384ba9763af3c Mon Sep 17 00:00:00 2001 From: luoyang Date: Mon, 12 Aug 2019 13:56:09 +0800 Subject: [PATCH] =?UTF-8?q?add=20app=E5=90=88=E8=A7=84=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=94=AF=E6=8C=81=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E4=BB=98=E8=B4=B9=E8=B4=A6=E6=88=B7=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../appclient/web/RetailAppController.java | 1 - .../core/impls/SignInAccountServiceImpl.java | 31 ++++++++++++++++++- .../task/SurchargeAccountMonthTask.java | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5eb74bc31..12290b19a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.7 + 1.1.8 UTF-8 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index 599b73f86..011bad9b0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -718,7 +718,6 @@ public class RetailAppController { return retailAppService.toggleCBBankCustomerSurcharge(device, customerSurcharge.getBooleanValue("customerSurcharge")); } - @RequestMapping(value = "/cbbank_pay/aggregate_file", method = RequestMethod.GET) public void getCBBankAggragateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,HttpServletResponse httpResponse) { retailAppService.getCBBankAggregateFile(device, httpResponse); diff --git a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java index d32a5c40a..2129df628 100644 --- a/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/signin/core/impls/SignInAccountServiceImpl.java @@ -47,6 +47,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; /** * account service for sign in Created by yixian on 2016-06-29. @@ -84,6 +85,8 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati @Resource private StringRedisTemplate stringRedisTemplate; @Resource + private ClientFilesMapper clientFilesMapper; + @Resource private SmsSender smsSender; private final String RESET_CLIENT_ACCOUNT_PREFIX = "RESET_CLIENT_ACCOUNT"; private final String RESET_MANAGER_ACCOUNT_PREFIX = "RESET_MANAGER_ACCOUNT"; @@ -159,6 +162,32 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati } client.putAll(clientConfigService.find(client_id)); client = clientInfoWithNoSecretInfo(client); + if (client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10) { + List resultFiles = new ArrayList<>(); + List clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id")); + String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"}; + String[] putKeys = {"file_bank_info", "file_company_info", "file_id_info", "file_agreement_info", "file_apply_info"}; + String[] fileNames = {"* bank statement", "* Certificate of Registration", "* ID", "* Agreement" ,"Application Form(optional)"}; + boolean clientFilesIsLess = false; + for (int i = 0; i < fileKeys.length; i++) { + String fileKey = fileKeys[i]; + if (clientFiles.stream().noneMatch(fileJson -> fileKey.equals(fileJson.getString("file_name")))) { + JSONObject fileJson = new JSONObject(); + fileJson.put("key", putKeys[i]); + fileJson.put("name", fileNames[i]); + fileJson.put("file_value", "not Configure"); + resultFiles.add(fileJson); + if (!"client_apply_file".equals(fileKey)) { + clientFilesIsLess = true; + } + } + } + client.put("greenChannel", 1); + client.put("client_less_file", clientFilesIsLess); + if (clientFilesIsLess) { + client.put("client_files", resultFiles); + } + } if (client.getInteger("parent_client_id") != null) { JSONObject rootPartner = clientManager.getClientInfoIgnoreInvalid(client.getIntValue("parent_client_id")); rootPartner.putAll(clientConfigService.find(client.getIntValue("parent_client_id"))); @@ -442,7 +471,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati String[] columns = { "client_id", "client_moniker", "parent_client_id", "company_name", "address", "business_name", "business_structure", "abn", "acn", "company_phone", "suburb", "postcode", "state", "contact_person", "contact_phone", "contact_email", "short_name", "logo_url", "enable_refund", "enable_refund_auth", "retail_surcharge", "require_custinfo", "require_remark", "logo_thumbnail", "creator", "create_time", "approver", - "approve_result", "approve_time", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat", + "approve_result", "approve_time", "open_status", "timezone", "has_children", "source", "customer_surcharge_rate", "enable_alipay", "enable_wechat", "enable_bestpay", "manual_settle", "skip_clearing" ,"mail_confirm","surcharge_mode"}; for (String col : columns) { simpleClient.put(col, client.get(col)); diff --git a/src/main/java/au/com/royalpay/payment/manage/task/SurchargeAccountMonthTask.java b/src/main/java/au/com/royalpay/payment/manage/task/SurchargeAccountMonthTask.java index eaa7e9031..8aae9f9a2 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/SurchargeAccountMonthTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/SurchargeAccountMonthTask.java @@ -16,7 +16,7 @@ public class SurchargeAccountMonthTask { @Resource private SurchargeAccountService surchargeAccountService; - @Scheduled(cron = "0 30 23 1 * ?") + @Scheduled(cron = "0 0 10 1 * ?") public void generateSurchargeAccountDetail() { synchronizedScheduler.executeProcess("manage_task:generateSurchargeAccountMonth", 120_000, () -> surchargeAccountService.generatorMonthDetail());