|
@@ -14,8 +14,6 @@ import org.springframework.beans.factory.annotation.Value; |
|
@@ -14,8 +14,6 @@ import org.springframework.beans.factory.annotation.Value; |
14
|
import org.springframework.stereotype.Component;
|
14
|
import org.springframework.stereotype.Component;
|
15
|
|
15
|
|
16
|
import javax.annotation.Resource;
|
16
|
import javax.annotation.Resource;
|
17
|
-import java.text.ParsePosition;
|
|
|
18
|
-import java.text.SimpleDateFormat;
|
|
|
19
|
import java.util.Date;
|
17
|
import java.util.Date;
|
20
|
import java.util.List;
|
18
|
import java.util.List;
|
21
|
|
19
|
|
|
@@ -55,13 +53,10 @@ public class XmlUtils { |
|
@@ -55,13 +53,10 @@ public class XmlUtils { |
55
|
{
|
53
|
{
|
56
|
// 将String类型的xml字符串转成xml
|
54
|
// 将String类型的xml字符串转成xml
|
57
|
Document document = DocumentHelper.parseText(xmlStr);
|
55
|
Document document = DocumentHelper.parseText(xmlStr);
|
|
|
56
|
+
|
58
|
Element msg = document.getRootElement();
|
57
|
Element msg = document.getRootElement();
|
59
|
Element meta = msg.element("META");
|
58
|
Element meta = msg.element("META");
|
60
|
-
|
|
|
61
|
- String ddtm = meta.elementText("DDTM");
|
|
|
62
|
- SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
63
|
- ParsePosition pos = new ParsePosition(0);
|
|
|
64
|
- Date sendDateTime = formatter.parse(ddtm, pos);
|
59
|
+ Date sendDateTime = DateUtils.strToDateLong(meta.elementText("DDTM"));
|
65
|
|
60
|
|
66
|
XmlData xmlData = XmlData.builder()
|
61
|
XmlData xmlData = XmlData.builder()
|
67
|
.sendContent(msg.elementText("BODY"))
|
62
|
.sendContent(msg.elementText("BODY"))
|