|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.management.clearing.core.impl;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
|
import au.com.royalpay.payment.core.beans.OrderValidationChannelResult;
|
|
|
|
|
import au.com.royalpay.payment.core.beans.OrderValidationResult;
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
|
|
|
|
@ -1577,7 +1578,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject validTransactions(Date dt, boolean fix, boolean b, boolean b1) {
|
|
|
|
|
public JSONObject validTransactions(Date dt, boolean fix, boolean b, boolean b1, boolean isSendMessage) {
|
|
|
|
|
if (!b) {
|
|
|
|
|
JSONObject reportItem = validationLogMapper.findByDate(dt);
|
|
|
|
|
if (reportItem != null) {
|
|
|
|
@ -1591,6 +1592,22 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
|
|
|
|
|
log.put("result", report.getReport().toJSONString());
|
|
|
|
|
validationLogMapper.removeByDate(dt);
|
|
|
|
|
validationLogMapper.save(log);
|
|
|
|
|
// 是否发送消息通知
|
|
|
|
|
if (isSendMessage) {
|
|
|
|
|
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
|
|
|
|
|
List<OrderValidationChannelResult> channelResults = report.getChannelResults();
|
|
|
|
|
boolean valid = channelResults.stream().map(OrderValidationChannelResult::isSuccess).reduce(Boolean::logicalAnd).orElse(true);
|
|
|
|
|
StringBuilder statusString = new StringBuilder("订单校对已完成,状态:" + (valid ? "🌤️【成功】" : "🌨️【失败】"));
|
|
|
|
|
statusString.append("\r\n");
|
|
|
|
|
for (OrderValidationChannelResult info : channelResults) {
|
|
|
|
|
if (info.isSuccess()) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
statusString.append(info.getChannel().getChannelCode()).append(": [ ").append(info.isSuccess() ? "成功" : "失败")
|
|
|
|
|
.append(StringUtils.defaultIfBlank(info.getErrorMsg(), "")).append(" ]").append("\r\n");
|
|
|
|
|
}
|
|
|
|
|
publisher.publishEvent(new TaskFinishNotifyEvent(this, PlatformEnvironment.getEnv().getCompany() + " 订单校对", statusString.toString(), developers, valid));
|
|
|
|
|
}
|
|
|
|
|
return JSON.parseObject(log.getString("result"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|