mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-23 10:58:34 +08:00
add 增加 资源服务 短信与邮件 远程接口实现
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.resource.api;
|
||||
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 邮件服务
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface RemoteMailService {
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
*
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
*/
|
||||
void send(String to, String subject, String text) throws ServiceException;
|
||||
|
||||
/**
|
||||
* 发送邮件带附件
|
||||
*
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
* @param fileList 附件
|
||||
*/
|
||||
void sendWithAttachment(String to, String subject, String text, List<File> fileList) throws ServiceException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.resource.api;
|
||||
|
||||
import com.ruoyi.common.core.exception.ServiceException;
|
||||
import com.ruoyi.resource.api.domain.SysFile;
|
||||
import com.ruoyi.resource.api.domain.SysSms;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 短信服务
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
public interface RemoteSmsService {
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
*
|
||||
* @param phones 电话号(多个逗号分割)
|
||||
* @param templateId 模板id
|
||||
* @param param 模板对应参数
|
||||
*/
|
||||
SysSms send(String phones, String templateId, Map<String, String> param) throws ServiceException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.resource.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文件信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
public class SysSms implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 是否成功
|
||||
*/
|
||||
private Boolean isSuccess;
|
||||
|
||||
/**
|
||||
* 响应消息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 实际响应体
|
||||
*/
|
||||
private Object response;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user