OutEquDataMsg.java
1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package com.jfinal.weixin.iot.msg;
import com.jfinal.weixin.sdk.msg.in.InMsg;
import com.jfinal.weixin.sdk.msg.out.OutMsg;
/**
* <pre>
* <xml>
* <ToUserName><![CDATA[%s]]></ToUserName>
* <FromUserName><![CDATA[%s]]></FromUserName>
* <CreateTime>%u</CreateTime>
* <MsgType><![CDATA[%s]]></MsgType>
* <DeviceType><![CDATA[%s]]></DeviceType>
* <DeviceID><![CDATA[%s]]></DeviceID>
* <SessionID>%u</SessionID>
* <Content><![CDATA[%s]]></Content>
* </xml>
* </pre>
*/
public class OutEquDataMsg extends OutMsg {
private static final long serialVersionUID = -1187439400934008473L;
private String DeviceType;
private String DeviceID;
private String content;
private String SessionID;
public OutEquDataMsg(InMsg inMsg) {
super(inMsg);
this.msgType = "device_text";
}
public OutEquDataMsg() {
this.msgType = "device_text";
}
@Override
protected void subXml(StringBuilder sb) {
if (null == content) {
throw new NullPointerException("content is null");
}
sb.append("<DeviceType><![CDATA[").append(DeviceType).append("]]></DeviceType>\n");
sb.append("<DeviceID><![CDATA[").append(DeviceID).append("]]></DeviceID>\n");
sb.append("<SessionID><![CDATA[").append(SessionID).append("]]></SessionID>\n");
sb.append("<Content><![CDATA[").append(content).append("]]></Content>\n");
}
public String getDeviceType() {
return DeviceType;
}
public void setDeviceType(String deviceType) {
DeviceType = deviceType;
}
public String getDeviceID() {
return DeviceID;
}
public void setDeviceID(String deviceID) {
DeviceID = deviceID;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getSessionID() {
return SessionID;
}
public void setSessionID(String sessionID) {
SessionID = sessionID;
}
}