1 package com.zone.weixin4j.request;
2
3 import com.zone.weixin4j.type.EncryptType;
4 import com.zone.weixin4j.util.AesToken;
5
6 import javax.servlet.http.HttpServletRequest;
7
8
9
10
11
12
13
14
15
16
17
18 public class WeixinRequest {
19
20
21
22
23 private String uri;
24
25
26
27
28
29 private String echoStr;
30
31
32
33 private String timeStamp;
34
35
36
37 private String nonce;
38
39
40
41 private String signature;
42
43
44
45 private String msgSignature;
46
47
48
49
50
51
52 private EncryptType encryptType;
53
54
55
56
57 private String originalContent;
58
59
60
61
62 private String encryptContent;
63
64
65
66 private AesToken aesToken;
67
68 private HttpServletRequest request;
69
70 public WeixinRequest(String uri,
71 EncryptType encryptType, String echoStr, String timeStamp,
72 String nonce, String signature, String msgSignature,
73 String originalContent, String encryptContent, AesToken aesToken) {
74 this.uri = uri;
75 this.encryptType = encryptType;
76 this.echoStr = echoStr;
77 this.timeStamp = timeStamp;
78 this.nonce = nonce;
79 this.signature = signature;
80 this.msgSignature = msgSignature;
81 this.originalContent = originalContent;
82 this.encryptContent = encryptContent;
83 this.aesToken = aesToken;
84 }
85
86 public WeixinRequest(String uri,
87 EncryptType encryptType, String echoStr, String timeStamp,
88 String nonce, String signature, String msgSignature,
89 String originalContent, String encryptContent, AesToken aesToken, HttpServletRequest request) {
90 this.uri = uri;
91 this.encryptType = encryptType;
92 this.echoStr = echoStr;
93 this.timeStamp = timeStamp;
94 this.nonce = nonce;
95 this.signature = signature;
96 this.msgSignature = msgSignature;
97 this.originalContent = originalContent;
98 this.encryptContent = encryptContent;
99 this.aesToken = aesToken;
100 this.request = request;
101 }
102
103 public String getUri() {
104 return uri;
105 }
106
107 public String getEchoStr() {
108 return echoStr;
109 }
110
111 public String getTimeStamp() {
112 return timeStamp;
113 }
114
115 public String getNonce() {
116 return nonce;
117 }
118
119 public String getSignature() {
120 return signature;
121 }
122
123 public String getMsgSignature() {
124 return msgSignature;
125 }
126
127 public EncryptType getEncryptType() {
128 return encryptType;
129 }
130
131 public String getOriginalContent() {
132 return originalContent;
133 }
134
135 public String getEncryptContent() {
136 return encryptContent;
137 }
138
139 public AesToken getAesToken() {
140 return aesToken;
141 }
142
143 public HttpServletRequest getHttpServletRequest() {
144 return request;
145 }
146
147 public WeixinRequest setHttpServletRequest(HttpServletRequest httpServletRequest) {
148 this.request = httpServletRequest;
149 return this;
150 }
151
152 @Override
153 public String toString() {
154 return "WeixinRequest [uri=" + uri + ", echoStr=" + echoStr
155 + ", timeStamp=" + timeStamp + ", nonce=" + nonce
156 + ", signature=" + signature + ", msgSignature=" + msgSignature
157 + ", encryptType=" + encryptType + ", originalContent="
158 + originalContent + ", encryptContent=" + encryptContent
159 + ", aesToken=" + aesToken + "]";
160 }
161 }