Transform YDResponse into abstract class

pull/8040/head
Qiuyi LI 2024-06-27 17:08:33 +02:00
parent fbcb1aab94
commit a0993fd765
1 changed files with 5 additions and 11 deletions

View File

@ -4,38 +4,32 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.List;
@Slf4j @Slf4j
@Data @Data
public class YDResponse { public abstract class YDResponse {
/** /**
* *
*/ */
@JsonProperty("success") @JsonProperty("success")
private Integer returnValue; protected Integer returnValue;
/** /**
* *
*/ */
@JsonProperty("cnmessage") @JsonProperty("cnmessage")
private String cnMessage; protected String cnMessage;
/** /**
* *
*/ */
@JsonProperty("enmessage") @JsonProperty("enmessage")
private String enMessage; protected String enMessage;
@JsonProperty("data") public YDResponse(Integer returnValue, String cnMessage, String enMessage) {
private List<YDTraceData> traceDataList;
public YDResponse(Integer returnValue, String cnMessage, String enMessage, List<YDTraceData> traceDataList) {
this.returnValue = returnValue; this.returnValue = returnValue;
this.cnMessage = cnMessage; this.cnMessage = cnMessage;
this.enMessage = enMessage; this.enMessage = enMessage;
this.traceDataList = traceDataList;
} }
public YDResponse() { public YDResponse() {