| | |
| | | package com.hz.sms.dto; |
| | | |
| | | |
| | | import com.hx.util.StringUtils; |
| | | import lombok.Data; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SmsGeneralSendDto { |
| | | |
| | | /* 标识 (记录sms_general_item表数据的id)*/ |
| | | private String id; |
| | | /* 账号*/ |
| | | private String account; |
| | | /* 密码*/ |
| | | private String password; |
| | | /*签名*/ |
| | | private String sign; |
| | | /* 定时短信时间,格式为yyyyMMddHHmm,值小于或等于当前时间则立即发送,默认立即发送*/ |
| | | private String timestamp; |
| | | /*短信内容*/ |
| | | private String msg; |
| | | /*手机号码*/ |
| | | private String phone; |
| | | /*定时发送短信时间*/ |
| | | private String sendTime; |
| | | /*如需状态报告则传true*/ |
| | | private String report; |
| | | /*下发短信号码扩展码*/ |
| | | private String extend; |
| | | /*该条短信在您业务系统内的ID*/ |
| | | private String uid; |
| | | /*短信类型*/ |
| | | /**短信类型 - Y*/ |
| | | private Integer smsType; |
| | | /* 发送模式 (0: 立即发送; 1:异步发送)*/ |
| | | private Integer sendModel; |
| | | /**短信内容 - Y*/ |
| | | private String msg; |
| | | /**接收人名称 - N*/ |
| | | private String receiveMan; |
| | | /**手机号码 - Y*/ |
| | | private String phone; |
| | | /**定时发送短信时间,值小于或等于当前时间则立即发送,默认立即发送:格式yyyy-MM-dd HH:mm:dd - N*/ |
| | | private Date sendTime; |
| | | /**如需状态报告则传true - N*/ |
| | | private String report; |
| | | /**下发短信号码扩展码 - N*/ |
| | | private String extend; |
| | | /**该条短信在您业务系统内的ID,可不填 - N*/ |
| | | private String uid; |
| | | /** 发送模式 (0: 立即发送; 1:异步发送,默认1) - Y*/ |
| | | private Integer sendModel = SEND_TYPE_ASYNCHRONOUS; |
| | | |
| | | /**短信类型-短信验证码*/ |
| | | public static final int SMS_TYPE_VERIFICATION = 0; |
| | | /**短信类型-通知短信*/ |
| | | public static final int SMS_TYPE_NOTICE = 1; |
| | | /**短信类型-营销短信*/ |
| | | public static final int SMS_TYPE_MARKETING= 2; |
| | | |
| | | /**发送类型-立即发送*/ |
| | | public static final int SEND_TYPE_IMMEDIATELY = 0; |
| | | /**发送类型-异步发送*/ |
| | | public static final int SEND_TYPE_ASYNCHRONOUS = 1; |
| | | |
| | | /**数字0*/ |
| | | public static final int NUMBER_0 = 0; |
| | | /**数字1*/ |
| | | public static final int NUMBER_1 = 1; |
| | | |
| | | |
| | | public Date getDateSendTime(){ |
| | | try { |
| | | Date dateSendTime = new SimpleDateFormat("yyyyMMddHHmm").parse(sendTime); |
| | | return dateSendTime; |
| | | }catch (Exception e){ |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public String getReport() { |
| | | if (!StringUtils.isEmpty(report) && !"true".equals(report)){ |
| | | return null; |
| | | } |
| | | return report; |
| | | } |
| | | |
| | | } |