File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 55import lombok .Builder ;
66import lombok .Data ;
77import lombok .NoArgsConstructor ;
8- import me .chanjar .weixin .cp .bean .external .msg .Image ;
9- import me .chanjar .weixin .cp .bean .external .msg .Link ;
10- import me .chanjar .weixin .cp .bean .external .msg .MiniProgram ;
11- import me .chanjar .weixin .cp .bean .external .msg .Text ;
8+ import me .chanjar .weixin .cp .bean .external .msg .*;
129import me .chanjar .weixin .cp .util .json .WxCpGsonBuilder ;
1310
1411import java .io .Serializable ;
1916 * <p>
2017 * Created by songfan on 2020/7/14.
2118 *
22- * @author songfan
19+ * @author songfan & Mr.Pan
2320 */
2421@ Data
2522@ Builder
2825public class WxCpMsgTemplate implements Serializable {
2926 private static final long serialVersionUID = 3172331565173474358L ;
3027
28+ /**
29+ * 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
30+ */
3131 @ SerializedName ("chat_type" )
3232 private String chatType ;
3333
34+ /**
35+ * 客户的外部联系人id列表,仅在chat_type为single时有效,不可与sender同时为空,最多可传入1万个客户
36+ */
3437 @ SerializedName ("external_userid" )
3538 private List <String > externalUserid ;
3639
40+ /**
41+ * 发送企业群发消息的成员userid,当类型为发送给客户群时必填
42+ */
3743 private String sender ;
3844
45+ /**
46+ * 消息文本内容,最多4000个字节
47+ */
3948 private Text text ;
4049
41- private Image image ;
42-
43- private Link link ;
44-
45- private MiniProgram miniprogram ;
50+ /**
51+ * 附件,最多支持添加9个附件
52+ */
53+ private List <Attachment > attachments ;
4654
4755 public static WxCpMsgTemplate fromJson (String json ) {
4856 return WxCpGsonBuilder .create ().fromJson (json , WxCpMsgTemplate .class );
Original file line number Diff line number Diff line change @@ -220,6 +220,12 @@ public class WxCpXmlMessage implements Serializable {
220220 @ XStreamConverter (value = LongArrayConverter .class )
221221 private Long [] departments ;
222222
223+ /**
224+ * 主部门
225+ */
226+ @ XStreamAlias ("MainDepartment" )
227+ private Long mainDepartment ;
228+
223229 /**
224230 * 手机号码.
225231 */
@@ -533,7 +539,7 @@ public static class SendPicsInfo implements Serializable {
533539 @ Data
534540 public static class Item implements Serializable {
535541 private static final long serialVersionUID = -6549728838848064881L ;
536-
542+
537543 @ XStreamAlias ("PicMd5Sum" )
538544 @ XStreamConverter (value = XStreamCDataConverter .class )
539545 private String picMd5Sum ;
You can’t perform that action at this time.
0 commit comments