1 package com.foxinmy.weixin4j.http.weixin;
2
3 import java.io.Serializable;
4
5 import javax.xml.bind.annotation.XmlAccessType;
6 import javax.xml.bind.annotation.XmlAccessorType;
7 import javax.xml.bind.annotation.XmlElement;
8 import javax.xml.bind.annotation.XmlRootElement;
9
10 import com.alibaba.fastjson.annotation.JSONField;
11
12
13
14
15
16
17
18
19
20
21
22
23
24 @XmlRootElement
25 @XmlAccessorType(XmlAccessType.FIELD)
26 public class ApiResult implements Serializable {
27
28 private static final long serialVersionUID = -6185313616955051150L;
29
30
31
32
33 @XmlElement(name = "return_code")
34 @JSONField(name = "errcode")
35 private String returnCode;
36
37
38
39
40 @XmlElement(name = "return_msg")
41 @JSONField(name = "errmsg")
42 private String returnMsg;
43
44 public ApiResult() {
45 this.returnCode = "0";
46 this.returnMsg = "OK";
47 }
48
49 public ApiResult(String returnCode, String returnMsg) {
50 this.returnCode = returnCode;
51 this.returnMsg = returnMsg;
52 }
53
54 public String getReturnCode() {
55 return returnCode;
56 }
57
58 public String getReturnMsg() {
59 return returnMsg;
60 }
61
62 public void setReturnCode(String returnCode) {
63 this.returnCode = returnCode;
64 }
65
66 public void setReturnMsg(String returnMsg) {
67 this.returnMsg = returnMsg;
68 }
69
70 @Override
71 public String toString() {
72 return "returnCode=" + returnCode + ", returnMsg=" + returnMsg;
73 }
74 }