mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 16:18:51 +08:00
🎨 #2391 【企业微信】企业群发消息接口结构调整
This commit is contained in:
parent
421fbd4993
commit
a5cd1a6cd5
@ -5,10 +5,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import me.chanjar.weixin.cp.bean.external.msg.Image;
|
import me.chanjar.weixin.cp.bean.external.msg.*;
|
||||||
import me.chanjar.weixin.cp.bean.external.msg.Link;
|
|
||||||
import me.chanjar.weixin.cp.bean.external.msg.MiniProgram;
|
|
||||||
import me.chanjar.weixin.cp.bean.external.msg.Text;
|
|
||||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -19,7 +16,7 @@ import java.util.List;
|
|||||||
* <p>
|
* <p>
|
||||||
* Created by songfan on 2020/7/14.
|
* Created by songfan on 2020/7/14.
|
||||||
*
|
*
|
||||||
* @author songfan
|
* @author songfan & Mr.Pan
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@ -28,21 +25,32 @@ import java.util.List;
|
|||||||
public class WxCpMsgTemplate implements Serializable {
|
public class WxCpMsgTemplate implements Serializable {
|
||||||
private static final long serialVersionUID = 3172331565173474358L;
|
private static final long serialVersionUID = 3172331565173474358L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
|
||||||
|
*/
|
||||||
@SerializedName("chat_type")
|
@SerializedName("chat_type")
|
||||||
private String chatType;
|
private String chatType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户的外部联系人id列表,仅在chat_type为single时有效,不可与sender同时为空,最多可传入1万个客户
|
||||||
|
*/
|
||||||
@SerializedName("external_userid")
|
@SerializedName("external_userid")
|
||||||
private List<String> externalUserid;
|
private List<String> externalUserid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送企业群发消息的成员userid,当类型为发送给客户群时必填
|
||||||
|
*/
|
||||||
private String sender;
|
private String sender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息文本内容,最多4000个字节
|
||||||
|
*/
|
||||||
private Text text;
|
private Text text;
|
||||||
|
|
||||||
private Image image;
|
/**
|
||||||
|
* 附件,最多支持添加9个附件
|
||||||
private Link link;
|
*/
|
||||||
|
private List<Attachment> attachments;
|
||||||
private MiniProgram miniprogram;
|
|
||||||
|
|
||||||
public static WxCpMsgTemplate fromJson(String json) {
|
public static WxCpMsgTemplate fromJson(String json) {
|
||||||
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class);
|
return WxCpGsonBuilder.create().fromJson(json, WxCpMsgTemplate.class);
|
||||||
|
@ -220,6 +220,12 @@ public class WxCpXmlMessage implements Serializable {
|
|||||||
@XStreamConverter(value = LongArrayConverter.class)
|
@XStreamConverter(value = LongArrayConverter.class)
|
||||||
private Long[] departments;
|
private Long[] departments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主部门
|
||||||
|
*/
|
||||||
|
@XStreamAlias("MainDepartment")
|
||||||
|
private Long mainDepartment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号码.
|
* 手机号码.
|
||||||
*/
|
*/
|
||||||
@ -533,7 +539,7 @@ public class WxCpXmlMessage implements Serializable {
|
|||||||
@Data
|
@Data
|
||||||
public static class Item implements Serializable {
|
public static class Item implements Serializable {
|
||||||
private static final long serialVersionUID = -6549728838848064881L;
|
private static final long serialVersionUID = -6549728838848064881L;
|
||||||
|
|
||||||
@XStreamAlias("PicMd5Sum")
|
@XStreamAlias("PicMd5Sum")
|
||||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||||
private String picMd5Sum;
|
private String picMd5Sum;
|
||||||
|
Loading…
Reference in New Issue
Block a user