|
|
|
@ -110,6 +110,7 @@ public class TradeSecureFile {
|
|
|
|
|
private BigDecimal exchangeRate;
|
|
|
|
|
private String transactionType;
|
|
|
|
|
private Date transactionTime;
|
|
|
|
|
private String ip;
|
|
|
|
|
|
|
|
|
|
public TradeItem(JSONObject item) {
|
|
|
|
|
clientMoniker = item.getString("client_moniker");
|
|
|
|
@ -122,11 +123,13 @@ public class TradeSecureFile {
|
|
|
|
|
clearingAmount = CurrencyAmountUtils.scale(item.getBigDecimal("clearing_amount"), PlatformEnvironment.getEnv().getForeignCurrency());
|
|
|
|
|
exchangeRate = item.getBigDecimal("exchange_rate");
|
|
|
|
|
transactionTime = item.getDate("transaction_time");
|
|
|
|
|
ip = item.getString("customer_ip");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String line() {
|
|
|
|
|
String[] columns = {clientMoniker, orderId, channel, gateway.toString(), price.toPlainString(), clearingAmount.toPlainString(), currency,
|
|
|
|
|
exchangeRate.toPlainString(), filterStatus(), new DateTime(transactionTime).withZone(zone).toString("yyyy-MM-dd HH:mm:ss")};
|
|
|
|
|
String[] columns = {clientMoniker, orderId, channel, gateway.toString(), price.toPlainString(),
|
|
|
|
|
clearingAmount.toPlainString(), currency, exchangeRate.toPlainString(), filterStatus(),
|
|
|
|
|
new DateTime(transactionTime).withZone(zone).toString("yyyy-MM-dd HH:mm:ss"), ip};
|
|
|
|
|
return String.join("|", columns);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|