郑杰 3 роки тому
батько
коміт
58f78cd3d9

+ 417 - 0
buyer-api/src/test/java/cn/lili/buyer/test/customs/CustomsTest.java

@@ -0,0 +1,417 @@
1
+package cn.lili.buyer.test.customs;
2
+
3
+import cn.hutool.core.util.XmlUtil;
4
+import cn.hutool.json.JSONUtil;
5
+import cn.lili.common.utils.XmlMapUtils;
6
+import org.w3c.dom.Document;
7
+import org.w3c.dom.Element;
8
+
9
+import java.util.Map;
10
+
11
+//@ExtendWith(SpringExtension.class)
12
+//@SpringBootTest
13
+public class CustomsTest {
14
+
15
+
16
+    public static void main(String[] args){
17
+        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
18
+                "<ceb:CEB303Message guid=\"311af125-6fed-4603-8c5d-49b1fa4b4b9b\" version=\"1.0\"  xmlns:ceb=\"http://www.chinaport.gov.cn/ceb\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
19
+                "\t<ceb:Order>\n" +
20
+                "\t\t<ceb:OrderHead>\n" +
21
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
22
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
23
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
24
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
25
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
26
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
27
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
28
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
29
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
30
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
31
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
32
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
33
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
34
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
35
+                "\t\t</ceb:OrderHead>\n" +
36
+                "\t\t<ceb:OrderList>\n" +
37
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
38
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
39
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
40
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
41
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
42
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
43
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
44
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
45
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
46
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
47
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
48
+                "\t\t</ceb:OrderList>\n" +
49
+                "\t</ceb:Order>\n" +
50
+                "        <ceb:Order>\n" +
51
+                "\t\t<ceb:OrderHead>\n" +
52
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
53
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
54
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
55
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
56
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
57
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
58
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
59
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
60
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
61
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
62
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
63
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
64
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
65
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
66
+                "\t\t</ceb:OrderHead>\n" +
67
+                "\t\t<ceb:OrderList>\n" +
68
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
69
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
70
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
71
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
72
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
73
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
74
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
75
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
76
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
77
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
78
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
79
+                "\t\t</ceb:OrderList>\n" +
80
+                "\t</ceb:Order>\n" +
81
+                "    <ceb:Order>\n" +
82
+                "\t\t<ceb:OrderHead>\n" +
83
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
84
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
85
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
86
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
87
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
88
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
89
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
90
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
91
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
92
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
93
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
94
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
95
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
96
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
97
+                "\t\t</ceb:OrderHead>\n" +
98
+                "\t\t<ceb:OrderList>\n" +
99
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
100
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
101
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
102
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
103
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
104
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
105
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
106
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
107
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
108
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
109
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
110
+                "\t\t</ceb:OrderList>\n" +
111
+                "\t</ceb:Order>\n" +
112
+                "    <ceb:Order>\n" +
113
+                "\t\t<ceb:OrderHead>\n" +
114
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
115
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
116
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
117
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
118
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
119
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
120
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
121
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
122
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
123
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
124
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
125
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
126
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
127
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
128
+                "\t\t</ceb:OrderHead>\n" +
129
+                "\t\t<ceb:OrderList>\n" +
130
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
131
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
132
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
133
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
134
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
135
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
136
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
137
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
138
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
139
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
140
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
141
+                "\t\t</ceb:OrderList>\n" +
142
+                "\t</ceb:Order>\n" +
143
+                "    <ceb:Order>\n" +
144
+                "\t\t<ceb:OrderHead>\n" +
145
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
146
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
147
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
148
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
149
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
150
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
151
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
152
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
153
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
154
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
155
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
156
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
157
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
158
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
159
+                "\t\t</ceb:OrderHead>\n" +
160
+                "\t\t<ceb:OrderList>\n" +
161
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
162
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
163
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
164
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
165
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
166
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
167
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
168
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
169
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
170
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
171
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
172
+                "\t\t</ceb:OrderList>\n" +
173
+                "\t</ceb:Order>\n" +
174
+                "\t<ceb:Order>\n" +
175
+                "\t\t<ceb:OrderHead>\n" +
176
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
177
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
178
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
179
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
180
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
181
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
182
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
183
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
184
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
185
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
186
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
187
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
188
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
189
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
190
+                "\t\t</ceb:OrderHead>\n" +
191
+                "\t\t<ceb:OrderList>\n" +
192
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
193
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
194
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
195
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
196
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
197
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
198
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
199
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
200
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
201
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
202
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
203
+                "\t\t</ceb:OrderList>\n" +
204
+                "\t</ceb:Order>\n" +
205
+                "        <ceb:Order>\n" +
206
+                "\t\t<ceb:OrderHead>\n" +
207
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
208
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
209
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
210
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
211
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
212
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
213
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
214
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
215
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
216
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
217
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
218
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
219
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
220
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
221
+                "\t\t</ceb:OrderHead>\n" +
222
+                "\t\t<ceb:OrderList>\n" +
223
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
224
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
225
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
226
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
227
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
228
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
229
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
230
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
231
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
232
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
233
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
234
+                "\t\t</ceb:OrderList>\n" +
235
+                "\t</ceb:Order>\n" +
236
+                "    <ceb:Order>\n" +
237
+                "\t\t<ceb:OrderHead>\n" +
238
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
239
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
240
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
241
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
242
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
243
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
244
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
245
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
246
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
247
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
248
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
249
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
250
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
251
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
252
+                "\t\t</ceb:OrderHead>\n" +
253
+                "\t\t<ceb:OrderList>\n" +
254
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
255
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
256
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
257
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
258
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
259
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
260
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
261
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
262
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
263
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
264
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
265
+                "\t\t</ceb:OrderList>\n" +
266
+                "\t</ceb:Order>\n" +
267
+                "    <ceb:Order>\n" +
268
+                "\t\t<ceb:OrderHead>\n" +
269
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
270
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
271
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
272
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
273
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
274
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
275
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
276
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
277
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
278
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
279
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
280
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
281
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
282
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
283
+                "\t\t</ceb:OrderHead>\n" +
284
+                "\t\t<ceb:OrderList>\n" +
285
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
286
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
287
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
288
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
289
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
290
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
291
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
292
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
293
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
294
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
295
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
296
+                "\t\t</ceb:OrderList>\n" +
297
+                "\t</ceb:Order>\n" +
298
+                "    <ceb:Order>\n" +
299
+                "\t\t<ceb:OrderHead>\n" +
300
+                "\t\t\t<ceb:guid>704ea0f1-b229-4e89-9f2f-c2e550e95c86</ceb:guid>\n" +
301
+                "\t\t\t<ceb:appType>1</ceb:appType>\n" +
302
+                "\t\t\t<ceb:appTime>20180507153001</ceb:appTime>\n" +
303
+                "\t\t\t<ceb:appStatus>2</ceb:appStatus>\n" +
304
+                "\t\t\t<ceb:orderType>E</ceb:orderType>\n" +
305
+                "\t\t\t<ceb:orderNo>order2018050711340001</ceb:orderNo>\n" +
306
+                "\t\t\t<ceb:ebpCode>1105910159</ceb:ebpCode>\n" +
307
+                "\t\t\t<ceb:ebpName>东方物通科技(北京)有限公司</ceb:ebpName>\n" +
308
+                "\t\t\t<ceb:ebcCode>1105910159</ceb:ebcCode>\n" +
309
+                "\t\t\t<ceb:ebcName>东方物通科技(北京)有限公司</ceb:ebcName>\n" +
310
+                "\t\t\t<ceb:goodsValue>12345678912345.12345</ceb:goodsValue>\n" +
311
+                "\t\t\t<ceb:freight>0</ceb:freight>\n" +
312
+                "\t\t\t<ceb:currency>142</ceb:currency>\n" +
313
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
314
+                "\t\t</ceb:OrderHead>\n" +
315
+                "\t\t<ceb:OrderList>\n" +
316
+                "\t\t\t<ceb:gnum>1</ceb:gnum>\n" +
317
+                "\t\t\t<ceb:itemNo>AF001-001</ceb:itemNo>\n" +
318
+                "\t\t\t<ceb:itemName>小米盒子</ceb:itemName>\n" +
319
+                "\t\t\t<ceb:itemDescribe>小米盒子</ceb:itemDescribe>\n" +
320
+                "\t\t\t<ceb:barCode>2345123</ceb:barCode>\n" +
321
+                "\t\t\t<ceb:unit>aaa</ceb:unit>\n" +
322
+                "\t\t\t<ceb:currency>aaa</ceb:currency>\n" +
323
+                "\t\t\t<ceb:qty>100</ceb:qty>\n" +
324
+                "\t\t\t<ceb:price>20</ceb:price>\n" +
325
+                "\t\t\t<ceb:totalPrice>2000</ceb:totalPrice>\n" +
326
+                "\t\t\t<ceb:note>test</ceb:note>\n" +
327
+                "\t\t</ceb:OrderList>\n" +
328
+                "\t</ceb:Order>\n" +
329
+                "\t<ceb:BaseTransfer>\n" +
330
+                "\t\t<ceb:copCode>1105910159</ceb:copCode>\n" +
331
+                "\t\t<ceb:copName>东方物通科技(北京)有限公司</ceb:copName>\n" +
332
+                "\t\t<ceb:dxpMode>DXP</ceb:dxpMode>\n" +
333
+                "\t\t<ceb:dxpId>DXPLGS0000000001</ceb:dxpId>\n" +
334
+                "\t\t<ceb:note>test</ceb:note>\n" +
335
+                "\t</ceb:BaseTransfer>\n" +
336
+                "\t<ceb:BaseTransfer>\n" +
337
+                "\t\t<ceb:copCode>1105910159</ceb:copCode>\n" +
338
+                "\t\t<ceb:copName>东方物通科技(北京)有限公司</ceb:copName>\n" +
339
+                "\t\t<ceb:dxpMode>DXP</ceb:dxpMode>\n" +
340
+                "\t\t<ceb:dxpId>DXPLGS0000000001</ceb:dxpId>\n" +
341
+                "\t\t<ceb:note>test</ceb:note>\n" +
342
+                "\t</ceb:BaseTransfer>\n" +
343
+                "\t<ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\">\n" +
344
+                "<ds:SignedInfo>\n" +
345
+                "<ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"></ds:CanonicalizationMethod>\n" +
346
+                "<ds:SignatureMethod Algorithm=\"http://www.chinaport.gov.cn/2022/04/xmldsig#sm2-sm3\"></ds:SignatureMethod>\n" +
347
+                "<ds:Reference URI=\"\">\n" +
348
+                "<ds:Transforms>\n" +
349
+                "<ds:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"></ds:Transform>\n" +
350
+                "</ds:Transforms>\n" +
351
+                "<ds:DigestMethod Algorithm=\"http://www.chinaport.gov.cn/2022/04/xmldsig#sm3\"></ds:DigestMethod>\n" +
352
+                "<ds:DigestValue>SF/P+2sVsRQ9dJIqJSroW6ajb0Y=</ds:DigestValue>\n" +
353
+                "</ds:Reference>\n" +
354
+                "</ds:SignedInfo>\n" +
355
+                "<ds:SignatureValue>\n" +
356
+                "AI0wdcUHaaOR+FZ7W8lN6FrjzS+iru1qoBTCxm4S6knmLFLunPkLueELV69nYZr4x+uCPnNDD/wq\n" +
357
+                "jSqyPnH2xrrx8EFvsIhxNMCi+IlfS1z440YmeMEXnhff0pxSBGgrhETrq1tqp6QBZE5siBF4ow10\n" +
358
+                "0Q9RKaB+OMs4AB6I+0g=\n" +
359
+                "</ds:SignatureValue>\n" +
360
+                "<ds:KeyInfo>\n" +
361
+                "<ds:KeyName>0001</ds:KeyName>\n" +
362
+                "<ds:X509Data>\n" +
363
+                "<ds:X509Certificate>\n" +
364
+                "MIIEWzCCA8SgAwIBAgIDAJknMA0GCSqGSIb3DQEBBQUAMHYxCzAJBgNVBAYTAmNuMREwDwYDVQQK\n" +
365
+                "Hgh1NVtQU+NcuDENMAsGA1UECx4EAEMAQTENMAsGA1UECB4EUxdOrDEjMCEGA1UEAx4aTi1W/XU1\n" +
366
+                "W1BT41y4ZXBjbk4tX8NfAFPRUzoxETAPBgNVBAceCE4cZblef1c6MB4XDTE1MDUxOTAwMDAwMFoX\n" +
367
+                "DTQ5MTIwODAwMDAwMFowJTEjMCEGA1UEAx4aADEAM1P3W8aUpW1Li9VnDVKhVmhfAFPRUzowgZ8w\n" +
368
+                "DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKoQc7txXMb5VuXJnALpKQ1mAxFW2hxPwRhXY0mirNIL\n" +
369
+                "2gLY2z7ysqRvkpSRzr3BEq97xWLlXkQDG1QnzvTvh1YQzrffARSlCy6dYJ3YgM+Bps2NsPXhw1Lk\n" +
370
+                "vk0wn7LXAskEbwRgLihu1pH6/IGEocgeFusWTXT6B/ppTiEXL/87AgMBAAGjggJGMIICQjALBgNV\n" +
371
+                "HQ8EBAMCBsAwCQYDVR0TBAIwADCBoAYDVR0jBIGYMIGVgBQsaDiQrlh9ryILr2BYMK/wvmRvlqF6\n" +
372
+                "pHgwdjELMAkGA1UEBhMCY24xETAPBgNVBAoeCHU1W1BT41y4MQ0wCwYDVQQLHgQAQwBBMQ0wCwYD\n" +
373
+                "VQQIHgRTF06sMSMwIQYDVQQDHhpOLVb9dTVbUFPjXLhlcGNuTi1fw18AU9FTOjERMA8GA1UEBx4I\n" +
374
+                "ThxluV5/VzqCASUwHQYDVR0OBBYEFPcD90hfpSLKzuhaE3NvhU1xwHDAMEIGA1UdIAQ7MDkwNwYG\n" +
375
+                "K4EHAQECMC0wKwYIKwYBBQUHAgEWH2h0dHA6Ly9jcHMuY2hpbmFwb3J0Lmdvdi5jbi9DUFMwQgYD\n" +
376
+                "VR0fBDswOTA3oDWgM4YxaHR0cDovL2xkYXAuY2hpbmFwb3J0Lmdvdi5jbjo4MDg4L2R6a2EwMDAt\n" +
377
+                "MTk2LmNybDA9BggrBgEFBQcBAQQxMC8wLQYIKwYBBQUHMAGGIWh0dHA6Ly9vY3NwLmNoaW5hcG9y\n" +
378
+                "dC5nb3YuY246ODA4ODAqBgorBgEEAalDZAUBBBwWGtbQufq159fTv9qwtsr9vt3W0NDEv6q3osf4\n" +
379
+                "MBoGCisGAQQBqUNkBQYEDBYKUzAyMDEyMDAzODAaBgorBgEEAalDZAUJBAwWClMwMjAxMjAwMzgw\n" +
380
+                "EgYKKwYBBAGpQ2QCBAQEFgJDQTASBgorBgEEAalDZAIBBAQWAjE5MBMGBSpWCwcFBAoWCLXn19O/\n" +
381
+                "2rC2MA0GCSqGSIb3DQEBBQUAA4GBAFqdOOqCs/0zfJj5NM3UPXzAK/yIyx6b8ZEQXuY/aojzE46Q\n" +
382
+                "QXX1/N+G3DsKPvUhXQj1mAsZQeT0aMiUa1aNCd0P8p+PsfrB9E5oZnFhp4cLDkkuh2gx+MCFOHe2\n" +
383
+                "oEbi2/nCZpvWRJ34id5szTIw1n96/nrrg2+qFk+ddFr0xRzz\n" +
384
+                "</ds:X509Certificate>\n" +
385
+                "</ds:X509Data>\n" +
386
+                "</ds:KeyInfo>\n" +
387
+                "</ds:Signature>\n" +
388
+                "</ceb:CEB303Message>";
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+        // XMLString转Map
401
+        Map<String, Object> map = XmlUtil.xmlToMap(xml);
402
+        System.out.println(JSONUtil.toJsonStr(map));
403
+
404
+        // map解析
405
+        Document ceb = XmlUtil.mapToXml(map, "ceb:CEB303Message");
406
+        // 添加首个Node的属性
407
+        Element element = ceb.getDocumentElement();
408
+        element.setAttribute("guid", "311af125-6fed-4603-8c5d-49b1fa4b4b9b");
409
+        element.setAttribute("version", "1.0");
410
+        element.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
411
+        element.setAttribute("xmlns:ceb", "http://www.chinaport.gov.cn/ceb");
412
+        ceb.setXmlStandalone(true);
413
+        // 转String
414
+        String xmlString = XmlUtil.toStr(ceb);
415
+        System.out.println();
416
+    }
417
+}

+ 6 - 4
buyer-api/src/test/resources/application.yml

@@ -179,10 +179,12 @@ logging:
179 179
   file:
180 180
     # 指定路径
181 181
     path: lili-logs
182
-    # 最大保存天数
183
-    max-history: 7
184
-    # 每个文件最大大小
185
-    max-size: 5MB
182
+  logback:
183
+    rollingpolicy:
184
+      # 最大保存天数
185
+      max-history: 7
186
+      # 每个文件最大大小
187
+      max-file-size: 5MB
186 188
 #加密参数
187 189
 jasypt:
188 190
   encryptor:

+ 22 - 0
framework/pom.xml

@@ -413,7 +413,29 @@
413 413
             </exclusions>
414 414
         </dependency>
415 415
 
416
+        <!-- 引入本地lib包 -->
417
+        <!-- 江阴综服AES加密依赖 -->
418
+        <dependency>
419
+            <groupId>com.jyzf</groupId>
420
+            <artifactId>AESEncrypt</artifactId>
421
+            <scope>system</scope>
422
+            <version>1.0.0</version>
423
+            <systemPath>${project.basedir}/src/lib/AESEncrypt.jar</systemPath>
424
+        </dependency>
425
+
416 426
     </dependencies>
417 427
 
428
+    <build>
429
+        <plugins>
430
+            <plugin>
431
+                <groupId>org.springframework.boot</groupId>
432
+                <artifactId>spring-boot-maven-plugin</artifactId>
433
+                <configuration>
434
+                    <!-- maven打包时会将外部引入的jar包(比如在根目录下或resource文件下新加外部jar包)打包到项目jar -->
435
+                    <includeSystemScope>true</includeSystemScope>
436
+                </configuration>
437
+            </plugin>
438
+        </plugins>
439
+    </build>
418 440
 
419 441
 </project>

BIN
framework/src/lib/AESEncrypt.jar


+ 12 - 0
framework/src/main/java/cn/lili/common/enums/HTTPMethodEnum.java

@@ -0,0 +1,12 @@
1
+package cn.lili.common.enums;
2
+
3
+public enum HTTPMethodEnum {
4
+    GET,
5
+    POST,
6
+    PUT,
7
+    DELETE,
8
+    OPTIONS,
9
+    HEAD,
10
+    TRACE,
11
+    CONNECT
12
+}

+ 18 - 0
framework/src/main/java/cn/lili/common/properties/AbstractHttpEndPointProperties.java

@@ -0,0 +1,18 @@
1
+package cn.lili.common.properties;
2
+
3
+import cn.lili.common.enums.HTTPMethodEnum;
4
+
5
+public abstract class AbstractHttpEndPointProperties {
6
+
7
+    /** 主机域名或IP */
8
+    public String host;
9
+
10
+    /** 端口 */
11
+    public Integer port;
12
+
13
+    /** 路由 */
14
+    public String path;
15
+
16
+    /** HTTP方法 */
17
+    public HTTPMethodEnum method;
18
+}

+ 4 - 0
framework/src/main/java/cn/lili/common/properties/holder/PlatformIntergrationHolder.java

@@ -0,0 +1,4 @@
1
+package cn.lili.common.properties.holder;
2
+
3
+public class PlatformIntergrationHolder {
4
+}

+ 11 - 0
framework/src/main/java/cn/lili/common/properties/httpEndPointProperties.java

@@ -0,0 +1,11 @@
1
+package cn.lili.common.properties;
2
+
3
+import cn.lili.common.enums.HTTPMethodEnum;
4
+
5
+public interface httpEndPointProperties {
6
+
7
+    String url();
8
+
9
+    HTTPMethodEnum method();
10
+
11
+}

+ 273 - 0
framework/src/main/java/cn/lili/common/utils/XmlMapUtils.java

@@ -0,0 +1,273 @@
1
+package cn.lili.common.utils;
2
+
3
+
4
+import org.dom4j.Document;
5
+import org.dom4j.DocumentException;
6
+import org.dom4j.DocumentHelper;
7
+import org.dom4j.Element;
8
+import org.dom4j.io.OutputFormat;
9
+import org.dom4j.io.SAXReader;
10
+import org.dom4j.io.XMLWriter;
11
+
12
+import java.io.IOException;
13
+import java.io.StringReader;
14
+import java.io.StringWriter;
15
+import java.util.*;
16
+
17
+
18
+/**
19
+ * 提供Map<String,Object>转XML,XML转Map<String,Object>
20
+ */
21
+
22
+
23
+public class XmlMapUtils {
24
+
25
+
26
+    /**
27
+     *
28
+     * 通过Map创建XML,Map可以多层转换
29
+     *
30
+     * @param params
31
+     * @return	String-->XML
32
+     */
33
+    public static String createXmlByMap(String parentName,Map<String, Object> params,boolean isCDATA){
34
+        Document doc = DocumentHelper.createDocument();
35
+        doc.addElement(parentName);
36
+        String xml = iteratorXml(doc.getRootElement(),parentName,params,isCDATA);
37
+        return formatXML(xml);
38
+    }
39
+
40
+    /**
41
+     *
42
+     * 通过Map创建XML,Map可以多层转换
43
+     * 可以自定义parent节点
44
+     *
45
+     * @param params
46
+     * @return	String-->XML
47
+     */
48
+    public static String createXmlByMap(String parentName,Map<String, Object> params){
49
+        Document doc = DocumentHelper.createDocument();
50
+        doc.addElement(parentName);
51
+        String xml = iteratorXml(doc.getRootElement(),parentName,params,false);
52
+        return formatXML(xml);
53
+    }
54
+
55
+    /**
56
+     *
57
+     * 通过Map创建XML,Map可以多层转
58
+     * 固定节点parent为Document
59
+     *
60
+     * @param params
61
+     * @return	String-->XML
62
+     */
63
+    public static String createXmlByMap(Map<String, Object> params){
64
+        String parentName = "Request";
65
+        Document doc = DocumentHelper.createDocument();
66
+        doc.addElement(parentName);
67
+        String xml = iteratorXml(doc.getRootElement(),parentName,params,false);
68
+        return formatXML(xml);
69
+    }
70
+
71
+    /**
72
+     *
73
+     * MapToXml循环遍历创建xml节点
74
+     * 此方法在value中加入CDATA标识符
75
+     *
76
+     * @param element 根节点
77
+     * @param parentName 子节点名字
78
+     * @param params map数据
79
+     * @return String-->Xml
80
+     */
81
+
82
+    @SuppressWarnings("unchecked")
83
+    public static String iteratorXml(Element element,String parentName,Map<String,Object> params,boolean isCDATA) {
84
+        Element e = element.addElement(parentName);
85
+        Set<String> set = params.keySet();
86
+        for (Iterator<String> it = set.iterator(); it.hasNext();) {
87
+            String key = (String) it.next();
88
+            if(params.get(key) instanceof Map) {
89
+                iteratorXml(e,key,(Map<String,Object>)params.get(key),isCDATA);
90
+            }else {
91
+                String value = params.get(key)==null?"":params.get(key).toString();
92
+                if(!isCDATA) {
93
+                    e.addElement(key).addText(value);
94
+                }else {
95
+                    e.addElement(key).addCDATA(value);
96
+                }
97
+            }
98
+        }
99
+        return e.asXML();
100
+    }
101
+
102
+    /**
103
+     * 格式化xml,显示为容易看的XML格式
104
+     *
105
+     * @param inputXML
106
+     * @return
107
+     */
108
+    public static String formatXML(String inputXML){
109
+        String requestXML = null;
110
+        XMLWriter writer = null;
111
+        Document document = null;
112
+        try {
113
+            SAXReader reader = new SAXReader();
114
+            document = reader.read(new StringReader(inputXML));
115
+            if (document != null) {
116
+                StringWriter stringWriter = new StringWriter();
117
+                OutputFormat format = new OutputFormat("	", true);//格式化,每一级前的空格
118
+                format.setNewLineAfterDeclaration(false);	//xml声明与内容是否添加空行
119
+                format.setSuppressDeclaration(false);		//是否设置xml声明头部
120
+                format.setNewlines(true);		//设置分行
121
+                writer = new XMLWriter(stringWriter, format);
122
+                writer.write(document);
123
+                writer.flush();
124
+                requestXML = stringWriter.getBuffer().toString();
125
+            }
126
+            return requestXML;
127
+        } catch (Exception e1) {
128
+            e1.printStackTrace();
129
+            return null;
130
+        }finally {
131
+            if (writer != null) {
132
+                try {
133
+                    writer.close();
134
+                } catch (IOException e) {
135
+
136
+                }
137
+            }
138
+        }
139
+    }
140
+
141
+
142
+    /**
143
+     *
144
+     * 通过XML转换为Map<String,Object>
145
+     *
146
+     * @param xml 为String类型的Xml
147
+     * @return 第一个为Root节点,Root节点之后为Root的元素,如果为多层,可以通过key获取下一层Map
148
+     */
149
+    public static Map<String, Object> createMapByXml(String xml) {
150
+        Document doc = null;
151
+        try {
152
+            doc = DocumentHelper.parseText(xml);
153
+        } catch (DocumentException e) {
154
+            e.printStackTrace();
155
+        }
156
+        Map<String, Object> map = new HashMap<String, Object>();
157
+        if (doc == null)
158
+            return map;
159
+        Element rootElement = doc.getRootElement();
160
+        elementTomap(rootElement,map);
161
+        return map;
162
+    }
163
+
164
+    /***
165
+     *
166
+     * XmlToMap核心方法,里面有递归调用
167
+     *
168
+     * @param outele
169
+     * @param outmap
170
+     */
171
+    @SuppressWarnings("unchecked")
172
+    public static Map<String, Object> elementTomap (Element outele,Map<String,Object> outmap) {
173
+        List<Element> list = outele.elements();
174
+        int size = list.size();
175
+        if(size == 0){
176
+            outmap.put(outele.getName(), outele.getTextTrim());
177
+        }else{
178
+            Map<String, Object> innermap = new HashMap<String, Object>();
179
+            for(Element ele1 : list){
180
+                String eleName = ele1.getName();
181
+                Object obj =  innermap.get(eleName);
182
+                if(obj == null){
183
+                    elementTomap(ele1,innermap);
184
+                }else{
185
+                    if(obj instanceof java.util.Map){
186
+                        List<Map<String, Object>> list1 = new ArrayList<Map<String, Object>>();
187
+                        list1.add((Map<String, Object>) innermap.remove(eleName));
188
+                        elementTomap(ele1,innermap);
189
+                        list1.add((Map<String, Object>) innermap.remove(eleName));
190
+                        innermap.put(eleName, list1);
191
+                    }else{
192
+                        elementTomap(ele1,innermap);
193
+                        ((List<Map<String, Object>>)obj).add(innermap);
194
+                    }
195
+                }
196
+            }
197
+            outmap.put(outele.getName(), innermap);
198
+        }
199
+        return outmap;
200
+    }
201
+
202
+    /**
203
+     * Map or JSON 转换成Xml
204
+     *
205
+     * fastJSON实现了Map<String,Object> 所以此处直接传json 也可以的
206
+     */
207
+    public static String mapToXML(Map map, StringBuffer sb) {
208
+        Set set = map.keySet();
209
+        for (Iterator it = set.iterator(); it.hasNext(); ) {
210
+            String key = (String) it.next();
211
+            Object value = map.get(key);
212
+            if (null == value)
213
+                value = "";
214
+            if (value.getClass().getName().equals("java.util.ArrayList")) {
215
+                List list = (List) map.get(key);
216
+                sb.append("<" + key + ">");
217
+                for (int i = 0; i < list.size(); i++) {
218
+                    HashMap hm = (HashMap) list.get(i);
219
+                    mapToXML(hm, sb);
220
+                }
221
+                sb.append("</" + key + ">");
222
+
223
+            } else {
224
+                if (value instanceof HashMap) {
225
+                    sb.append("<" + key + ">");
226
+                    mapToXML((HashMap) value, sb);
227
+                    sb.append("</" + key + ">");
228
+                } else {
229
+                    sb.append("<" + key + ">" + value + "</" + key + ">");
230
+                }
231
+            }
232
+        }
233
+//        String xmlString = "<?xml version=\"1.0\" encoding=\"GBK\"?>\n" +
234
+//                "<Packet type=\"RESPONSE\" version=\"1.0\">\n" +
235
+//                "    <Head>\n" +
236
+//                "        <errorCode>00000</errorCode>\n" +
237
+//                "        <errorMessage>成功</errorMessage>\n" +
238
+//                "    </Head>\n" +
239
+//                "    <Body>\n" +
240
+//                "        <ResInformation>\n" +
241
+//                "            <User>\n" +
242
+//                "                <id>1</id>\n" +
243
+//                "                <name>张三</name>\n" +
244
+//                "                <age>18</age>\n" +
245
+//                "                <sex>男</sex>\n" +
246
+//                "            </User>\n" +
247
+//                "            <User>\n" +
248
+//                "                <id>2</id>\n" +
249
+//                "                <name>李四</name>\n" +
250
+//                "                <age>20</age>\n" +
251
+//                "                <sex>女</sex>\n" +
252
+//                "            </User>\n" +
253
+//                "            <User>\n" +
254
+//                "                <id>3</id>\n" +
255
+//                "                <name>王五</name>\n" +
256
+//                "                <age>19</age>\n" +
257
+//                "                <sex>女</sex>\n" +
258
+//                "            </User>\n" +
259
+//                "            <School>\n" +
260
+//                "                <id>3</id>\n" +
261
+//                "                <province>广东省</province>\n" +
262
+//                "                <city>深圳市</city>\n" +
263
+//                "                <name>XXXX大学</name>\n" +
264
+//                "            </School>\n" +
265
+//                "        </ResInformation>\n" +
266
+//                "    </Body>\n" +
267
+//                "</Packet>\n";
268
+        return sb.toString();
269
+    }
270
+
271
+}
272
+
273
+