From 94dbe6f9dead45474a59f261984d07963ccaf41e Mon Sep 17 00:00:00 2001 From: duLingLing Date: Thu, 22 Aug 2019 16:18:10 +0800 Subject: [PATCH 1/8] =?UTF-8?q?Upd:=E5=8F=91=E9=80=81=E9=A3=8E=E6=8E=A7?= =?UTF-8?q?=E9=82=AE=E4=BB=B6,=E5=88=A0=E9=99=A4ip=E6=98=BE=E7=A4=BA,?= =?UTF-8?q?=E5=86=85=E9=83=A8=E8=B0=83=E7=94=A8=E4=BF=A1=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8F=8F=E8=BF=B0=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/main/resources/templates/mail/risk_upload_mail.html | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 5c69a347d..e30e5564d 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.24 + 1.1.25 UTF-8 diff --git a/src/main/resources/templates/mail/risk_upload_mail.html b/src/main/resources/templates/mail/risk_upload_mail.html index 719540fd0..3cd7b9e38 100644 --- a/src/main/resources/templates/mail/risk_upload_mail.html +++ b/src/main/resources/templates/mail/risk_upload_mail.html @@ -100,7 +100,6 @@ Platform Transaction ID Order Description Customer ID - IP Total Amount Input Amount Pay Amount @@ -119,7 +118,6 @@ - @@ -132,6 +130,7 @@ +

请查收关于被抽查的订单交易的相关信息,并在下午6:00 (悉尼时间)前将所需材料直接回复该邮件,未能按时提交完整证明材料,支付渠道将被关停,请您务必配合调查。感谢。
Please find sampled transactions in attachment, and reply required materials to this email before 6:00 pm (AEST). If you can not provide qualified materials on time, the payment channels would be suspended or restricted with amount limit. Please be sure to assist the investigation. Thanks.

From a664f2b79a63d0c720bcd7bc982dfd66222bf97e Mon Sep 17 00:00:00 2001 From: duLingLing Date: Thu, 22 Aug 2019 18:14:26 +0800 Subject: [PATCH 2/8] =?UTF-8?q?Upd:=E9=A3=8E=E6=8E=A7=E4=B8=9A=E5=8A=A1,?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E9=83=A8=E8=B0=83=E7=94=A8=E4=BA=BA?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- src/db/modify.sql | 4 +++- .../core/impl/RiskBusinessServiceImpl.java | 12 +++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index e30e5564d..5b39ee87c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.25 + 1.1.26 UTF-8 diff --git a/src/db/modify.sql b/src/db/modify.sql index 929d90dc1..982d51c8e 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -721,4 +721,6 @@ ADD INDEX `report_id` (`report_id`) USING HASH ; update pmt_custom_reports set report_serial=uuid(); alter pmt_custom_reports add PRIMARY key (report_serial); -alter table sys_org add COLUMN `state` varchar(20) DEFAULT NULL COMMENT '州 (使用标准码 NSW,QLD,WA,VIC,ACT,NT,TAS,SA)'; \ No newline at end of file +alter table sys_org add COLUMN `state` varchar(20) DEFAULT NULL COMMENT '州 (使用标准码 NSW,QLD,WA,VIC,ACT,NT,TAS,SA)'; + +INSERT INTO `royalpay`.`sys_configs`(`config_key`, `config_value`, `config_desc`) VALUES ('rick_interior_send_email', 'dll19920503@qq.com', '内部调用测试发送邮箱'); \ No newline at end of file diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index 1697bf419..ca2e41a7b 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -32,6 +32,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatExce import au.com.royalpay.payment.tools.device.message.AppMessage; import au.com.royalpay.payment.tools.device.message.AppMsgSender; import au.com.royalpay.payment.tools.env.PlatformEnvironment; +import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.event.WechatExceptionEvent; import au.com.royalpay.payment.tools.locale.LocaleSupport; @@ -134,6 +135,9 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo private MpWechatApiProvider mpWechatApiProvider; private ApplicationEventPublisher publisher; + @Resource + private SysConfigManager sysConfigManager; + @Resource public void setAppMsgSenders(AppMsgSender[] senders) { @@ -818,7 +822,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo * 如果是内部调单,密送bd与上面定义的‘emailsBccs’ * 如果没有勾选发送商户 * 如果不是内部调单,直接发送商户; - * 如果是内部调单,则自定义“"18852852189@163.com"为收件人,密送同上 + * 如果是内部调单,则自定义sys_configs配置中KEY为"rick_interior_send_email"为收件人,密送同上 * * Arrays.asList("18852852189@139.com", "1370256381@qq.com")为本地debug模式的测试邮箱 */ @@ -829,7 +833,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo ctx.setVariable("emailsCcs", null); if (PlatformEnvironment.getEnv().isDebug()) { emailsBccs = new ArrayList<>(Arrays.asList( - "18852852189@139.com", "1370256381@qq.com" + sysConfigManager.getSysConfig().getString("rick_interior_send_email"), + sysConfigManager.getSysConfig().getString("rick_interior_send_email") )); } emailsBccs.addAll(bdEmails); @@ -839,7 +844,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) { if (PlatformEnvironment.getEnv().isDebug()) { emailsBccs = new ArrayList<>(Arrays.asList( - "18852852189@139.com", "1370256381@qq.com" + sysConfigManager.getSysConfig().getString("rick_interior_send_email"), + sysConfigManager.getSysConfig().getString("rick_interior_send_email") )); } emailsBccs.addAll(bdEmails); From d6f4c6419425f219d46b6aaca52f44eda8006663 Mon Sep 17 00:00:00 2001 From: duLingLing Date: Thu, 22 Aug 2019 19:01:59 +0800 Subject: [PATCH 3/8] =?UTF-8?q?Upd:=E9=A3=8E=E6=8E=A7=E4=B8=9A=E5=8A=A1,?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E9=83=A8=E8=B0=83=E7=94=A8=E4=BA=BA?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../riskbusiness/core/impl/RiskBusinessServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 5b39ee87c..33420851f 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.26 + 1.1.27 UTF-8 diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index ca2e41a7b..2eddba926 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -824,7 +824,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo * 如果不是内部调单,直接发送商户; * 如果是内部调单,则自定义sys_configs配置中KEY为"rick_interior_send_email"为收件人,密送同上 * - * Arrays.asList("18852852189@139.com", "1370256381@qq.com")为本地debug模式的测试邮箱 + * Arrays.asList(自定义sys_configs配置中KEY为"rick_interior_send_email")为本地debug模式的测试邮箱 */ if (isSendClient == 1) { ctx.setVariable("emailsTos", clientEmails); @@ -851,7 +851,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo emailsBccs.addAll(bdEmails); ctx.setVariable("emailsBccs", emailsBccs); ctx.setVariable("emailsTos", Arrays.asList( - "18852852189@163.com" + sysConfigManager.getSysConfig().getString("rick_interior_send_email") )); } } From 8ac67b1726fbdcd357706f24492694d683246dc1 Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 23 Aug 2019 11:30:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix=20=E5=90=8E=E4=BB=98=E8=B4=B9=E6=89=8B?= =?UTF-8?q?=E7=BB=AD=E8=B4=B9=E5=89=8D=E7=AB=AF=E6=98=BE=E7=A4=BA=E3=80=81?= =?UTF-8?q?=E5=86=B2=E6=AD=A3=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../surchargeAccount/core/impl/SurchargeAccountServiceImpl.java | 2 +- .../mappers/system/FinancialSurchargeAccountDetailMapper.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java index fa09f6708..9a39adf81 100644 --- a/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java @@ -125,7 +125,7 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService { transaction.put("bill_id", detailId); transaction.put("total_surcharge", BigDecimal.ZERO); transaction.put("tax_amount", BigDecimal.ZERO); - transaction.put("amount", detail.getBigDecimal("debit_amount").negate()); + transaction.put("amount", (detail.getBigDecimal("debit_amount").add(detail.getBigDecimal("credit_amount"))).negate()); transaction.put("post_balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount"))); transaction.put("operation", manager.getString("manager_id")); transaction.put("create_time", new Date()); diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/FinancialSurchargeAccountDetailMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/FinancialSurchargeAccountDetailMapper.xml index 7576f7ee4..583edb902 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/FinancialSurchargeAccountDetailMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/FinancialSurchargeAccountDetailMapper.xml @@ -17,6 +17,7 @@ fsad.total_surcharge, fsad.credit_amount, fsad.debit_amount, + fsad.checkout, sc.client_moniker, sc.short_name, sc.company_name From 12256773b69a3e601af1146a613bd863fd2e7d3c Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 23 Aug 2019 11:31:50 +0800 Subject: [PATCH 5/8] fix pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33420851f..d88ede0f8 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.27 + 1.1.28 UTF-8 From f5eb9ec4a4339cd269bab4539ce4d181516fa1b5 Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 23 Aug 2019 11:46:21 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix=20=E5=90=8E=E6=89=8B=E7=BB=AD=E8=B4=B9?= =?UTF-8?q?=E5=8F=96=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../surchargeAccount/core/impl/SurchargeAccountServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java index 9a39adf81..960feab9c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/surchargeAccount/core/impl/SurchargeAccountServiceImpl.java @@ -125,7 +125,7 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService { transaction.put("bill_id", detailId); transaction.put("total_surcharge", BigDecimal.ZERO); transaction.put("tax_amount", BigDecimal.ZERO); - transaction.put("amount", (detail.getBigDecimal("debit_amount").add(detail.getBigDecimal("credit_amount"))).negate()); + transaction.put("amount", detail.getBigDecimal("total_surcharge").negate()); transaction.put("post_balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount"))); transaction.put("operation", manager.getString("manager_id")); transaction.put("create_time", new Date()); From c01647f1d45d0f6af8005886e910a8ff8bef2a84 Mon Sep 17 00:00:00 2001 From: todking Date: Fri, 23 Aug 2019 18:24:23 +0800 Subject: [PATCH 7/8] =?UTF-8?q?add=20=E4=BA=A4=E6=98=93=E8=B6=8B=E5=8A=BF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mappers/TransactionAnalysisMapper.java | 3 + .../appclient/core/RetailAppService.java | 2 + .../core/impls/RetailAppServiceImp.java | 115 +++++++++++------- .../appclient/web/RetailAppController.java | 6 + .../mappers/TransactionAnalysisMapper.xml | 29 +++++ 5 files changed, 108 insertions(+), 47 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.java b/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.java index 68a6317f3..6e9a570e9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.java @@ -77,6 +77,9 @@ public interface TransactionAnalysisMapper { JSONObject getClientTransaction(JSONObject params); + List getWeekClientTransaction(JSONObject params); + + @CountRef(".countAreaMerchantAmountAnalysis") PageList getAreaMerchantAmountAnalysis(JSONObject params, PageBounds pagination); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java index 69cedabf3..cca43a4c0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java @@ -24,6 +24,8 @@ import javax.servlet.http.HttpServletResponse; public interface RetailAppService { JSONObject getTransactionCommonData(JSONObject device, AppQueryBean appQueryBean); + List getTransactionCommonWeekData(JSONObject device, AppQueryBean appQueryBean); + JSONObject getClientSettlementLog(JSONObject device, AppQueryBean appQueryBean); JSONObject getTransactionLogsByClearingDetailId(JSONObject device, int clearing_detail_id, String timezone); 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 af8b694ee..271de92c0 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 @@ -211,7 +211,7 @@ public class RetailAppServiceImp implements RetailAppService { private final int BIND_PHONE_TEMPLID = 126978; private Map senderMap = new HashMap<>(); - private final String fileName[] = { "client_bank_file", "client_id_file", "client_company_file" }; + private final String fileName[] = {"client_bank_file", "client_id_file", "client_company_file"}; @Resource public void setAppMsgSenders(AppMsgSender[] senders) { @@ -262,6 +262,27 @@ public class RetailAppServiceImp implements RetailAppService { return res; } + @Override + public List getTransactionCommonWeekData(JSONObject device, AppQueryBean appQueryBean) { + String clientType = device.getString("client_type"); + deviceSupport.findRegister(clientType); + int client_id = device.getIntValue("client_id"); + JSONObject client = clientManager.getClientInfo(client_id); + String timezone = client.getString("timezone"); + if (timezone != null && !timezone.isEmpty()) { + appQueryBean.setTimezone(timezone); + } + JSONObject params = appQueryBean.toParams(); + setAllClientIds(params, client_id); + params.put("client_id", client_id); + List res = transactionAnalysisMapper.getWeekClientTransaction(params); + res.forEach(r -> { + r.put("date",r.getDate("date").toString()); + }); + res.remove(res.size() - 1); + return res; + } + @Override public JSONObject getTradeCommonDate(JSONObject device, AppQueryBean appQueryBean) { String clientType = device.getString("client_type"); @@ -302,7 +323,7 @@ public class RetailAppServiceImp implements RetailAppService { @Override public JSONObject getQrcode(JSONObject device, QRCodeConfig config, int client_id) { JSONObject client = merchantInfoProvider.getClientInfo(client_id); - String url = PlatformEnvironment.getEnv().concatUrl("/api/payment/v1.0/partners/" + client.getString("client_moniker")); + String url = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/payment/partners/" + client.getString("client_moniker")); if (config.isCNY()) { url += "_CNY"; } @@ -484,7 +505,7 @@ public class RetailAppServiceImp implements RetailAppService { @Override public JSONObject ctripCouponInfo(JSONObject device, String coupon_id) { - return couponVerificationService.ctripCouponInfo(coupon_id,device.getIntValue("client_id"), true); + return couponVerificationService.ctripCouponInfo(coupon_id, device.getIntValue("client_id"), true); } @@ -498,7 +519,7 @@ public class RetailAppServiceImp implements RetailAppService { PageList cusCouponLogs = couponAccuessLogMapper.getCouponAccuessLog( client.getIntValue("client_id"), keyword, new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("creation_date.desc"))); HashMap couponMap = new HashMap<>(); - for(JSONObject cusCouponLog : cusCouponLogs) { + for (JSONObject cusCouponLog : cusCouponLogs) { cusCouponLog.put("client_moniker", client_moniker); if (couponMap.containsKey(cusCouponLog.getString("coupon_id"))) { cusCouponLog.put("coupon", couponMap.get(cusCouponLog.getString("coupon_id"))); @@ -521,7 +542,7 @@ public class RetailAppServiceImp implements RetailAppService { Date date = new Date(); couponAccuessLog.put("client_id", client_id); couponAccuessLog.put("order_id", "NON_PLATFORM_ORDER"); - couponAccuessLog.put("coupon_id", "CTRIP_"+coupon_id); + couponAccuessLog.put("coupon_id", "CTRIP_" + coupon_id); couponAccuessLog.put("customer_openid", "NON_PLATFORM_ORDER"); couponAccuessLog.put("coupon_deal_amount", 0); couponAccuessLog.put("currency", "AUD"); @@ -581,7 +602,7 @@ public class RetailAppServiceImp implements RetailAppService { || ("Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("acn"))) || (!"Company".equals(clientWithConfig.getString("business_structure")) && StringUtils.isEmpty(clientWithConfig.getString("abn"))) || (StringUtils.isEmpty(clientWithConfig.getString("company_website")) && StringUtils.isEmpty(clientWithConfig.getString("company_photo")) - && StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) { + && StringUtils.isEmpty(clientWithConfig.getString("store_photo")))) { res.put("base_info_lack", true); } @@ -613,7 +634,7 @@ public class RetailAppServiceImp implements RetailAppService { || ("Company".equals(client.getString("business_structure")) && StringUtils.isEmpty(client.getString("acn"))) || (!"Company".equals(client.getString("business_structure")) && StringUtils.isEmpty(client.getString("abn"))) || (StringUtils.isEmpty(client.getString("company_website")) && StringUtils.isEmpty(client.getString("company_photo")) - && StringUtils.isEmpty(client.getString("store_photo")))) { + && StringUtils.isEmpty(client.getString("store_photo")))) { result.put("base_info_lack", true); } @@ -1288,10 +1309,10 @@ public class RetailAppServiceImp implements RetailAppService { String father = "
"; String html = doc.body().children().wrap(father).html(); // logger.debug("wrapped html---->"+html); - if (res.getIntValue("type")==2) { - List buttons = JSONObject.parseArray(res.getString("buttons"),JSONObject.class); + if (res.getIntValue("type") == 2) { + List buttons = JSONObject.parseArray(res.getString("buttons"), JSONObject.class); res.put("buttons", buttons); - }else { + } else { res.put("content", doc.html()); } return res; @@ -1323,14 +1344,14 @@ public class RetailAppServiceImp implements RetailAppService { if (latestConfirmNotice != null) { latestConfirmNotice.put("id", latestConfirmNotice.getString("notice_id")); latestConfirmNotice.remove("notice_id"); - List buttons = JSONObject.parseArray(latestConfirmNotice.getString("buttons"),JSONObject.class); + List buttons = JSONObject.parseArray(latestConfirmNotice.getString("buttons"), JSONObject.class); latestConfirmNotice.put("buttons", buttons); String content = latestConfirmNotice.getString("content"); - if (content.indexOf("%excharge_rate%")>0) { + if (content.indexOf("%excharge_rate%") > 0) { JSONObject rate = merchantInfoProvider.clientCurrentRate(client_id, new Date(), "CB_BankPay"); if (rate != null) { content = content.replace("%excharge_rate%", (rate.getBigDecimal("rate_value").setScale(2, BigDecimal.ROUND_DOWN).toPlainString() + "%")); - }else { + } else { content = content.replace("%excharge_rate%", "(暂未配置)"); } } @@ -1343,10 +1364,10 @@ public class RetailAppServiceImp implements RetailAppService { String EndDate = DateFormatUtils.format(rate.getDate("expiry_date"), "yyyy-MM-dd"); String[] rateName = {"清算时间", "签约费率", "结束时间"}; String[] rateKey = {cleanDays, rateValue, EndDate}; - for(int i =0;i { try { @@ -2008,23 +2029,23 @@ public class RetailAppServiceImp implements RetailAppService { throw new EmailException("Email Sending Failed", e); } }); - stringRedisTemplate.boundValueOps(getUpdateAccountEmailKey(codeKey)).set(codeKeyValue+"&"+email.getString("contact_email"), 5, TimeUnit.MINUTES); + stringRedisTemplate.boundValueOps(getUpdateAccountEmailKey(codeKey)).set(codeKeyValue + "&" + email.getString("contact_email"), 5, TimeUnit.MINUTES); } @Override public void updateAccountEmail(JSONObject device, JSONObject params) { String key = stringRedisTemplate.boundValueOps(getUpdateAccountEmailKey(device.getString("account_id"))).get(); - if(key == null){ + if (key == null) { throw new BadRequestException("Captcha has expired"); } String captcha = key.split("&")[0]; String email = key.split("&")[1]; - if(!StringUtils.equals(captcha,params.getString("captcha"))){ + if (!StringUtils.equals(captcha, params.getString("captcha"))) { throw new BadRequestException("Verification code is wrong"); } - JSONObject account = new JSONObject(); - account.put("account_id",device.getString("account_id")); - account.put("contact_email",email); + JSONObject account = new JSONObject(); + account.put("account_id", device.getString("account_id")); + account.put("contact_email", email); clientAccountMapper.update(account); deleteAccountEmailKey(device.getString("account_id")); } @@ -2033,7 +2054,7 @@ public class RetailAppServiceImp implements RetailAppService { public void bindAccountPhone(JSONObject device, JSONObject phone) { String codeKey = device.getString("account_id"); String codeKeyValueRedis = stringRedisTemplate.boundValueOps(getUpdateAccountPhoneKey(codeKey)).get(); - if(StringUtils.isNotEmpty(codeKeyValueRedis)){ + if (StringUtils.isNotEmpty(codeKeyValueRedis)) { throw new BadRequestException("Captcha has been sent.Please check your phone or try again in 5 minutes."); } String codeKeyValue = RandomStringUtils.random(6, false, true); @@ -2050,25 +2071,25 @@ public class RetailAppServiceImp implements RetailAppService { e.printStackTrace(); throw new ServerErrorException("Phone number is wrong.Please try again."); } - stringRedisTemplate.boundValueOps(getUpdateAccountPhoneKey(codeKey)).set(codeKeyValue+"&"+nationCode+"&"+phoneNumber, Long.parseLong(expireMin), TimeUnit.MINUTES); + stringRedisTemplate.boundValueOps(getUpdateAccountPhoneKey(codeKey)).set(codeKeyValue + "&" + nationCode + "&" + phoneNumber, Long.parseLong(expireMin), TimeUnit.MINUTES); } @Override public void updateAccountPhone(JSONObject device, JSONObject params) { String key = stringRedisTemplate.boundValueOps(getUpdateAccountPhoneKey(device.getString("account_id"))).get(); - if(key == null){ + if (key == null) { throw new BadRequestException("Captcha has expired"); } String captcha = key.split("&")[0]; String nation_code = key.split("&")[1]; String contact_phone = key.split("&")[2]; - if(!StringUtils.equals(captcha,params.getString("captcha"))){ + if (!StringUtils.equals(captcha, params.getString("captcha"))) { throw new BadRequestException("Verification code is wrong"); } - JSONObject account = new JSONObject(); - account.put("account_id",device.getString("account_id")); - account.put("contact_phone",contact_phone); - account.put("nation_code","+" + nation_code); + JSONObject account = new JSONObject(); + account.put("account_id", device.getString("account_id")); + account.put("contact_phone", contact_phone); + account.put("nation_code", "+" + nation_code); clientAccountMapper.update(account); deleteAccountPhoneKey(device.getString("account_id")); } @@ -2112,7 +2133,7 @@ public class RetailAppServiceImp implements RetailAppService { } @Override - public JSONObject toggleCBBankChannel(JSONObject device,String noticeId) { + public JSONObject toggleCBBankChannel(JSONObject device, String noticeId) { String clientType = device.getString("client_type"); deviceSupport.findRegister(clientType); JSONObject account = clientAccountMapper.findById(device.getString("account_id")); @@ -2135,7 +2156,7 @@ public class RetailAppServiceImp implements RetailAppService { } @Override - public JSONObject toggleCBBankCustomerSurcharge(JSONObject device,boolean customerSurcharge) { + public JSONObject toggleCBBankCustomerSurcharge(JSONObject device, boolean customerSurcharge) { String clientType = device.getString("client_type"); deviceSupport.findRegister(clientType); JSONObject account = clientAccountMapper.findById(device.getString("account_id")); @@ -2150,7 +2171,7 @@ public class RetailAppServiceImp implements RetailAppService { result.put("status", "Fail"); if (customerSurcharge) { result.put("message", "开启客户支付手续费失败,失败原因:" + e.getMessage()); - }else { + } else { result.put("message", "关闭客户支付手续费失败,失败原因:" + e.getMessage()); } @@ -2160,7 +2181,7 @@ public class RetailAppServiceImp implements RetailAppService { result.put("status", "Success"); if (customerSurcharge) { result.put("message", "开启客户支付手续费成功!"); - }else { + } else { result.put("message", "关闭客户支付手续费成功!"); } result.put("customerSurcharge", String.valueOf(customerSurcharge)); @@ -2219,20 +2240,20 @@ public class RetailAppServiceImp implements RetailAppService { } } - private void deleteAccountEmailKey(String codeKey){ + private void deleteAccountEmailKey(String codeKey) { stringRedisTemplate.delete(getUpdateAccountEmailKey(codeKey)); } - private void deleteAccountPhoneKey(String codeKey){ + private void deleteAccountPhoneKey(String codeKey) { stringRedisTemplate.delete(getUpdateAccountPhoneKey(codeKey)); } - private String getUpdateAccountEmailKey(String codeKey){ - return BIND_ACCOUNT_EMAIL_PREFIX+codeKey; + private String getUpdateAccountEmailKey(String codeKey) { + return BIND_ACCOUNT_EMAIL_PREFIX + codeKey; } - private String getUpdateAccountPhoneKey(String codeKey){ - return BIND_ACCOUNT_PHONE_PREFIX+codeKey; + private String getUpdateAccountPhoneKey(String codeKey) { + return BIND_ACCOUNT_PHONE_PREFIX + codeKey; } } 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 011bad9b0..4f9da3115 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 @@ -103,6 +103,12 @@ public class RetailAppController { return retailAppService.getTransactionCommonData(device, appQueryBean); } + // 查询7天的交易金额 + @RequestMapping(value = "/common/week", method = RequestMethod.GET) + public List getTransactionCommonWeekData(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, AppQueryBean appQueryBean) { + return retailAppService.getTransactionCommonWeekData(device, appQueryBean); + } + /** * 流水页今日数据 * diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml index 8e83ce3af..9b24992e3 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml @@ -881,6 +881,35 @@ + +