поправил баг в gateway
This commit is contained in:
parent
656920e1ac
commit
8da9583854
3 changed files with 6 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
||||||
super(kafkaQueue, kafkaProducer);
|
super(kafkaQueue, kafkaProducer);
|
||||||
this.restTemplate = restTemplate;
|
this.restTemplate = restTemplate;
|
||||||
this.userRoleVerification = userRoleVerification;
|
this.userRoleVerification = userRoleVerification;
|
||||||
this.inboundServerSettings = null;
|
this.inboundServerSettings = gatewayApiSettings.getInboundServer();
|
||||||
this.sentAssets = sentAssets;
|
this.sentAssets = sentAssets;
|
||||||
this.outboundRequestByUuid = outboundRequestByUuid;
|
this.outboundRequestByUuid = outboundRequestByUuid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ public class MoneyMarketSecurityRequestAdapter {
|
||||||
|
|
||||||
public MoneyMarketSecurityNewRequest toMoneyMarketSecurityNewRequest(ExchangeInstrument exchangeInstrument) {
|
public MoneyMarketSecurityNewRequest toMoneyMarketSecurityNewRequest(ExchangeInstrument exchangeInstrument) {
|
||||||
MoneyMarketSecurityNewRequest moneyMarketSecurityNewRequest = new MoneyMarketSecurityNewRequest();
|
MoneyMarketSecurityNewRequest moneyMarketSecurityNewRequest = new MoneyMarketSecurityNewRequest();
|
||||||
|
moneyMarketSecurityNewRequest.setSecuritySymbol(exchangeInstrument.getCode().substring(0, 6));
|
||||||
moneyMarketSecurityNewRequest.setNominalCurrency(exchangeInstrument.getSettlementCurrencyLetterCode());
|
moneyMarketSecurityNewRequest.setNominalCurrency(exchangeInstrument.getSettlementCurrencyLetterCode());
|
||||||
moneyMarketSecurityNewRequest.setInstrumentType(InstrumentType.RATE.getKey());
|
moneyMarketSecurityNewRequest.setInstrumentType(InstrumentType.RATE.getKey());
|
||||||
moneyMarketSecurityNewRequest.setShortName(exchangeInstrument.getName());
|
moneyMarketSecurityNewRequest.setShortName(exchangeInstrument.getName());
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.spcex.clearing.gatewayapi.service.processor;
|
package ru.spcex.clearing.gatewayapi.service.processor;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -31,6 +32,9 @@ public class ListingMMProcessor {
|
||||||
for (ExchangeInstrument exchangeInstrument : exchangeInstrumentList) {
|
for (ExchangeInstrument exchangeInstrument : exchangeInstrumentList) {
|
||||||
UUID exchangeInstrumentId = exchangeInstrument.getId();
|
UUID exchangeInstrumentId = exchangeInstrument.getId();
|
||||||
log.debug("Process exchangeInstrumentId : {}", exchangeInstrumentId);
|
log.debug("Process exchangeInstrumentId : {}", exchangeInstrumentId);
|
||||||
|
if (StringUtils.isEmpty(exchangeInstrument.getCode()) || exchangeInstrument.getCode().length() < 6) {
|
||||||
|
log.warn("Incorrect code : {}, skip record", exchangeInstrument.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
MoneyMarketSecurityNewRequest moneyMarketSecurityNewRequest = moneyMarketSecurityRequestAdapter
|
MoneyMarketSecurityNewRequest moneyMarketSecurityNewRequest = moneyMarketSecurityRequestAdapter
|
||||||
.toMoneyMarketSecurityNewRequest(exchangeInstrument);
|
.toMoneyMarketSecurityNewRequest(exchangeInstrument);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue