--- scheduler service (addition of scheduler)
This commit is contained in:
parent
58d605d7c1
commit
30ec2ceeec
11 changed files with 562 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
|||
<module>reports-service</module>
|
||||
<module>account-service</module>
|
||||
<module>balance-service</module>
|
||||
<module>scheduler-service</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
81
clearing-parent/scheduler-service/pom.xml
Normal file
81
clearing-parent/scheduler-service/pom.xml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>scheduler-service</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-messaging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-enum</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-imdg-api-hazelcast-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- TEST -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>application.properties</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package ru.spcex.clearing.scheduler;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class SchedulerServiceApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(SchedulerServiceApplication.class);
|
||||
springApplication.run(args);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package ru.spcex.clearing.scheduler.config;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.platform.messaging.config.KafkaConsumerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaProducerFactory;
|
||||
import ru.spcex.clearing.scheduler.config.settings.SchedulerServiceSettings;
|
||||
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
@Autowired
|
||||
@Bean
|
||||
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
public Consumer<String, Object> createConsumer(SchedulerServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafkaConsumer());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public Producer<String, Object> createProducer(SchedulerServiceSettings settings) {
|
||||
return KafkaProducerFactory.producer(settings.getKafkaProducer());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package ru.spcex.clearing.scheduler.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import ru.spcex.clearing.scheduler.config.settings.SchedulerServiceSettings;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||
|
||||
@Configuration
|
||||
public class SchedulerServiceImdgConfig {
|
||||
private static ThreadPoolTaskExecutor createThreadPoolTaskExecutor(int maxPoolSz, boolean waitForCompletion) {
|
||||
ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
|
||||
if (maxPoolSz > 2) {
|
||||
pool.setKeepAliveSeconds(60);
|
||||
pool.setAllowCoreThreadTimeOut(true);
|
||||
}
|
||||
pool.setCorePoolSize(maxPoolSz);
|
||||
pool.setWaitForTasksToCompleteOnShutdown(waitForCompletion);
|
||||
return pool;
|
||||
}
|
||||
|
||||
@Bean(name = "taskExecutorHazelcastClientInitializer")
|
||||
public ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer() {
|
||||
return createThreadPoolTaskExecutor(1, true);
|
||||
}
|
||||
|
||||
@Bean(name = "taskExecutorIdGeneratorAwaiter")
|
||||
public ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter() {
|
||||
return createThreadPoolTaskExecutor(1, false);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public ImdgProvider imdgProvider(
|
||||
@Qualifier("taskExecutorHazelcastClientInitializer") ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer,
|
||||
@Qualifier("taskExecutorIdGeneratorAwaiter") ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter,
|
||||
SchedulerServiceSettings settings
|
||||
) {
|
||||
return new HazelcastService(taskExecutorHazelcastClientInitializer,
|
||||
taskExecutorIdGeneratorAwaiter,
|
||||
settings.getHazelcast());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package ru.spcex.clearing.scheduler.config.settings;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaConsumerSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaProducerSettings;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
||||
|
||||
@Component
|
||||
@PropertySource("file:${spring.config.location}/application.properties")
|
||||
@ConfigurationProperties("scheduler-service")
|
||||
public class SchedulerServiceSettings {
|
||||
private HazelcastClientParams hazelcast;
|
||||
private KafkaConsumerSettings kafkaConsumer;
|
||||
private KafkaProducerSettings kafkaProducer;
|
||||
|
||||
public HazelcastClientParams getHazelcast() {
|
||||
return hazelcast;
|
||||
}
|
||||
|
||||
public void setHazelcast(HazelcastClientParams hazelcast) {
|
||||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public KafkaConsumerSettings getKafkaConsumer() {
|
||||
return kafkaConsumer;
|
||||
}
|
||||
|
||||
public void setKafkaConsumer(KafkaConsumerSettings kafkaConsumer) {
|
||||
this.kafkaConsumer = kafkaConsumer;
|
||||
}
|
||||
|
||||
public KafkaProducerSettings getKafkaProducer() {
|
||||
return kafkaProducer;
|
||||
}
|
||||
|
||||
public void setKafkaProducer(KafkaProducerSettings kafkaProducer) {
|
||||
this.kafkaProducer = kafkaProducer;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package ru.spcex.clearing.scheduler.service;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.SchedulerNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.SchedulerUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Service
|
||||
public class SchedulerAllTodayService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<Scheduler> schedulerMap;
|
||||
|
||||
@Autowired
|
||||
public SchedulerAllTodayService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue, kafkaProducer);
|
||||
this.schedulerMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Scheduler, Scheduler.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(SchedulerNewRequest.class)
|
||||
.setConsumer(this::newScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_NEW, callbacks::put);
|
||||
callback(SchedulerUpdateRequest.class)
|
||||
.setConsumer(this::updateScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_UPDATE, callbacks::put);
|
||||
callback(CommonDeleteRequest.class)
|
||||
.setConsumer(this::deleteScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_DELETE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newScheduler(BaseRequest<SchedulerNewRequest> userRequest) {
|
||||
SchedulerNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("SchedulerNewRequest received");
|
||||
Scheduler scheduler = new Scheduler();
|
||||
scheduler.setTask(req.getTask());
|
||||
scheduler.setTaskTime(req.getTaskTime());
|
||||
scheduler.setClearingDate(req.getClearingDate());
|
||||
scheduler.setMarket(req.getMarket());
|
||||
scheduler.setTaskStatus(req.getTaskStatus());
|
||||
scheduler.setSecurityId(req.getSecurityId());
|
||||
schedulerMap.insert(scheduler);
|
||||
log.debug("successfully processed, new id {}", scheduler.getId());
|
||||
}
|
||||
|
||||
private void updateScheduler(BaseRequest<SchedulerUpdateRequest> userRequest) {
|
||||
SchedulerUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("SchedulerUpdateRequest received id = {}", req.getId());
|
||||
Scheduler scheduler = schedulerMap.getSingleObjectByID(req.getId());
|
||||
scheduler.setTask(req.getTask());
|
||||
scheduler.setTaskTime(req.getTaskTime());
|
||||
scheduler.setClearingDate(req.getClearingDate());
|
||||
scheduler.setMarket(req.getMarket());
|
||||
scheduler.setTaskStatus(req.getTaskStatus());
|
||||
scheduler.setSecurityId(req.getSecurityId());
|
||||
|
||||
schedulerMap.update(scheduler);
|
||||
}
|
||||
|
||||
private void deleteScheduler(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
CommonDeleteRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CommonDeleteRequest received id = {}", req.getId());
|
||||
Scheduler scheduler = schedulerMap.getSingleObjectByID(req.getId());
|
||||
schedulerMap.delete(scheduler);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package ru.spcex.clearing.scheduler.service;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.misc.KeyRate;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.KeyRateNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.KeyRateUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.enumeration.Status;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Service
|
||||
public class SchedulerService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<KeyRate> keyRateMap;
|
||||
|
||||
@Autowired
|
||||
public SchedulerService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue, kafkaProducer);
|
||||
this.keyRateMap = imdgProvider.getImdg(IMDGDistributedNames.Map_KeyRate, KeyRate.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(KeyRateNewRequest.class)
|
||||
.setConsumer(this::newKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_NEW, callbacks::put);
|
||||
callback(KeyRateUpdateRequest.class)
|
||||
.setConsumer(this::updateKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_UPDATE, callbacks::put);
|
||||
callback(CommonDeleteRequest.class)
|
||||
.setConsumer(this::deleteKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_DELETE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newKeyRate(BaseRequest<KeyRateNewRequest> userRequest) {
|
||||
KeyRateNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("MoneyMarketSecurityNewRequest received");
|
||||
KeyRate keyRate = new KeyRate();
|
||||
keyRate.setEndDate(req.getEndDate());
|
||||
keyRate.setDocument(req.getDocument());
|
||||
keyRate.setRate(req.getKeyRate());
|
||||
keyRate.setStartDate(req.getStartDate());
|
||||
keyRate.setWorkflowStatus(Status.Active.getKey());
|
||||
keyRateMap.insert(keyRate);
|
||||
log.debug("successfully processed, new id {}", keyRate.getId());
|
||||
}
|
||||
|
||||
private void updateKeyRate(BaseRequest<KeyRateUpdateRequest> userRequest) {
|
||||
KeyRateUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("MoneyMarketSecurityUpdateRequest received id = {}", req.getId());
|
||||
KeyRate keyRate = keyRateMap.getSingleObjectByID(req.getId());
|
||||
keyRate.setEndDate(req.getEndDate());
|
||||
keyRate.setDocument(req.getDocument());
|
||||
keyRate.setRate(req.getKeyRate());
|
||||
keyRate.setStartDate(req.getStartDate());
|
||||
keyRateMap.update(keyRate);
|
||||
}
|
||||
|
||||
private void deleteKeyRate(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
CommonDeleteRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CommonDeleteRequest received id = {}", req.getId());
|
||||
KeyRate keyRate = keyRateMap.getSingleObjectByID(req.getId());
|
||||
keyRateMap.delete(keyRate);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -9,6 +9,10 @@ public interface Consts {
|
|||
String DESTINATION_KEY_RATE_UPDATE = "key-rate-update";
|
||||
String DESTINATION_KEY_RATE_DELETE = "key-rate-delete";
|
||||
|
||||
String DESTINATION_SCHEDULER_NEW = "scheduler-new";
|
||||
String DESTINATION_SCHEDULER_UPDATE = "scheduler-update";
|
||||
String DESTINATION_SCHEDULER_DELETE = "scheduler-delete";
|
||||
|
||||
String DESTINATION_COMPANY_DELETE = "company-delete";
|
||||
String DESTINATION_COMPANY_INFO_UPDATE = "company-info-update";
|
||||
String DESTINATION_COMPANY_SYMBOL_UPDATE = "company-symbol-update";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class SchedulerNewRequest {
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
public LocalTime taskTime;
|
||||
|
||||
@JsonProperty
|
||||
public String task;
|
||||
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
public LocalDate clearingDate;
|
||||
|
||||
@JsonProperty
|
||||
public String market;
|
||||
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
||||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
public SchedulerNewRequest(LocalTime taskTime, String task, LocalDate clearingDate, String market, String taskStatus, Long securityId) {
|
||||
this.taskTime = taskTime;
|
||||
this.task = task;
|
||||
this.clearingDate = clearingDate;
|
||||
this.market = market;
|
||||
this.taskStatus = taskStatus;
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public LocalTime getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
public void setTaskTime(LocalTime taskTime) {
|
||||
this.taskTime = taskTime;
|
||||
}
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public LocalDate getClearingDate() {
|
||||
return clearingDate;
|
||||
}
|
||||
|
||||
public void setClearingDate(LocalDate clearingDate) {
|
||||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalTimeDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalTimeSerializer;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class SchedulerUpdateRequest {
|
||||
@JsonProperty
|
||||
private String task;
|
||||
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
private LocalTime taskTime;
|
||||
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonProperty
|
||||
private LocalDate clearingDate;
|
||||
|
||||
@JsonProperty
|
||||
private String market;
|
||||
|
||||
@JsonProperty
|
||||
private String taskStatus;
|
||||
|
||||
@JsonProperty
|
||||
private Long securityId;
|
||||
|
||||
@JsonProperty
|
||||
private Long id;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public LocalTime getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
public void setTaskTime(LocalTime taskTime) {
|
||||
this.taskTime = taskTime;
|
||||
}
|
||||
|
||||
public LocalDate getClearingDate() {
|
||||
return clearingDate;
|
||||
}
|
||||
|
||||
public void setClearingDate(LocalDate clearingDate) {
|
||||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue