refactoring
This commit is contained in:
parent
096a059857
commit
bb6b43a390
1 changed files with 6 additions and 6 deletions
|
|
@ -128,7 +128,7 @@ public class TaskListener extends QueueConsumer implements InitializingBean {
|
||||||
log.warn("Unsupported overnightType={} for registry id={}", overnightType, registry.getId());
|
log.warn("Unsupported overnightType={} for registry id={}", overnightType, registry.getId());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error while processing registryId={}", registryId, e);
|
log.error("Error while processing registryId={}, ex: {}", registryId, ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("CROR createOrder finished");
|
log.info("CROR createOrder finished");
|
||||||
|
|
@ -157,20 +157,20 @@ public class TaskListener extends QueueConsumer implements InitializingBean {
|
||||||
kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, newReq);
|
kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, newReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("export to tri...");
|
|
||||||
try {
|
try {
|
||||||
|
log.info("export to tri...");
|
||||||
Collection<OrderCurrency> orders = imdgQueryService.getClccOrderCurrencyIds();
|
Collection<OrderCurrency> orders = imdgQueryService.getClccOrderCurrencyIds();
|
||||||
String content = orderCurrencyTriExportService.exportToTri(orders);
|
String content = orderCurrencyTriExportService.exportToTri(orders);
|
||||||
Path fileName = storagePath.resolve(String.format("KS_TS_ORDERS_%s.tri",
|
Path fileName = storagePath.resolve(String.format("KS_TS_ORDERS_%s.tri",
|
||||||
LocalDateTime.now().format(formatter)));
|
LocalDateTime.now().format(formatter)));
|
||||||
Files.writeString(fileName, content, winCharset);
|
Files.writeString(fileName, content, winCharset);
|
||||||
if (SendOrdersTypes.FIX == sendOrdersTypes) {
|
|
||||||
log.info("send command to fix service...");
|
|
||||||
kafkaSender.sendRequestToQueue(Consts.SDOR_FIX_TASK, req.getRequestPayload());
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Error while import order currency to tri file: {}", ExceptionUtils.getStackTrace(e));
|
log.error("Error while import order currency to tri file: {}", ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
|
if (SendOrdersTypes.FIX == sendOrdersTypes) {
|
||||||
|
log.info("send command to fix service...");
|
||||||
|
kafkaSender.sendRequestToQueue(Consts.SDOR_FIX_TASK, req.getRequestPayload());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String checkBalance(OrderCurrency orderCurrency) {
|
private String checkBalance(OrderCurrency orderCurrency) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue