Commit f8af5bcb by guojuxing

短信模板

parent 5507d501
package com.gic.operation.web.controller; package com.gic.operation.web.controller;
import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -24,6 +25,7 @@ import com.gic.marketing.api.dto.sms.SmsApplicationDTO; ...@@ -24,6 +25,7 @@ import com.gic.marketing.api.dto.sms.SmsApplicationDTO;
import com.gic.marketing.api.service.sms.SmsOuterApiService; import com.gic.marketing.api.service.sms.SmsOuterApiService;
import com.gic.operation.web.vo.EnterpriseSmsSignVO; import com.gic.operation.web.vo.EnterpriseSmsSignVO;
import com.gic.operation.web.vo.sms.SmsChannelVO; import com.gic.operation.web.vo.sms.SmsChannelVO;
import com.gic.operation.web.vo.sms.SmsTemplateVO;
/** /**
* *
...@@ -155,6 +157,61 @@ public class EnterpriseSmsController { ...@@ -155,6 +157,61 @@ public class EnterpriseSmsController {
return EnterpriseRestResponse.failure(smsResult); return EnterpriseRestResponse.failure(smsResult);
} }
/**
*
* @param enterpriseId
* @param channelType 短信通道类型(1:腾讯云, 2:大汉三通)
* @param search 模板名称/ID
* @param type 类型: 0普通 1营销
* @param beginTime
* @param endTime
* @param page
* @return
*/
@RequestMapping("/list-sms-channel-template")
public RestResponse channelSmsTemplatePage(Integer enterpriseId, Integer channelType,
String search, Integer type, Date beginTime, Date endTime,
Page<Void> page) {
if (channelType == null) {
//默认腾讯云通道
channelType = 1;
}
return ResultControllerUtils
.commonResult(smsOuterApiService.channelSmsTemplatePage(enterpriseId, channelType, search, type, beginTime, endTime, page), SmsTemplateVO.class);
}
@RequestMapping("/get-sms-channel-template-number")
public RestResponse countTemplateByChannel(Integer enterpriseId, Integer channelType) {
if (channelType == null) {
//默认腾讯云通道
channelType = 1;
}
return ResultControllerUtils
.commonResult(smsOuterApiService.countTemplateByChannel(enterpriseId, channelType));
}
@RequestMapping("/sync-sms-channel-template")
public RestResponse checkTemplateStatus(Integer enterpriseId, Integer channelType, boolean checkAll,
Long channelTemplateId) {
if (channelType == null) {
//默认腾讯云通道
channelType = 1;
}
return ResultControllerUtils
.commonResult(smsOuterApiService.checkTemplateStatus(enterpriseId, channelType, checkAll, channelTemplateId));
}
@RequestMapping("/init-sms-channel-template")
public RestResponse initAddChannelTemplate(Integer enterpriseId, Integer channelType) {
if (channelType == null) {
//默认腾讯云通道
channelType = 1;
}
return ResultControllerUtils
.commonResult(smsOuterApiService.initAddChannelTemplate(enterpriseId, channelType));
}
/** /**
* 是否符合短信业务配置条件 * 是否符合短信业务配置条件
* @param enterpriseId * @param enterpriseId
......
package com.gic.operation.web.vo.sms;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 短信通道模板列表
* @ClassName: SmsTemplateVO

* @Description: 

* @author guojuxing

* @date 2020/11/12 10:49 AM

*/
public class SmsTemplateVO implements Serializable{
private static final long serialVersionUID = -4271435356220392959L;
/**
* 0普通 1营销
*/
private Integer type;
/**
* 模板名称
*/
private String name;
/**
* 模板内容 (变量)
*/
private String content;
/**
* 模板内容 ({1}转化为 {会员名称})
*/
private String contentDesc;
private Date createTime;
private Date updateTime;
private Long creatorId;
private String creatorName;
/** 状态:0:已通过;1:待审核;2:已拒绝 */
private Integer status;
/** 渠道短信id **/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long channelTemplateId;
/**短信通道类型(1:腾讯云, 2:大汉三通)*/
private Integer channelType;
/**第三方运营商模板id*/
private String templateId;
public Integer getType() {
return type;
}
public SmsTemplateVO setType(Integer type) {
this.type = type;
return this;
}
public String getName() {
return name;
}
public SmsTemplateVO setName(String name) {
this.name = name;
return this;
}
public String getContent() {
return content;
}
public SmsTemplateVO setContent(String content) {
this.content = content;
return this;
}
public String getContentDesc() {
return contentDesc;
}
public SmsTemplateVO setContentDesc(String contentDesc) {
this.contentDesc = contentDesc;
return this;
}
public Date getCreateTime() {
return createTime;
}
public SmsTemplateVO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public SmsTemplateVO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
public Long getCreatorId() {
return creatorId;
}
public SmsTemplateVO setCreatorId(Long creatorId) {
this.creatorId = creatorId;
return this;
}
public String getCreatorName() {
return creatorName;
}
public SmsTemplateVO setCreatorName(String creatorName) {
this.creatorName = creatorName;
return this;
}
public Integer getStatus() {
return status;
}
public SmsTemplateVO setStatus(Integer status) {
this.status = status;
return this;
}
public Long getChannelTemplateId() {
return channelTemplateId;
}
public SmsTemplateVO setChannelTemplateId(Long channelTemplateId) {
this.channelTemplateId = channelTemplateId;
return this;
}
public Integer getChannelType() {
return channelType;
}
public SmsTemplateVO setChannelType(Integer channelType) {
this.channelType = channelType;
return this;
}
public String getTemplateId() {
return templateId;
}
public SmsTemplateVO setTemplateId(String templateId) {
this.templateId = templateId;
return this;
}
@Override
public String toString() {
return "SmsTemplateVO{" +
"type=" + type +
", name='" + name + '\'' +
", content='" + content + '\'' +
", contentDesc='" + contentDesc + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", creatorId=" + creatorId +
", creatorName='" + creatorName + '\'' +
", status=" + status +
", channelTemplateId=" + channelTemplateId +
", channelType=" + channelType +
", templateId='" + templateId + '\'' +
'}';
}
}
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