🔧 简化 sms 模块的 VO
parent
8b67111733
commit
e61ecb63dd
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 短信渠道创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SmsChannelCreateReqVO extends SmsChannelBaseVO {
|
||||
|
||||
@Schema(description = "渠道编码,参见 SmsChannelEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "YUN_PIAN")
|
||||
@NotNull(message = "渠道编码不能为空")
|
||||
private String code;
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 短信渠道更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SmsChannelUpdateReqVO extends SmsChannelBaseVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@ -1,94 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.log;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.JsonConvert;
|
||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 短信日志 Excel VO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class SmsLogExcelVO {
|
||||
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("短信渠道编号")
|
||||
private Long channelId;
|
||||
|
||||
@ExcelProperty("短信渠道编码")
|
||||
private String channelCode;
|
||||
|
||||
@ExcelProperty("模板编号")
|
||||
private Long templateId;
|
||||
|
||||
@ExcelProperty("模板编码")
|
||||
private String templateCode;
|
||||
|
||||
@ExcelProperty(value = "短信类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_TEMPLATE_TYPE)
|
||||
private Integer templateType;
|
||||
|
||||
@ExcelProperty("短信内容")
|
||||
private String templateContent;
|
||||
|
||||
@ExcelProperty(value = "短信参数", converter = JsonConvert.class)
|
||||
private Map<String, Object> templateParams;
|
||||
|
||||
@ExcelProperty("短信 API 的模板编号")
|
||||
private String apiTemplateId;
|
||||
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("用户编号")
|
||||
private Long userId;
|
||||
|
||||
@ExcelProperty(value = "用户类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.USER_TYPE)
|
||||
private Integer userType;
|
||||
|
||||
@ExcelProperty(value = "发送状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_SEND_STATUS)
|
||||
private Integer sendStatus;
|
||||
|
||||
@ExcelProperty("发送时间")
|
||||
private LocalDateTime sendTime;
|
||||
|
||||
@ExcelProperty("短信 API 发送结果的编码")
|
||||
private String apiSendCode;
|
||||
|
||||
@ExcelProperty("短信 API 发送失败的提示")
|
||||
private String apiSendMsg;
|
||||
|
||||
@ExcelProperty("短信 API 发送返回的唯一请求 ID")
|
||||
private String apiRequestId;
|
||||
|
||||
@ExcelProperty("短信 API 发送返回的序号")
|
||||
private String apiSerialNo;
|
||||
|
||||
@ExcelProperty(value = "接收状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_RECEIVE_STATUS)
|
||||
private Integer receiveStatus;
|
||||
|
||||
@ExcelProperty("接收时间")
|
||||
private LocalDateTime receiveTime;
|
||||
|
||||
@ExcelProperty("API 接收结果的编码")
|
||||
private String apiReceiveCode;
|
||||
|
||||
@ExcelProperty("API 接收结果的说明")
|
||||
private String apiReceiveMsg;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 短信模板创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SmsTemplateCreateReqVO extends SmsTemplateBaseVO {
|
||||
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 短信模板 Excel VO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class SmsTemplateExcelVO {
|
||||
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty(value = "短信签名", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_TEMPLATE_TYPE)
|
||||
private Integer type;
|
||||
|
||||
@ExcelProperty(value = "开启状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COMMON_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty("模板编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("模板名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("模板内容")
|
||||
private String content;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("短信 API 的模板编号")
|
||||
private String apiTemplateId;
|
||||
|
||||
@ExcelProperty("短信渠道编号")
|
||||
private Long channelId;
|
||||
|
||||
@ExcelProperty(value = "短信渠道编码", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_CHANNEL_CODE)
|
||||
private String channelCode;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,29 +1,69 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 短信模板 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SmsTemplateRespVO extends SmsTemplateBaseVO {
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SmsTemplateRespVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "短信渠道编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ALIYUN")
|
||||
private String channelCode;
|
||||
@Schema(description = "短信类型,参见 SmsTemplateTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "短信签名", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_TEMPLATE_TYPE)
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "开启状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "开启状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COMMON_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "test_01")
|
||||
@ExcelProperty("模板编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao")
|
||||
@ExcelProperty("模板名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好,{name}。你长的太{like}啦!")
|
||||
@ExcelProperty("模板内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "参数数组", example = "name,code")
|
||||
private List<String> params;
|
||||
|
||||
@Schema(description = "备注", example = "哈哈哈")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "短信 API 的模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4383920")
|
||||
@ExcelProperty("短信 API 的模板编号")
|
||||
private String apiTemplateId;
|
||||
|
||||
@Schema(description = "短信渠道编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@ExcelProperty("短信渠道编号")
|
||||
private Long channelId;
|
||||
|
||||
@Schema(description = "短信渠道编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "ALIYUN")
|
||||
@ExcelProperty(value = "短信渠道编码", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SMS_CHANNEL_CODE)
|
||||
private String channelCode;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.sms.vo.template;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 短信模板更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SmsTemplateUpdateReqVO extends SmsTemplateBaseVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.convert.sms;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelCreateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelSimpleRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.channel.SmsChannelUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsChannelDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.sms.core.property.SmsChannelProperties;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信渠道 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsChannelConvert {
|
||||
|
||||
SmsChannelConvert INSTANCE = Mappers.getMapper(SmsChannelConvert.class);
|
||||
|
||||
SmsChannelDO convert(SmsChannelCreateReqVO bean);
|
||||
|
||||
SmsChannelDO convert(SmsChannelUpdateReqVO bean);
|
||||
|
||||
SmsChannelRespVO convert(SmsChannelDO bean);
|
||||
|
||||
List<SmsChannelRespVO> convertList(List<SmsChannelDO> list);
|
||||
|
||||
PageResult<SmsChannelRespVO> convertPage(PageResult<SmsChannelDO> page);
|
||||
|
||||
List<SmsChannelSimpleRespVO> convertList03(List<SmsChannelDO> list);
|
||||
|
||||
SmsChannelProperties convert02(SmsChannelDO channel);
|
||||
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.convert.sms;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogExcelVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogRespVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信日志 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface SmsLogConvert {
|
||||
|
||||
SmsLogConvert INSTANCE = Mappers.getMapper(SmsLogConvert.class);
|
||||
|
||||
SmsLogRespVO convert(SmsLogDO bean);
|
||||
|
||||
List<SmsLogRespVO> convertList(List<SmsLogDO> list);
|
||||
|
||||
PageResult<SmsLogRespVO> convertPage(PageResult<SmsLogDO> page);
|
||||
|
||||
List<SmsLogExcelVO> convertList02(List<SmsLogDO> list);
|
||||
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
package cn.iocoder.yudao.module.system.convert.sms;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateCreateReqVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateExcelVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateRespVO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.sms.vo.template.SmsTemplateUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsTemplateDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface SmsTemplateConvert {
|
||||
|
||||
SmsTemplateConvert INSTANCE = Mappers.getMapper(SmsTemplateConvert.class);
|
||||
|
||||
SmsTemplateDO convert(SmsTemplateCreateReqVO bean);
|
||||
|
||||
SmsTemplateDO convert(SmsTemplateUpdateReqVO bean);
|
||||
|
||||
SmsTemplateRespVO convert(SmsTemplateDO bean);
|
||||
|
||||
List<SmsTemplateRespVO> convertList(List<SmsTemplateDO> list);
|
||||
|
||||
PageResult<SmsTemplateRespVO> convertPage(PageResult<SmsTemplateDO> page);
|
||||
|
||||
List<SmsTemplateExcelVO> convertList02(List<SmsTemplateDO> list);
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue