| | |
| | | package com.hz.sms.dto; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | @Data |
| | | public class TemplateMessageDto { |
| | | /** 标识 */ |
| | | private String id; |
| | | /** 企业ID */ |
| | | private String corpid; |
| | | /** 成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个) */ |
| | | private String touser; |
| | | /** 部门ID列表,多个接收者用‘|’分隔,最多支持100个。 */ |
| | | private String toparty; |
| | | /** 标签ID列表,多个接收者用‘|’分隔,最多支持100个。 */ |
| | | private String totag; |
| | | /** 消息类型 ,此时固定为:miniprogram_notice */ |
| | | private String msgtype = "miniprogram_notice"; |
| | | /** 参数内容 */ |
| | | private TemplateMsgDto miniprogram_notice; |
| | | |
| | | /** 表示是否开启id转译,0表示否,1表示是,默认0 */ |
| | | private Integer enable_id_trans = 0; |
| | | /** 表示是否开启重复消息检查,0表示否,1表示是,默认0 */ |
| | | private Integer enable_duplicate_check = 0; |
| | | /** 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时 */ |
| | | private Integer duplicate_check_interval = 1800; |
| | | /** 企业微信appId - Y*/ |
| | | private String corpId; |
| | | /** 关联小程序appId - Y*/ |
| | | private String appId; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | /** 成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个) - Y*/ |
| | | private String touSer; |
| | | /** 部门ID列表,多个接收者用‘|’分隔,最多支持100个。- O */ |
| | | private String toParty; |
| | | /** 标签ID列表,多个接收者用‘|’分隔,最多支持100个。- O */ |
| | | private String toTag; |
| | | /** 消息类型 ,此时固定为:miniprogram_notice - Y*/ |
| | | private String msgType = "miniprogram_notice"; |
| | | /** 参数内容 - Y*/ |
| | | private TemplateMsgDto minIProgramNotice; |
| | | /** 发送模式 (0: 立即发送; 1:异步发送,默认1) - Y*/ |
| | | private Integer sendModel = SEND_TYPE_ASYNCHRONOUS; |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | /** 表示是否开启id转译,0表示否,1表示是,默认0 - N*/ |
| | | private Integer enableIdTrans = NUMBER_0; |
| | | /** 表示是否开启重复消息检查,0表示否,1表示是,默认0 - N*/ |
| | | private Integer enableDuplicateCheck = NUMBER_0; |
| | | /** 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时 - N*/ |
| | | private Integer duplicateCheckInterval = REPEAT_TIME_SECOND; |
| | | |
| | | public String getCorpid() { |
| | | return corpid; |
| | | } |
| | | /**该条信息在您业务系统内的ID,可不填 - N*/ |
| | | private String uid; |
| | | |
| | | public void setCorpid(String corpid) { |
| | | this.corpid = corpid; |
| | | } |
| | | /**数字0*/ |
| | | public static final int NUMBER_0 = 0; |
| | | /**数字1*/ |
| | | public static final int NUMBER_1 = 1; |
| | | |
| | | public String getTouser() { |
| | | return touser; |
| | | } |
| | | /**发送类型-立即发送*/ |
| | | public static final int SEND_TYPE_IMMEDIATELY = 0; |
| | | /**发送类型-异步发送*/ |
| | | public static final int SEND_TYPE_ASYNCHRONOUS = 1; |
| | | |
| | | public void setTouser(String touser) { |
| | | this.touser = touser; |
| | | } |
| | | /**重复消息检查的时间间隔 - 秒*/ |
| | | public static final int REPEAT_TIME_SECOND = 1800; |
| | | |
| | | public String getToparty() { |
| | | return toparty; |
| | | } |
| | | |
| | | public void setToparty(String toparty) { |
| | | this.toparty = toparty; |
| | | } |
| | | |
| | | public String getTotag() { |
| | | return totag; |
| | | } |
| | | |
| | | public void setTotag(String totag) { |
| | | this.totag = totag; |
| | | } |
| | | |
| | | public String getMsgtype() { |
| | | return msgtype; |
| | | } |
| | | |
| | | public void setMsgtype(String msgtype) { |
| | | this.msgtype = msgtype; |
| | | } |
| | | |
| | | public TemplateMsgDto getMiniprogram_notice() { |
| | | return miniprogram_notice; |
| | | } |
| | | |
| | | public void setMiniprogram_notice(TemplateMsgDto miniprogram_notice) { |
| | | this.miniprogram_notice = miniprogram_notice; |
| | | } |
| | | |
| | | public Integer getEnable_id_trans() { |
| | | return enable_id_trans; |
| | | } |
| | | |
| | | public void setEnable_id_trans(Integer enable_id_trans) { |
| | | this.enable_id_trans = enable_id_trans; |
| | | } |
| | | |
| | | public Integer getEnable_duplicate_check() { |
| | | return enable_duplicate_check; |
| | | } |
| | | |
| | | public void setEnable_duplicate_check(Integer enable_duplicate_check) { |
| | | this.enable_duplicate_check = enable_duplicate_check; |
| | | } |
| | | |
| | | public Integer getDuplicate_check_interval() { |
| | | return duplicate_check_interval; |
| | | } |
| | | |
| | | public void setDuplicate_check_interval(Integer duplicate_check_interval) { |
| | | this.duplicate_check_interval = duplicate_check_interval; |
| | | } |
| | | } |