Merge remote-tracking branch 'origin/develop' into develop

master
yixian 6 years ago
commit 2d18aea16b

@ -574,3 +574,10 @@ CREATE TABLE `sys_mail_unsub` (
alter table sys_clients add column ali_sub_merchant_id varchar(20) DEFAULT NULL; alter table sys_clients add column ali_sub_merchant_id varchar(20) DEFAULT NULL;
update sys_clients set ali_sub_merchant_id = client_moniker; update sys_clients set ali_sub_merchant_id = client_moniker;
ALTER TABLE `log_clearing_detail`
ADD COLUMN `settle_bank` varchar(10) NULL DEFAULT NULL COMMENT '清算来源银行(RoyalPay)' AFTER `account_name`;
update log_clearing_detail set settle_bank='CBA';
ALTER TABLE `log_clearing`
ADD COLUMN `editable` tinyint(1) NULL DEFAULT 1 COMMENT '是否可编辑' AFTER `balance`;

@ -11,10 +11,7 @@ import au.com.royalpay.payment.manage.cashback.core.CashbackService;
import au.com.royalpay.payment.manage.customers.core.CouponValidateService; import au.com.royalpay.payment.manage.customers.core.CouponValidateService;
import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl; import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService; import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper; import au.com.royalpay.payment.manage.mappers.log.*;
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.notice.NoticePartnerMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
@ -167,6 +164,8 @@ public class RetailAppServiceImp implements RetailAppService {
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
private ClientModifySupport clientModifySupport; private ClientModifySupport clientModifySupport;
@Resource
private ClearingLogMapper clearingLogMapper;
private Map<String, AppMsgSender> senderMap = new HashMap<>(); private Map<String, AppMsgSender> 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" };
@ -547,18 +546,18 @@ public class RetailAppServiceImp implements RetailAppService {
PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params, PageList<JSONObject> logs = clearingDetailMapper.listClientSettlementLog(params,
new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit(), Order.formString("report_date.desc"))); 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")))); logs.forEach(log -> log.put("total_charge", log.getBigDecimal("total_charge").add(log.getBigDecimal("tax_amount"))));
JSONObject result = PageListUtils.buildPageListResult(logs);
if (appQueryBean.getPage() == 1) { if (appQueryBean.getPage() == 1) {
if (!logs.isEmpty() && logs.size() > 0) { if (!logs.isEmpty() && logs.size() > 0) {
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date")); JSONObject clearingDetail = clearingDetailMapper.findByDetailId(logs.get(0).getIntValue("clearing_order"));
if (sendMailLog == null) { if (clearingDetail!=null){
logs.remove(0); JSONObject clearingLog = clearingLogMapper.findById(clearingDetail.getIntValue("clearing_id"));
}else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) { if(clearingLog.getBooleanValue("editable")){
logs.remove(0); result.put("padding", true);
}
} }
} }
} }
JSONObject result = PageListUtils.buildPageListResult(logs);
return result; return result;
} }

@ -14,9 +14,7 @@ import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.device.core.DeviceManager; import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper; import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper; import au.com.royalpay.payment.manage.mappers.log.*;
import au.com.royalpay.payment.manage.mappers.log.LogClientSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper; import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
import au.com.royalpay.payment.manage.mappers.system.*; import au.com.royalpay.payment.manage.mappers.system.*;
@ -260,6 +258,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private MailGunService mailGunService; private MailGunService mailGunService;
@Resource @Resource
private MailSendMapper mailSendMapper; private MailSendMapper mailSendMapper;
@Resource
private ClearingDetailMapper clearingDetailMapper;
@Resource
private ClearingLogMapper clearingLogMapper;
private static final String SOURCE_AGREE_FILE = "source_agree_file"; private static final String SOURCE_AGREE_FILE = "source_agree_file";
private static final String CLIENT_BANK_FILE = "client_bank_file"; private static final String CLIENT_BANK_FILE = "client_bank_file";
@ -2648,17 +2651,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
params.put("client_id", client_id); params.put("client_id", client_id);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc"))); new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs);
if (query.getPage() == 1) { if (query.getPage() == 1) {
if (!logs.isEmpty() && logs.size() > 0) { if (!logs.isEmpty() && logs.size() > 0) {
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time")); JSONObject clearingDetail = clearingDetailMapper.findByDetailId(logs.get(0).getIntValue("clearing_order"));
if (sendMailLog == null) { if (clearingDetail!=null){
logs.remove(0); JSONObject clearingLog = clearingLogMapper.findById(clearingDetail.getIntValue("clearing_id"));
}else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) { if(clearingLog.getBooleanValue("editable")){
logs.remove(0); result.put("padding", true);
}
} }
} }
} }
JSONObject result = PageListUtils.buildPageListResult(logs);
return result; return result;
} }

@ -12,6 +12,7 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.mappers.client.ClientCustomersMapper; import au.com.royalpay.payment.manage.mappers.client.ClientCustomersMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper; 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.ClearingDetailMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper; import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.AustracDataMapper; import au.com.royalpay.payment.manage.mappers.payment.AustracDataMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
@ -132,6 +133,8 @@ public class TradeLogServiceImpl implements TradeLogService {
private ClientCustomersMapper clientCustomersMapper; private ClientCustomersMapper clientCustomersMapper;
@Resource @Resource
LogSettleMailMapper logSettleMailMapper; LogSettleMailMapper logSettleMailMapper;
@Resource
private ClearingLogMapper clearingLogMapper;
@Resource @Resource
private OrgManager orgManager; private OrgManager orgManager;
@ -830,12 +833,12 @@ public class TradeLogServiceImpl implements TradeLogService {
result.put("analysis", transactionMapper.getClientAmountAnalysis(params)); result.put("analysis", transactionMapper.getClientAmountAnalysis(params));
if (query.getPage() == 1) { if (query.getPage() == 1) {
if (!logs.isEmpty() && logs.size() > 0) { if (!logs.isEmpty() && logs.size() > 0) {
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time")); JSONObject clearingDetail = clearingDetailMapper.findByDetailId(logs.get(0).getIntValue("clearing_order"));
if (sendMailLog == null) { if (clearingDetail!=null){
result.put("padding", true); JSONObject clearingLog = clearingLogMapper.findById(clearingDetail.getIntValue("clearing_id"));
} if(clearingLog.getBooleanValue("editable")){
if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) { result.put("padding", true);
result.put("padding", true); }
} }
} }
} }

Loading…
Cancel
Save