Revert "backend-api update meta поправил поле в ChangeRefundDateActionNew.java в соответствии с метой (fix)"

This reverts commit d7f0860726.
This commit is contained in:
etreshenkov 2023-08-24 20:04:10 +03:00
parent 9a84b80c83
commit 3c22c99e51
2 changed files with 16 additions and 4 deletions

View file

@ -23,10 +23,7 @@ public class ChangeRefundDateActionNew implements IAction<RegistryChangeRefundDa
@JsonIgnore
public Long groupId;
/**
* Для совместимости с метой, поле не используется.
*/
@JsonProperty(required = false)
@JsonIgnore
public String contract;
@JsonProperty
@JsonSerialize(using = LocalDateSerializer.class)
@ -37,6 +34,7 @@ public class ChangeRefundDateActionNew implements IAction<RegistryChangeRefundDa
public RegistryChangeRefundDateRequest toRequest() {
var req = new RegistryChangeRefundDateRequest();
req.setGroupId(groupId);
req.setContract(contract);
req.setRefundDate(refundDate);
return req;
}
@ -47,6 +45,9 @@ public class ChangeRefundDateActionNew implements IAction<RegistryChangeRefundDa
if (groupId == null) {
errors.add(new EnumMessage(BackEndError.ValidationError, "url parameter 'groupId'"));
}
if (StringUtils.isEmpty(contract)) {
errors.add(new EnumMessage(BackEndError.ValidationError, "contract"));
}
if (refundDate == null) {
errors.add(new EnumMessage(BackEndError.ValidationError, "refundDate"));
}

View file

@ -1,5 +1,6 @@
package ru.spcex.clearing.platform.messaging.domain.cud.registry;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@ -11,6 +12,8 @@ import java.time.LocalDate;
public class RegistryChangeRefundDateRequest {
@JsonProperty
private Long groupId;
@JsonIgnore
public String contract;
@JsonProperty
@JsonSerialize(using = LocalDateSerializer.class)
@JsonDeserialize(using = LocalDateDeserializer.class)
@ -24,6 +27,14 @@ public class RegistryChangeRefundDateRequest {
this.groupId = groupId;
}
public String getContract() {
return contract;
}
public void setContract(String contract) {
this.contract = contract;
}
public LocalDate getRefundDate() {
return refundDate;
}