{"code":200,"message":"查询成功","data":{"id":31,"serial":"000066"},"id":null,"serial":null}
在这块我发现自己在代码中返回类CommonResult中自己继承了Payment导致了获取到重复的字段和null值;
修改后为:
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult <T>{
private Integer code;
private String message;
private T data;
public CommonResult(Integer code, String message) {
this(code, message,null);
}
}