This commit is contained in:
parent
add502ed0b
commit
dd7595256c
3 changed files with 16 additions and 14 deletions
|
|
@ -177,11 +177,10 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
|
|||
sTrades.removeIf(sTrd -> {
|
||||
Side sTrdSide = IEnumKey.getEnumByKey(Side.class, sTrd.getOperation());
|
||||
if (sTrdSide == null || !(sTrdSide.equals(Side.BUY) || sTrdSide.equals(Side.SELL))) {
|
||||
logNotifyW(format(
|
||||
log.warn(format(
|
||||
"cannot parse strade.tradeNum=%d strade.operation %s",
|
||||
sTrd.getTradeNum(),
|
||||
sTrd.getOperation())
|
||||
);
|
||||
sTrd.getOperation()));
|
||||
return true;
|
||||
}
|
||||
// MoneyFlowSide excDepSide = sTrdSide == Side.BUY ? MoneyFlowSide.BUY : MoneyFlowSide.SELL;
|
||||
|
|
@ -202,7 +201,8 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
|
|||
IValidator validator = valFor(sTrd);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
if (error.isPresent()) {
|
||||
logError(sTrd.getTradeNum(), error.get());
|
||||
String err = format("Сделка № %d не смогла быть обработана. %s", sTrd.getTradeNum(), msgResolver.resolve(error.get()));
|
||||
logNotifyE(err);
|
||||
continue;
|
||||
}
|
||||
ExecutionCurrency newEC;
|
||||
|
|
@ -231,7 +231,7 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
|
|||
String err = String.format("When create new ExecutionCurrency by STrade[%d] error: %s",
|
||||
sTrd.getId(),
|
||||
ExceptionUtils.getStackTrace(e));
|
||||
logNotifyE(err);
|
||||
log.error(err);
|
||||
}
|
||||
}
|
||||
log.info("batch putAll {} ExecutionCurrency", execsToInsert.size());
|
||||
|
|
@ -365,7 +365,7 @@ public class ExecutionCurrencyComponent implements IExecutionUploadComponent {
|
|||
private void logError(IEnumId subject, Object... args) {
|
||||
String err = msgResolver.resolve(new EnumMessage(subject, args));
|
||||
log.info("{}", err);
|
||||
notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
// notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
}
|
||||
|
||||
private void logError(Long sTradeNum, EnumMessage msg) {
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
|
|||
sTrades.removeIf(sTrd -> {
|
||||
Side sTrdSide = IEnumKey.getEnumByKey(Side.class, sTrd.getOperation());
|
||||
if (sTrdSide == null || !(sTrdSide.equals(Side.BUY) || sTrdSide.equals(Side.SELL))) {
|
||||
logNotifyW(format(
|
||||
log.warn(format(
|
||||
"cannot parse strade.tradeNum=%d strade.operation %s",
|
||||
sTrd.getTradeNum(),
|
||||
sTrd.getOperation())
|
||||
|
|
@ -188,7 +188,8 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
|
|||
IValidator validator = valFor(sTrd);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
if (error.isPresent()) {
|
||||
logError(sTrd.getTradeNum(), error.get());
|
||||
String err = format("Сделка № %d не смогла быть обработана. %s", sTrd.getTradeNum(), msgResolver.resolve(error.get()));
|
||||
logNotifyE(err);
|
||||
continue;
|
||||
}
|
||||
ExecutionDeposit newED;
|
||||
|
|
@ -217,7 +218,7 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
|
|||
String err = String.format("When create new ExecutionDeposit by STrade[%d] error: %s",
|
||||
sTrd.getId(),
|
||||
ExceptionUtils.getStackTrace(e));
|
||||
logNotifyE(err);
|
||||
log.error(err);
|
||||
}
|
||||
}
|
||||
log.info("batch putAll {} ExecutionDeposit", execsToInsert.size());
|
||||
|
|
@ -353,7 +354,7 @@ public class ExecutionDepositComponent implements IExecutionUploadComponent {
|
|||
private void logError(IEnumId subject, Object... args) {
|
||||
String err = msgResolver.resolve(new EnumMessage(subject, args));
|
||||
log.info("{}", err);
|
||||
notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
// notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
|
|||
sTrades.removeIf(sTrd -> {
|
||||
Side sTrdSide = IEnumKey.getEnumByKey(Side.class, sTrd.getOperation());
|
||||
if (sTrdSide == null || !(sTrdSide.equals(Side.BUY) || sTrdSide.equals(Side.SELL))) {
|
||||
logNotifyW(format(
|
||||
log.warn(format(
|
||||
"cannot parse strade.tradeNum=%d strade.operation %s",
|
||||
sTrd.getTradeNum(),
|
||||
sTrd.getOperation())
|
||||
|
|
@ -212,7 +212,8 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
|
|||
IValidator validator = valFor(sTrd);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
if (error.isPresent()) {
|
||||
logError(sTrd.getId(), error.get());
|
||||
String err = format("Сделка № %d не смогла быть обработана. %s", sTrd.getTradeNum(), msgResolver.resolve(error.get()));
|
||||
logNotifyE(err);
|
||||
continue;
|
||||
}
|
||||
ExecutionFond newED;
|
||||
|
|
@ -241,7 +242,7 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
|
|||
String err = String.format("When create new ExecutionFond by STrade[%d] error: %s",
|
||||
sTrd.getId(),
|
||||
ExceptionUtils.getStackTrace(e));
|
||||
logNotifyE(err);
|
||||
log.error(err);
|
||||
}
|
||||
}
|
||||
log.info("batch putAll {} ExecutionFond", execsToInsert.size());
|
||||
|
|
@ -407,7 +408,7 @@ public class ExecutionFondComponent implements IExecutionUploadComponent {
|
|||
private void logError(IEnumId subject, Object... args) {
|
||||
String err = msgResolver.resolve(new EnumMessage(subject, args));
|
||||
log.info("{}", err);
|
||||
notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
// notifications.sendNotification(ObjectType.vfrs, err, Priority.HIGH);
|
||||
}
|
||||
|
||||
private void logError(Long sTradeId, EnumMessage msg) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue