From df189f70baaddcdfb73f95d87a5f1b31149c9434 Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Fri, 20 Apr 2018 18:23:45 +0800 Subject: [PATCH] fix --- src/db/modify.sql | 6 +++++- .../core/impls/RetailAppServiceImp.java | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/db/modify.sql b/src/db/modify.sql index 71486e620..982cf73fe 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -356,4 +356,8 @@ ALTER TABLE `pmt_transactions` ADD COLUMN `input_amount` decimal(20,2) NULL AFTER `clearing_amount`; ALTER TABLE `pmt_transactions` -ADD COLUMN `surcharge_cashback` decimal(10,4) default 0 after `royalpay_surcharge` comment '返现至营销账户'; \ No newline at end of file +ADD COLUMN `surcharge_cashback` decimal(10,4) default 0 after `royalpay_surcharge` comment '返现至营销账户'; + + + +ALTER TABLE sys_clients ADD store_photo VARCHAR(200) NULL; \ No newline at end of file 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 6f32535a2..32ac37f2e 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 @@ -13,6 +13,7 @@ import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper; import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper; import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper; +import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper; import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; @@ -147,6 +148,8 @@ public class RetailAppServiceImp implements RetailAppService { private TradeLogService tradeLogService; @Resource private AppActService appActService; + @Resource + private LogSettleMailMapper logSettleMailMapper; private Map senderMap = new HashMap<>(); @@ -372,7 +375,19 @@ public class RetailAppServiceImp implements RetailAppService { PageList logs = clearingDetailMapper.listClientSettlementLog(params, new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("report_date.desc"))); logs.forEach(log -> log.put("total_charge",log.getBigDecimal("total_charge").add(log.getBigDecimal("tax_amount")))); - return PageListUtils.buildPageListResult(logs); + JSONObject result = PageListUtils.buildPageListResult(logs); + if (appQueryBean.getPage()==1){ + if (!logs.isEmpty() && logs.size()>0){ + JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date")); + if (sendMailLog == null) { + result.put("padding",true); + } + if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) { + result.put("padding",true); + } + } + } + return result; } @Override