fix 商户清算列表在发送邮件之前不显示清算记录

master
eason 7 years ago
parent 9b047f6541
commit 5f95e05c4c

@ -546,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 sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("report_date"));
if (sendMailLog == null) { if (sendMailLog == null) {
result.put("padding", true); logs.remove(0);
} }else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) {
if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) { logs.remove(0);
result.put("padding", true);
} }
} }
} }
JSONObject result = PageListUtils.buildPageListResult(logs);
return result; return result;
} }

@ -2647,18 +2647,17 @@ 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 sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time"));
if (sendMailLog == null) { if (sendMailLog == null) {
result.put("padding", true); logs.remove(0);
} }else if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) {
if (sendMailLog != null && sendMailLog.getIntValue("mail_status") != 1) { logs.remove(0);
result.put("padding", true);
} }
} }
} }
JSONObject result = PageListUtils.buildPageListResult(logs);
return result; return result;
} }

Loading…
Cancel
Save