Commit b7db143f authored by qinxunjia's avatar qinxunjia

新增DTO,修改类名

parent 16449ffb
package com.jz.sms.api;
import com.jz.sms.chuanlan.service.SendService;
import com.jz.sms.chuanlan.service.CLSmsService;
import com.jz.sms.dto.XfaceDmHubTemplateRequestDTO;
import com.jz.sms.dto.XfaceDmHubTemplateResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
public class BizController {
@Autowired
private SendService service;
private CLSmsService service;
@RequestMapping("index")
public String index() {
......
......@@ -3,8 +3,15 @@ package com.jz.sms.chuanlan.service;
import com.jz.sms.dto.XfaceDmHubTemplateRequestDTO;
import com.jz.sms.dto.XfaceDmHubTemplateResponseDTO;
public interface SendService {
public interface CLSmsService {
XfaceDmHubTemplateResponseDTO send(XfaceDmHubTemplateRequestDTO requestDTO);
XfaceDmHubTemplateResponseDTO createTemplate(XfaceDmHubTemplateRequestDTO requestDTO);
XfaceDmHubTemplateResponseDTO sendByFixed(XfaceDmHubTemplateRequestDTO requestDTO);
XfaceDmHubTemplateResponseDTO sendByVariable(XfaceDmHubTemplateRequestDTO requestDTO);
}
package com.jz.sms.chuanlan.service.impl;
import com.jz.sms.chuanlan.service.SendService;
import com.jz.sms.chuanlan.service.CLSmsService;
import com.jz.sms.dto.XfaceClTemplateRequestDTO;
import com.jz.sms.dto.XfaceClTemplateResponseDTO;
import com.jz.sms.dto.XfaceDmHubTemplateRequestDTO;
......@@ -10,11 +10,11 @@ import org.springframework.stereotype.Service;
@Service
public class SendServiceImpl implements SendService {
public class CLSmsServiceImpl implements CLSmsService {
@Override
public XfaceDmHubTemplateResponseDTO send(XfaceDmHubTemplateRequestDTO requestDTO) {
public XfaceDmHubTemplateResponseDTO createTemplate(XfaceDmHubTemplateRequestDTO requestDTO) {
/**
* 调用创蓝的业务逻辑.....
* requestDTO.getXXX....
......@@ -29,4 +29,18 @@ public class SendServiceImpl implements SendService {
return responseDTO;
}
@Override
public XfaceDmHubTemplateResponseDTO sendByFixed(XfaceDmHubTemplateRequestDTO requestDTO) {
return null;
}
@Override
public XfaceDmHubTemplateResponseDTO sendByVariable(XfaceDmHubTemplateRequestDTO requestDTO) {
return null;
}
}
package com.jz.sms.dto;
public class XfaceClSendFiexdRequestDTO {
/**
* 创蓝API账号,必填
*/
private String account;
/**
* 创蓝API密码,必填
*/
private String password;
/**
* 短信内容。长度不能超过536个字符,必填
*/
private String msg;
/**
* 机号码。多个手机号码使用英文逗号分隔,必填
*/
private String phone;
/**
* 定时发送短信时间。格式为yyyyMMddHHmm,值小于或等于当前时间则立即发送,默认立即发送,选填
*/
private String sendtime;
/**
* 是否需要状态报告(默认false),选填
*/
private String report;
/**
* 下发短信号码扩展码,纯数字,建议1-3位,选填
*/
private String extend;
/**
* 该条短信在您业务系统内的ID,如订单号或者短信发送记录流水号,选填
*/
private String uid;
public XfaceClSendFiexdRequestDTO() {
}
public XfaceClSendFiexdRequestDTO(String account, String password, String msg, String phone) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.phone = phone;
}
public XfaceClSendFiexdRequestDTO(String account, String password, String msg, String phone, String report) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.phone = phone;
this.report = report;
}
public XfaceClSendFiexdRequestDTO(String account, String password, String msg, String phone, String report, String sendtime) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.phone = phone;
this.sendtime = sendtime;
this.report = report;
}
public XfaceClSendFiexdRequestDTO(String account, String password, String msg, String phone, String sendtime, String report, String uid) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.phone = phone;
this.sendtime = sendtime;
this.report = report;
this.uid = uid;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime;
}
public String getReport() {
return report;
}
public void setReport(String report) {
this.report = report;
}
public String getExtend() {
return extend;
}
public void setExtend(String extend) {
this.extend = extend;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
}
package com.jz.sms.dto;
public class XfaceClSendFiexdResponseDTO {
/**
* 响应时间
*/
private String time;
/**
* 消息id
*/
private String msgId;
/**
* 状态码说明(成功返回空)
*/
private String errorMsg;
/**
* 状态码(详细参考提交响应状态码)
*/
private String code;
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getMsgId() {
return msgId;
}
public void setMsgId(String msgId) {
this.msgId = msgId;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Override
public String toString() {
return "SmsSingleResponse [time=" + time + ", msgId=" + msgId + ", errorMsg=" + errorMsg + ", code=" + code
+ "]";
}
}
package com.jz.sms.dto;
public class XfaceClSendVariableRequestDTO {
/**
* 创蓝API账号,必填
*/
private String account;
/**
* 创蓝API密码,必填
*/
private String password;
/**
* 短信内容。长度不能超过536个字符,必填
*/
private String msg;
/**
* 手机号码和变量参数,多组参数使用英文分号;区分,必填
*/
private String params;
/**
* 定时发送短信时间。格式为yyyyMMddHHmm,值小于或等于当前时间则立即发送,默认立即发送,选填
*/
private String sendtime;
/**
* 是否需要状态报告(默认false),选填
*/
private String report;
/**
* 下发短信号码扩展码,纯数字,建议1-3位,选填
*/
private String extend;
/**
* 该条短信在您业务系统内的ID,如订单号或者短信发送记录流水号,选填
*/
private String uid;
public XfaceClSendVariableRequestDTO() {
}
public XfaceClSendVariableRequestDTO(String account, String password, String msg, String params) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.params = params;
}
public XfaceClSendVariableRequestDTO(String account, String password, String msg, String params, String report) {
super();
this.account = account;
this.password = password;
this.msg = msg;
this.params = params;
this.report = report;
}
// public SmsVarableRequest(String account, String password, String msg, String params, String sendtime) {
// super();
// this.account = account;
// this.password = password;
// this.msg = msg;
// this.params = params;
// this.sendtime = sendtime;
// }
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime;
}
public String getReport() {
return report;
}
public void setReport(String report) {
this.report = report;
}
public String getExtend() {
return extend;
}
public void setExtend(String extend) {
this.extend = extend;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getParams() {
return params;
}
public void setParams(String params) {
this.params = params;
}
}
package com.jz.sms.dto;
public class XfaceClSendVariableResponseDTO {
/**
* 响应时间
*/
private String time;
/**
* 消息id
*/
private String msgId;
/**
* 状态码说明(成功返回空)
*/
private String errorMsg;
/**
* 失败的个数
*/
private String failNum;
/**
* 成功的个数
*/
private String successNum;
/**
* 状态码(详细参考提交响应状态码)
*/
private String code;
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getMsgId() {
return msgId;
}
public void setMsgId(String msgId) {
this.msgId = msgId;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getFailNum() {
return failNum;
}
public void setFailNum(String failNum) {
this.failNum = failNum;
}
public String getSuccessNum() {
return successNum;
}
public void setSuccessNum(String successNum) {
this.successNum = successNum;
}
@Override
public String toString() {
return "SmsVarableResponse [time=" + time + ", msgId=" + msgId + ", errorMsg=" + errorMsg + ", failNum="
+ failNum + ", successNum=" + successNum + ", code=" + code + "]";
}
}
package com.jz.sms.dto;
public class XfaceDmHubBatchSendRequestDTO {
}
package com.jz.sms.dto;
public class XfaceDmHubBatchSendResponseDTO {
}
package com.jz.sms.dto;
public class XfaceDmHubSendRequestDTO {
}
package com.jz.sms.dto;
public class XfaceDmHubSendResponseDTO {
}
......@@ -10,13 +10,9 @@ import org.springframework.stereotype.Service;
@Service
public class MessageService {
/** 基础配置 */
@Autowired
private SMSConfig smsComfig;
/** 数据层 */
@Autowired
private MessageMapper messageMapper;
// @Autowired
// private MessageMapper messageMapper;
/**
* 短信模板创建
......
package com.jz.sms.wrapper.inquiry;
import org.springframework.stereotype.Service;
@Service
public class XfaceTempLateListWrapperImpl {
}
......@@ -4,7 +4,9 @@ import com.jz.sms.dto.XfaceDmHubTemplateRequestDTO;
import com.jz.sms.dto.XfaceDmHubTemplateResponseDTO;
import com.jz.sms.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class XfaceCreateTempLateWrapperImpl {
@Autowired
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment