HQPOResp.java 857 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.uas.eis.entity.HQ;
  2. import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  3. import lombok.Data;
  4. @Data
  5. @JsonIgnoreProperties(ignoreUnknown = true)
  6. public class HQPOResp {
  7. private String msg;
  8. private HQPORespHeader header;
  9. @Data
  10. @JsonIgnoreProperties(ignoreUnknown = true)
  11. public static class HQPORespHeader {
  12. private String code;//-- 非200为请求失败
  13. private String desc;//"success" -- code非200时存放错误信息
  14. }
  15. public String getCode() {
  16. if(header!=null){
  17. return header.getCode();
  18. }
  19. return "500";
  20. }
  21. public String getErrTip() {
  22. if(msg!=null){
  23. return msg;
  24. }else {
  25. if(header!=null&&header.getDesc()!=null){
  26. return header.getDesc();
  27. }
  28. }
  29. return "";
  30. }
  31. }