package com.uas.eis.entity.HQ; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Data; @Data @JsonIgnoreProperties(ignoreUnknown = true) public class HQPOResp { private String msg; private HQPORespHeader header; @Data @JsonIgnoreProperties(ignoreUnknown = true) public static class HQPORespHeader { private String code;//-- 非200为请求失败 private String desc;//"success" -- code非200时存放错误信息 } public String getCode() { if(header!=null){ return header.getCode(); } return "500"; } public String getErrTip() { if(msg!=null){ return msg; }else { if(header!=null&&header.getDesc()!=null){ return header.getDesc(); } } return ""; } }