http://jira.mfd.msk:8088/browse/CLS-758 ControlServiceRequest replaced with LauncherCommandRequest
This commit is contained in:
parent
0e95f18974
commit
4c2e03e198
2 changed files with 6 additions and 32 deletions
|
|
@ -3,8 +3,9 @@ package ru.spcex.clearing.control.service;
|
|||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.ControlServiceRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.enumeration.SessionType;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
|
||||
@Service
|
||||
|
|
@ -18,13 +19,13 @@ public class CommandService extends QueueConsumer implements InitializingBean {
|
|||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
callback(ControlServiceRequest.class)
|
||||
.setConsumer(request -> controlService.generalControl(request.getRequestPayload().getSessionType()))
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setConsumer(request -> controlService.generalControl(SessionType.valueOf(request.getRequestPayload().getSessionType())))
|
||||
.forDestination(Task.generalControl_GLCL.topic(), callbacks::put);
|
||||
callback(ControlServiceRequest.class)
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setConsumer(request -> controlService.internalControl(request.getRequestPayload().getSessionId()))
|
||||
.forDestination(Task.internalControl_ILCL.topic(), callbacks::put);
|
||||
callback(ControlServiceRequest.class)
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setConsumer(request -> controlService.internalControlFinl(request.getRequestPayload().getSessionId()))
|
||||
.forDestination(Task.internalFinlControl_IFCL.topic(), callbacks::put);
|
||||
init();
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.clearing;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import ru.spcex.platform.enumeration.SessionType;
|
||||
|
||||
public class ControlServiceRequest {
|
||||
@JsonProperty
|
||||
private Long sessionId;
|
||||
@JsonProperty
|
||||
private SessionType sessionType;
|
||||
|
||||
public Long getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(Long sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public SessionType getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(SessionType sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue