This commit is contained in:
parent
da566c4c81
commit
60da507f71
1 changed files with 20 additions and 17 deletions
|
|
@ -186,7 +186,7 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
if (InstrumentType.BOND.equalsByKey(req.getSecurityType())) {
|
||||
FixedIncomeGatewayRequest fixedIncomeGatewayRequest = (FixedIncomeGatewayRequest) req;
|
||||
FixedIncomeSecurityNewRequest fixedIncomeRequest = fixedIncomeGatewayRequest.getSecurity();
|
||||
if (StringUtils.isEmpty(fixedIncomeRequest.getSecuritySymbol())){
|
||||
if (StringUtils.isEmpty(fixedIncomeRequest.getSecuritySymbol())) {
|
||||
log.warn("Skip creating eqtySecurtity without securityId: uuid: {}", req.getUuid());
|
||||
return null;
|
||||
}
|
||||
|
|
@ -206,7 +206,7 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
if (InstrumentType.EQTY.equalsByKey(req.getSecurityType())) {
|
||||
EquitySecurityGatewayRequest equitySecurityGatewayRequest = (EquitySecurityGatewayRequest) req;
|
||||
EquitySecurityNewRequest equityRequest = equitySecurityGatewayRequest.getSecurity();
|
||||
if (StringUtils.isEmpty(equityRequest.getSecuritySymbol())){
|
||||
if (StringUtils.isEmpty(equityRequest.getSecuritySymbol())) {
|
||||
log.warn("Skip creating eqtySecurtity without securityId: uuid: {}", req.getUuid());
|
||||
return null;
|
||||
}
|
||||
|
|
@ -244,8 +244,8 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
if (req.getFixedIncomesCashFlow() == null)
|
||||
req.setFixedIncomesCashFlow(new ArrayList<>());
|
||||
|
||||
try {
|
||||
for (Object partRequestO : req.getListing()) {
|
||||
for (Object partRequestO : req.getListing()) {
|
||||
try {
|
||||
ListingNewRequest partRequest = (ListingNewRequest) partRequestO;
|
||||
partRequest.setSecurityId(securityId);
|
||||
Listing existListing = findListing(partRequest);
|
||||
|
|
@ -259,13 +259,15 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
Listing listing = listingService.updateListing0(partUpdateRequest);
|
||||
log.debug("Has updated listing.id={}", listing.getId());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update listing: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update listing: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
try {
|
||||
for (CouponPeriodNewRequest partRequest : (List<CouponPeriodNewRequest>) req.getCouponPeriods()) {
|
||||
|
||||
|
||||
for (CouponPeriodNewRequest partRequest : (List<CouponPeriodNewRequest>) req.getCouponPeriods()) {
|
||||
try {
|
||||
partRequest.setSecurityId(securityId);
|
||||
CouponPeriod existCouponPeriod = findCouponPeriod(partRequest);
|
||||
if (existCouponPeriod == null) {
|
||||
|
|
@ -278,13 +280,14 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
CouponPeriod couponPeriod = couponPeriodService.updateCouponPeriod0(partUpdateRequest);
|
||||
log.debug("Has update couponPeriod.id={}", couponPeriod.getId());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update couponPeriod: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update couponPeriod: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
try {
|
||||
for (FixedIncomeCashFlowNewRequest partRequest : (List<FixedIncomeCashFlowNewRequest>) req.getFixedIncomesCashFlow()) {
|
||||
|
||||
for (FixedIncomeCashFlowNewRequest partRequest : (List<FixedIncomeCashFlowNewRequest>) req.getFixedIncomesCashFlow()) {
|
||||
try {
|
||||
partRequest.setSecuritySymbol(String.valueOf(securityId)); // не getSecuritySymbol
|
||||
FixedIncomeCashFlow existFixedIncomeCashFlow = findFixedIncomeCashFlow(partRequest);
|
||||
if (existFixedIncomeCashFlow == null) {
|
||||
|
|
@ -297,10 +300,10 @@ public class GatewaySecurityService extends QueueConsumer implements Initializin
|
|||
FixedIncomeCashFlow fixedIncomeCashFlow = fixedIncomeCashFlowService.fixedIncomeCashFlowUpdate0(partUpdateRequest);
|
||||
log.debug("Has update fixedIncomeCashFlow.id={}", fixedIncomeCashFlow.getId());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update fixedIncomeCashFlow: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
} catch (ValidationException expected) {
|
||||
log.warn("Error create or update fixedIncomeCashFlow: {}", expected.toString());
|
||||
return requestHelper.makeErrorResponse(baseRequest, expected.getEnumMsg());
|
||||
}
|
||||
|
||||
log.debug("successfully processed, request id {}", baseRequest.getId());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue