This commit is contained in:
parent
d388d5a39e
commit
6a91ce85e2
57 changed files with 325 additions and 252 deletions
|
|
@ -1,10 +1,12 @@
|
|||
package ru.spcex.clearing.gatewayapi.config;
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.gatewayapi.errors.GatewayError;
|
||||
import ru.spcex.clearing.util.security.UserRoleVerification;
|
||||
import ru.spcex.clearing.util.services.IMDGMessageResolver;
|
||||
|
|
@ -41,4 +43,12 @@ public class BeanConfiguration {
|
|||
public Map<Long, List<SentAsset>> sentAssets() {
|
||||
return new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ObjectMapper objectMapper() {
|
||||
return new ObjectMapper()
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import org.springframework.http.HttpRequest;
|
|||
import org.springframework.http.client.ClientHttpRequestExecution;
|
||||
import org.springframework.http.client.ClientHttpRequestInterceptor;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class LoggingInterceptor implements ClientHttpRequestInterceptor {
|
||||
|
|
@ -23,9 +21,6 @@ public class LoggingInterceptor implements ClientHttpRequestInterceptor {
|
|||
log.info("Request URI: {}, Request method: {} , Request headers: {}",
|
||||
request.getURI(), request.getMethod(), request.getHeaders());
|
||||
log.info("Request body: " + new String(body, StandardCharsets.UTF_8));
|
||||
ClientHttpResponse response = execution.execute(request, body);
|
||||
log.info("Response status code: " + response.getStatusCode());
|
||||
log.info("Response body: " + StreamUtils.copyToString(response.getBody(), Charset.defaultCharset()));
|
||||
return response;
|
||||
return execution.execute(request, body);
|
||||
}
|
||||
}
|
||||
|
|
@ -19,12 +19,13 @@ public class RestTemplateConfig {
|
|||
}
|
||||
|
||||
@Bean("rest-template")
|
||||
public RestTemplate restTemplate() {
|
||||
public RestTemplate restTemplate(RestTemplateErrorHandler restTemplateErrorHandler) {
|
||||
RestTemplate restTemplate = builder
|
||||
.setConnectTimeout(Duration.ofMillis(10000))
|
||||
.setReadTimeout(Duration.ofMillis(40000))
|
||||
.build();
|
||||
restTemplate.setInterceptors(Collections.singletonList(new LoggingInterceptor()));
|
||||
restTemplate.setErrorHandler(restTemplateErrorHandler);
|
||||
return restTemplate;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package ru.spcex.clearing.gatewayapi.config;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StreamUtils;
|
||||
import org.springframework.web.client.ResponseErrorHandler;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.response.ErrorResponse;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.NotificationNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.enumeration.ObjectType;
|
||||
import ru.spcex.platform.enumeration.Priority;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@Component
|
||||
public class RestTemplateErrorHandler implements ResponseErrorHandler {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final KafkaSender kafaSender;
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
public RestTemplateErrorHandler(KafkaSender kafaSender,
|
||||
ObjectMapper objectMapper) {
|
||||
this.kafaSender = kafaSender;
|
||||
this.objectMapper = objectMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasError(ClientHttpResponse response) throws IOException {
|
||||
return response.getStatusCode().is4xxClientError() || response.getStatusCode().is5xxServerError();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleError(ClientHttpResponse response) throws IOException {
|
||||
String responseErrorBody = StreamUtils.copyToString(response.getBody(), Charset.defaultCharset());
|
||||
log.info("Response error status code: " + response.getStatusCode());
|
||||
log.info("Response error body: " + responseErrorBody);
|
||||
ErrorResponse errorResponse = objectMapper.readValue(responseErrorBody, ErrorResponse.class);
|
||||
String errorMessage;
|
||||
if (StringUtils.isEmpty(errorResponse.getMessage())) {
|
||||
String error = (String) errorResponse.getUnknownProperties().get("error");
|
||||
errorMessage = String.format("Error: %s", error);
|
||||
} else {
|
||||
errorMessage = errorResponse.getMessage();
|
||||
}
|
||||
NotificationNewRequest notificationNewRequest = createNotification(errorMessage);
|
||||
kafaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, notificationNewRequest);
|
||||
}
|
||||
|
||||
private NotificationNewRequest createNotification(String message) {
|
||||
NotificationNewRequest request = new NotificationNewRequest();
|
||||
request.setObjectType(ObjectType.gateway.getKey());
|
||||
request.setPriority(Priority.LOW.getKey());
|
||||
request.setComment(String.format("Ошибка : %s", message));
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,13 +10,13 @@ import org.springframework.http.HttpStatus;
|
|||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.company.CompaniesRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.limit.LimitRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.mkr.MMListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.operations.OperationsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.response.CommonResponse;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.company.CompaniesRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.limit.LimitRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr.MMListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.OperationsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.response.CommonResponse;
|
||||
import ru.spcex.clearing.gatewayapi.exception.GatewayException;
|
||||
import ru.spcex.clearing.gatewayapi.service.OperationService;
|
||||
import ru.spcex.clearing.gatewayapi.service.processor.CompanyProcessor;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.CommonRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.company;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.limit;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.limit;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithSecurityId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithSecurityId;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.CommonRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithIssuerId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithIssuerId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithSecurityId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithSecurityId;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithSecurityId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithSecurityId;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.CommonRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.mkr;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithMapId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithMapId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.operations;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.operations;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.operations;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.response;
|
||||
package ru.spcex.clearing.gatewayapi.controller.inbound.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request;
|
||||
package ru.spcex.clearing.gatewayapi.controller.outbound.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.InstantDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.InstantWithMillisDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.config.serializers.InstantWithMillisSerializer;
|
||||
|
||||
import java.time.Instant;
|
||||
|
|
@ -34,7 +34,7 @@ public class OutboundRequest {
|
|||
private String type;
|
||||
|
||||
@JsonProperty("datetime")
|
||||
@JsonDeserialize(using = InstantDeserializer.class)
|
||||
@JsonDeserialize(using = InstantWithMillisDeserializer.class)
|
||||
@JsonSerialize(using = InstantWithMillisSerializer.class)
|
||||
@ApiModelProperty(
|
||||
value = "Передавать дату и время формирования JSON объекта в формате «ДД.ММ.ГГГГ ЧЧ:ММ:СС:ссс».",
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.outbound.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ErrorResponse {
|
||||
@JsonProperty("id")
|
||||
private UUID id;
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
|
||||
@JsonIgnore
|
||||
private final Map<String, Object> unknownProperties = new HashMap<>();
|
||||
|
||||
@JsonAnySetter
|
||||
public void add(String key, Object value) {
|
||||
unknownProperties.put(key, value);
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Map<String, Object> getUnknownProperties() {
|
||||
return unknownProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ErrorResponse{" +
|
||||
"id=" + id +
|
||||
", message='" + message + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.outbound.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.InstantWithMillisDeserializer;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SuccessResponse {
|
||||
@JsonProperty("id")
|
||||
private UUID id;
|
||||
@JsonProperty("datetime")
|
||||
@JsonDeserialize(using = InstantWithMillisDeserializer.class)
|
||||
private Instant datetime;
|
||||
@JsonProperty("section")
|
||||
private String section;
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
@JsonIgnore
|
||||
private final Map<String, Object> unknownProperties = new HashMap<>();
|
||||
|
||||
@JsonAnySetter
|
||||
public void add(String key, Object value) {
|
||||
unknownProperties.put(key, value);
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Instant getDatetime() {
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setDatetime(Instant datetime) {
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SuccessResponse{" +
|
||||
"id=" + id +
|
||||
", datetime=" + datetime +
|
||||
", section='" + section + '\'' +
|
||||
", type='" + type + '\'' +
|
||||
", unknownProperties=" + unknownProperties +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.request.listing.fond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@ApiModel("Профиль компании эмитента")
|
||||
public class IssuerCompanyInfo implements WithCompanyId {
|
||||
@JsonProperty("company_id")
|
||||
@ApiModelProperty(
|
||||
value = "Ссылка на company",
|
||||
example = "ef47f76c-bcea-11ed-afa1-0242ac120003"
|
||||
)
|
||||
private UUID companyId;
|
||||
|
||||
@JsonProperty("country_code")
|
||||
@ApiModelProperty(value = "RUS", example = "RUS")
|
||||
private String countryCode;
|
||||
|
||||
@JsonProperty("legal_kind")
|
||||
@ApiModelProperty(value = "JURD", example = "JURD")
|
||||
private String legalKind;
|
||||
|
||||
@JsonProperty("organization_type")
|
||||
@ApiModelProperty(
|
||||
value = """
|
||||
«CRED», если Основные сведения\\Кредитная организация = true
|
||||
«NCRD», если Основные сведения\\Кредитная организация = false
|
||||
""",
|
||||
example = "CRED"
|
||||
)
|
||||
private String organizationType;
|
||||
|
||||
@JsonProperty("residence")
|
||||
@ApiModelProperty(
|
||||
value = "Резиденция. Трехсимвольный код страны из классификатора ОКСМ.",
|
||||
example = "RUS"
|
||||
)
|
||||
private String residence;
|
||||
|
||||
@JsonProperty("short_name_eng")
|
||||
@ApiModelProperty(
|
||||
value = "Основные сведения\\Сокращенное наименование на английском языке",
|
||||
example = "VTB (PJSC)"
|
||||
)
|
||||
private String shortNameEng;
|
||||
|
||||
@JsonProperty("full_name_eng")
|
||||
@ApiModelProperty(
|
||||
value = "Основные сведения\\Полное наименование на английском языке",
|
||||
example = "VTB (public joint stock company)"
|
||||
)
|
||||
private String fullNameEng;
|
||||
|
||||
@Override
|
||||
public UUID getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(UUID companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCountryCode() {
|
||||
return countryCode;
|
||||
}
|
||||
|
||||
public void setCountryCode(String countryCode) {
|
||||
this.countryCode = countryCode;
|
||||
}
|
||||
|
||||
public String getLegalKind() {
|
||||
return legalKind;
|
||||
}
|
||||
|
||||
public void setLegalKind(String legalKind) {
|
||||
this.legalKind = legalKind;
|
||||
}
|
||||
|
||||
public String getOrganizationType() {
|
||||
return organizationType;
|
||||
}
|
||||
|
||||
public void setOrganizationType(String organizationType) {
|
||||
this.organizationType = organizationType;
|
||||
}
|
||||
|
||||
public String getResidence() {
|
||||
return residence;
|
||||
}
|
||||
|
||||
public void setResidence(String residence) {
|
||||
this.residence = residence;
|
||||
}
|
||||
|
||||
public String getShortNameEng() {
|
||||
return shortNameEng;
|
||||
}
|
||||
|
||||
public void setShortNameEng(String shortNameEng) {
|
||||
this.shortNameEng = shortNameEng;
|
||||
}
|
||||
|
||||
public String getFullNameEng() {
|
||||
return fullNameEng;
|
||||
}
|
||||
|
||||
public void setFullNameEng(String fullNameEng) {
|
||||
this.fullNameEng = fullNameEng;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.spcex.clearing.gatewayapi.exception;
|
||||
|
||||
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.CommonRequest;
|
||||
import ru.spcex.clearing.gatewayapi.errors.GatewayError;
|
||||
|
||||
public class GatewayException extends RuntimeException {
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import org.springframework.beans.factory.InitializingBean;
|
|||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.HttpClientErrorException;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import ru.spcex.clearing.gatewayapi.config.GatewayApiSettings;
|
||||
import ru.spcex.clearing.gatewayapi.config.InboundServerSettings;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.response.SuccessResponse;
|
||||
import ru.spcex.clearing.gatewayapi.enums.OutboundRequestType;
|
||||
import ru.spcex.clearing.gatewayapi.service.builders.OutboundRequestBuilder;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
|
|
@ -88,9 +88,9 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
.build();
|
||||
HttpEntity<OutboundRequest> request = makeDefaultRequest(outboundFondRequest);
|
||||
|
||||
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, request, Map.class);
|
||||
Map bodyResponse = response.getBody();
|
||||
log.debug("LOCM task complete, response from : {}", bodyResponse);
|
||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, request, SuccessResponse.class);
|
||||
SuccessResponse bodyResponse = response.getBody();
|
||||
log.debug("LOCM task complete, success response : {}", bodyResponse);
|
||||
}
|
||||
|
||||
public void requestOnLimit(BaseRequest<LimExportedRequest> userRequest) {
|
||||
|
|
@ -106,14 +106,9 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
.build();
|
||||
|
||||
HttpEntity<OutboundRequest> request = makeDefaultRequest(outboundFondRequest);
|
||||
try {
|
||||
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, request, Map.class);
|
||||
Map bodyResponse = response.getBody();
|
||||
log.debug("Limit request complete, response: {}", bodyResponse);
|
||||
} catch (HttpClientErrorException httpClientErrorException) {
|
||||
//ignore
|
||||
// log.warn("");
|
||||
}
|
||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, request, SuccessResponse.class);
|
||||
SuccessResponse bodyResponse = response.getBody();
|
||||
log.debug("Limit request complete, success response: {}", bodyResponse);
|
||||
}
|
||||
|
||||
public void requestOnDemandSecurity(BaseRequest<GatewayTaskRequest> userRequest) {
|
||||
|
|
@ -139,12 +134,12 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
HttpEntity<OutboundRequest> requestFond = makeDefaultRequest(outboundFondRequest);
|
||||
HttpEntity<OutboundRequest> requestMKR = makeDefaultRequest(outboundMkrRequest);
|
||||
|
||||
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, requestFond, Map.class);
|
||||
Map bodyResponse = response.getBody();
|
||||
log.debug("LOSC task 1/2 complete (FOND section), response: {}", bodyResponse);
|
||||
response = restTemplate.exchange(url, HttpMethod.POST, requestMKR, Map.class);
|
||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, requestFond, SuccessResponse.class);
|
||||
SuccessResponse bodyResponse = response.getBody();
|
||||
log.debug("LOSC task 1/2 complete (FOND section), success response: {}", bodyResponse);
|
||||
response = restTemplate.exchange(url, HttpMethod.POST, requestMKR, SuccessResponse.class);
|
||||
bodyResponse = response.getBody();
|
||||
log.debug("LOSC task 2/2 complete (MKR section), response: {}", bodyResponse);
|
||||
log.debug("LOSC task 2/2 complete (MKR section), success response: {}", bodyResponse);
|
||||
}
|
||||
|
||||
public void requestOnAsset(BaseRequest<AssetOperationListRequest> request) {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ package ru.spcex.clearing.gatewayapi.service;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerCompany;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerCompanySymbols;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerContact;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerCompany;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerCompanySymbols;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerContact;
|
||||
import ru.spcex.clearing.gatewayapi.service.adapter.IssuerCompanyRequestAdapter;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanySymbolNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.ContactNewRequest;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package ru.spcex.clearing.gatewayapi.service;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.operations.OperationsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.OperationsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.SentAsset;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.AssetOperationApprovalRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.SingleAssetResponse;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package ru.spcex.clearing.gatewayapi.service;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithSecurityId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.*;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithSecurityId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.*;
|
||||
import ru.spcex.clearing.gatewayapi.service.adapter.SecurityRequestAdapter;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.EquitySecurityGatewayRequest;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.adapter;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.company.*;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.company.*;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.*;
|
||||
import ru.spcex.platform.enumeration.CompanySymbol;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.adapter;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerCompany;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerCompanyInfo;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerCompanySymbols;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IssuerContact;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerCompany;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerCompanyInfo;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerCompanySymbols;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IssuerContact;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanyInfoUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanyNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanySymbolNewRequest;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.adapter;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.mkr.ExchangeInstrument;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr.ExchangeInstrument;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSecurityNewRequest;
|
||||
import ru.spcex.platform.enumeration.InstrumentType;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.adapter;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.CouponSchedule;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.FondSecurity;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.IncomeListing;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.Nominal;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.CouponSchedule;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.FondSecurity;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.IncomeListing;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.Nominal;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.securitites.*;
|
||||
|
||||
@Service
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.builders;
|
||||
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.enums.OutboundRequestType;
|
||||
|
||||
import java.time.Instant;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package ru.spcex.clearing.gatewayapi.service.processor;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.company.*;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithCompanyId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.company.*;
|
||||
import ru.spcex.clearing.gatewayapi.service.adapter.CompanyRequestAdapter;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.processor;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.fond.FondListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.service.IssueCompanyService;
|
||||
import ru.spcex.clearing.gatewayapi.service.SecurityService;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package ru.spcex.clearing.gatewayapi.service.processor;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.mkr.ExchangeInstrument;
|
||||
import ru.spcex.clearing.gatewayapi.controller.request.listing.mkr.MMListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr.ExchangeInstrument;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.listing.mkr.MMListingsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.service.adapter.MoneyMarketSecurityRequestAdapter;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.securitites.MoneyMarketSecurityNewRequest;
|
||||
|
|
|
|||
|
|
@ -6,18 +6,18 @@ logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter=DEBUG
|
|||
spring.main.web-application-type=servlet
|
||||
|
||||
gateway-api.example-setting=test
|
||||
gateway-api.hazelcast.cluster-members=127.0.0.1:5701
|
||||
gateway-api.hazelcast.cluster-members=10.200.200.183:5701
|
||||
gateway-api.hazelcast.login=dev
|
||||
gateway-api.hazelcast.password=dev-pass
|
||||
|
||||
gateway-api.kafka-producer.bootstrap-servers=localhost:9092
|
||||
gateway-api.kafka-producer.bootstrap-servers=127.0.0.1:9092
|
||||
gateway-api.kafka-producer.acks=all
|
||||
gateway-api.kafka-producer.retries=0
|
||||
gateway-api.kafka-producer.batch-size=16384
|
||||
gateway-api.kafka-producer.linger-ms=1
|
||||
gateway-api.kafka-producer.buffer-memory=33554432
|
||||
|
||||
gateway-api.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
gateway-api.kafka-consumer.bootstrap-servers=127.0.0.1:9092
|
||||
gateway-api.kafka-consumer.group-id=dev-group-gateway-api
|
||||
gateway-api.kafka-consumer.enable-auto-commit=true
|
||||
gateway-api.kafka-consumer.session-timeout-ms=30000
|
||||
|
|
@ -26,7 +26,7 @@ gateway-api.kafka-consumer.linger-ms=1
|
|||
gateway-api.kafka-consumer.buffer-memory=33554432
|
||||
|
||||
gateway-api.inbound-server.enable-ssl=false
|
||||
gateway-api.inbound-server.host=localhost
|
||||
gateway-api.inbound-server.port=8080
|
||||
gateway-api.inbound-server.pathLOCM=test_tomcat9/p1
|
||||
gateway-api.inbound-server.pathLOSC=test_tomcat9/p2
|
||||
gateway-api.inbound-server.host=10.200.200.183
|
||||
gateway-api.inbound-server.port=8084
|
||||
gateway-api.inbound-server.pathLOCM=/test_rest/inbound_request
|
||||
gateway-api.inbound-server.pathLOSC=/test_rest/inbound_request
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
spring.main.web-application-type=none
|
||||
|
||||
securities-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
securities-service.hazelcast.cluster-members=10.200.200.183:5701
|
||||
securities-service.hazelcast.login=dev
|
||||
securities-service.hazelcast.password=dev-pass
|
||||
|
||||
securities-service.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
securities-service.kafka-consumer.bootstrap-servers=127.0.0.1:9092
|
||||
securities-service.kafka-consumer.group-id=dev-group-securities-service
|
||||
securities-service.kafka-consumer.enable-auto-commit=false
|
||||
securities-service.kafka-consumer.session-timeout-ms=30000
|
||||
|
|
@ -12,7 +12,7 @@ securities-service.kafka-consumer.auto-offset-reset=latest
|
|||
securities-service.kafka-consumer.linger-ms=1
|
||||
securities-service.kafka-consumer.buffer-memory=33554432
|
||||
|
||||
securities-service.kafka-producer.bootstrap-servers=localhost:9092
|
||||
securities-service.kafka-producer.bootstrap-servers=127.0.0.1:9092
|
||||
securities-service.kafka-producer.acks=all
|
||||
securities-service.kafka-producer.retries=0
|
||||
securities-service.kafka-producer.batch-size=16384
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package ru.spcex.platform.enumeration;
|
|||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum ObjectType implements IEnumKey {
|
||||
statement("STMT"), rgst("RGST");
|
||||
statement("STMT"), rgst("RGST"), gateway("GTWY");
|
||||
|
||||
private final String key;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue