backend-api LauncherCommandRequest добавил новые поля

This commit is contained in:
AKurakin 2023-05-29 13:02:08 +03:00
parent 7c4fb50cff
commit def4cd43c0
3 changed files with 70 additions and 1 deletions

View file

@ -25,6 +25,15 @@ public class LauncherNew implements IAction<Object> {
private Long securityId;
@JsonIgnore
private Long userId;
@ApiModelProperty(value = "Секция", example = "AAA")
@JsonProperty
private String section;
@ApiModelProperty(value = "Тип клиринговой сессии", example = "AAA")
@JsonProperty
private String sessionType;
@ApiModelProperty(value = "Клиринговая сессия", example = "AAA")
@JsonProperty
private Long sessionId;
@Override
public Object toRequest() {
@ -33,6 +42,9 @@ public class LauncherNew implements IAction<Object> {
taskRunnerCommandRequest.setCompanyId(companyId);
taskRunnerCommandRequest.setSecurityId(securityId);
taskRunnerCommandRequest.setUserId(userId);
taskRunnerCommandRequest.setSection(section);
taskRunnerCommandRequest.setSessionType(sessionType);
taskRunnerCommandRequest.setSessionId(sessionId);
return taskRunnerCommandRequest;
}
@ -45,7 +57,7 @@ public class LauncherNew implements IAction<Object> {
@Override
public Collection<EnumMessage> validate() {
if (task == null) {
return List.of(new EnumMessage(BackEndError.ValidationError,"url parameter 'task-code'"));
return List.of(new EnumMessage(BackEndError.ValidationError, "url parameter 'task-code'"));
}
return Collections.emptyList();
}
@ -81,4 +93,28 @@ public class LauncherNew implements IAction<Object> {
public void setSecurityId(Long securityId) {
this.securityId = securityId;
}
public String getSection() {
return section;
}
public void setSection(String section) {
this.section = section;
}
public String getSessionType() {
return sessionType;
}
public void setSessionType(String sessionType) {
this.sessionType = sessionType;
}
public Long getSessionId() {
return sessionId;
}
public void setSessionId(Long sessionId) {
this.sessionId = sessionId;
}
}

View file

@ -67,6 +67,9 @@ class LauncherServiceTest extends AbstractServiceTest {
launcherCommandRequest.setUserId(launcher.getSenderId());
launcherCommandRequest.setCompanyId(newCompanyId);
launcherCommandRequest.setSecurityId(testSecurityId);
launcherCommandRequest.setSection("SECT");
launcherCommandRequest.setSessionType("STYPE");
launcherCommandRequest.setSessionId(111111L);
BaseRequest<Object> predictableBaseRequest = new BaseRequest<>();
predictableBaseRequest.setRequestPayload(launcherCommandRequest);

View file

@ -12,6 +12,12 @@ public class LauncherCommandRequest {
private Long companyId;
@JsonProperty
private Long securityId;
@JsonProperty
private String section;
@JsonProperty
private String sessionType;
@JsonProperty
private Long sessionId;
public Long getUserId() {
@ -45,4 +51,28 @@ public class LauncherCommandRequest {
public void setSecurityId(Long securityId) {
this.securityId = securityId;
}
public String getSection() {
return section;
}
public void setSection(String section) {
this.section = section;
}
public Long getSessionId() {
return sessionId;
}
public void setSessionId(Long sessionId) {
this.sessionId = sessionId;
}
public String getSessionType() {
return sessionType;
}
public void setSessionType(String sessionType) {
this.sessionType = sessionType;
}
}