Skip to content

Commit ce77578

Browse files
committed
增加微信推送用户领取卡券事件中所需两个属性 binarywang#210 并重构提取出部分内部类,避免WxMpXmlMessage类过于庞大
1 parent 4958d6d commit ce77578

File tree

5 files changed

+280
-198
lines changed

5 files changed

+280
-198
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package me.chanjar.weixin.mp.bean.message;
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
import com.thoughtworks.xstream.annotations.XStreamConverter;
5+
import me.chanjar.weixin.common.util.ToStringUtils;
6+
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
7+
8+
/**
9+
* <pre>
10+
* Created by BinaryWang on 2017/5/4.
11+
* </pre>
12+
*
13+
* @author Binary Wang
14+
*/
15+
@XStreamAlias("HardWare")
16+
public class HardWare {
17+
/**
18+
* 消息展示,目前支持myrank(排行榜)
19+
*/
20+
@XStreamAlias("MessageView")
21+
@XStreamConverter(value = XStreamCDataConverter.class)
22+
private String messageView;
23+
/**
24+
* 消息点击动作,目前支持ranklist(点击跳转排行榜)
25+
*/
26+
@XStreamAlias("MessageAction")
27+
@XStreamConverter(value = XStreamCDataConverter.class)
28+
private String messageAction;
29+
30+
@Override
31+
public String toString() {
32+
return ToStringUtils.toSimpleString(this);
33+
}
34+
35+
public String getMessageView() {
36+
return messageView;
37+
}
38+
39+
public void setMessageView(String messageView) {
40+
this.messageView = messageView;
41+
}
42+
43+
public String getMessageAction() {
44+
return messageAction;
45+
}
46+
47+
public void setMessageAction(String messageAction) {
48+
this.messageAction = messageAction;
49+
}
50+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package me.chanjar.weixin.mp.bean.message;
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
import com.thoughtworks.xstream.annotations.XStreamConverter;
5+
import me.chanjar.weixin.common.util.ToStringUtils;
6+
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
7+
8+
/**
9+
* <pre>
10+
* Created by BinaryWang on 2017/5/4.
11+
* </pre>
12+
*
13+
* @author Binary Wang
14+
*/
15+
@XStreamAlias("ScanCodeInfo")
16+
public class ScanCodeInfo {
17+
@XStreamAlias("ScanType")
18+
@XStreamConverter(value = XStreamCDataConverter.class)
19+
private String scanType;
20+
@XStreamAlias("ScanResult")
21+
@XStreamConverter(value = XStreamCDataConverter.class)
22+
private String scanResult;
23+
24+
@Override
25+
public String toString() {
26+
return ToStringUtils.toSimpleString(this);
27+
}
28+
29+
/**
30+
* 扫描类型,一般是qrcode
31+
*/
32+
public String getScanType() {
33+
34+
return this.scanType;
35+
}
36+
37+
public void setScanType(String scanType) {
38+
this.scanType = scanType;
39+
}
40+
41+
/**
42+
* 扫描结果,即二维码对应的字符串信息
43+
*/
44+
public String getScanResult() {
45+
return this.scanResult;
46+
}
47+
48+
public void setScanResult(String scanResult) {
49+
this.scanResult = scanResult;
50+
}
51+
52+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
package me.chanjar.weixin.mp.bean.message;
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
import com.thoughtworks.xstream.annotations.XStreamConverter;
5+
import me.chanjar.weixin.common.util.ToStringUtils;
6+
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
7+
8+
/**
9+
* <pre>
10+
* Created by BinaryWang on 2017/5/4.
11+
* </pre>
12+
*
13+
* @author Binary Wang
14+
*/
15+
@XStreamAlias("SendLocationInfo")
16+
public class SendLocationInfo {
17+
18+
@XStreamAlias("Location_X")
19+
@XStreamConverter(value = XStreamCDataConverter.class)
20+
private String locationX;
21+
22+
@XStreamAlias("Location_Y")
23+
@XStreamConverter(value = XStreamCDataConverter.class)
24+
private String locationY;
25+
26+
@XStreamAlias("Scale")
27+
@XStreamConverter(value = XStreamCDataConverter.class)
28+
private String scale;
29+
30+
@XStreamAlias("Label")
31+
@XStreamConverter(value = XStreamCDataConverter.class)
32+
private String label;
33+
34+
@XStreamAlias("Poiname")
35+
@XStreamConverter(value = XStreamCDataConverter.class)
36+
private String poiname;
37+
38+
@Override
39+
public String toString() {
40+
return ToStringUtils.toSimpleString(this);
41+
}
42+
43+
public String getLocationX() {
44+
return this.locationX;
45+
}
46+
47+
public void setLocationX(String locationX) {
48+
this.locationX = locationX;
49+
}
50+
51+
public String getLocationY() {
52+
return this.locationY;
53+
}
54+
55+
public void setLocationY(String locationY) {
56+
this.locationY = locationY;
57+
}
58+
59+
public String getScale() {
60+
return this.scale;
61+
}
62+
63+
public void setScale(String scale) {
64+
this.scale = scale;
65+
}
66+
67+
public String getLabel() {
68+
return this.label;
69+
}
70+
71+
public void setLabel(String label) {
72+
this.label = label;
73+
}
74+
75+
public String getPoiname() {
76+
return this.poiname;
77+
}
78+
79+
public void setPoiname(String poiname) {
80+
this.poiname = poiname;
81+
}
82+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
package me.chanjar.weixin.mp.bean.message;
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
import com.thoughtworks.xstream.annotations.XStreamConverter;
5+
import me.chanjar.weixin.common.util.ToStringUtils;
6+
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
7+
8+
import java.util.ArrayList;
9+
import java.util.List;
10+
11+
/**
12+
* <pre>
13+
* Created by BinaryWang on 2017/5/4.
14+
* </pre>
15+
*
16+
* @author Binary Wang
17+
*/
18+
@XStreamAlias("SendPicsInfo")
19+
public class SendPicsInfo {
20+
@XStreamAlias("PicList")
21+
protected final List<Item> picList = new ArrayList<>();
22+
@XStreamAlias("Count")
23+
private Long count;
24+
25+
@Override
26+
public String toString() {
27+
return ToStringUtils.toSimpleString(this);
28+
}
29+
30+
public Long getCount() {
31+
return this.count;
32+
}
33+
34+
public void setCount(Long count) {
35+
this.count = count;
36+
}
37+
38+
public List<Item> getPicList() {
39+
return this.picList;
40+
}
41+
42+
@XStreamAlias("item")
43+
public static class Item {
44+
@XStreamAlias("PicMd5Sum")
45+
@XStreamConverter(value = XStreamCDataConverter.class)
46+
private String picMd5Sum;
47+
48+
@Override
49+
public String toString() {
50+
return ToStringUtils.toSimpleString(this);
51+
}
52+
53+
public String getPicMd5Sum() {
54+
return this.picMd5Sum;
55+
}
56+
57+
public void setPicMd5Sum(String picMd5Sum) {
58+
this.picMd5Sum = picMd5Sum;
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)