2023-10-16 09:14:38 +08:00
|
|
|
|
package com.engine.recruit.util;
|
|
|
|
|
|
|
|
|
|
|
|
import weaver.common.MessageUtil;
|
2023-11-08 09:37:13 +08:00
|
|
|
|
import weaver.email.EmailWorkRunnable;
|
2023-10-16 09:14:38 +08:00
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @author:dxfeng
|
|
|
|
|
|
* @createTime: 2023/10/13
|
|
|
|
|
|
* @version: 1.0
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class RecruitMessageUtils {
|
|
|
|
|
|
public static boolean SendEmail(Map<String, Object> param) {
|
|
|
|
|
|
String sendTo = Util.null2String(param.get("sendTo"));
|
|
|
|
|
|
String emailTitle = Util.null2String(param.get("emailTitle"));
|
|
|
|
|
|
String emailContent = Util.null2String(param.get("emailContent"));
|
2023-10-24 15:26:07 +08:00
|
|
|
|
return SendEmail(sendTo, emailTitle, emailContent);
|
2023-10-16 09:14:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean sendSMS(Map<String, Object> param) {
|
|
|
|
|
|
String receiver = Util.null2String(param.get("receiver"));
|
|
|
|
|
|
String content = Util.null2String(param.get("content"));
|
2023-10-24 15:26:07 +08:00
|
|
|
|
return sendSMS(receiver, content);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean SendEmail(String sendTo, String emailTitle, String emailContent) {
|
|
|
|
|
|
return MessageUtil.sendEmail(sendTo, emailTitle, emailContent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-11-08 09:37:13 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* @param sendTo 收件人
|
|
|
|
|
|
* @param emailTitle 邮件标题
|
|
|
|
|
|
* @param emailContent 邮件内容
|
|
|
|
|
|
* @param imageFileIds 邮件附件,imageFile表记录id,多个时英文逗号分隔
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static boolean SendEmailWithFile(String sendTo, String emailTitle, String emailContent, String imageFileIds) {
|
|
|
|
|
|
EmailWorkRunnable emailWorkRunnable = new EmailWorkRunnable(sendTo, Util.toHtmlMode(emailTitle), Util.toHtmlMode(emailContent));
|
|
|
|
|
|
emailWorkRunnable.setImagefileids(imageFileIds);
|
|
|
|
|
|
return emailWorkRunnable.emailCommonRemind();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-24 15:26:07 +08:00
|
|
|
|
public static boolean sendSMS(String receiver, String content) {
|
2023-10-16 09:14:38 +08:00
|
|
|
|
return MessageUtil.sendSMS(receiver, content);
|
|
|
|
|
|
}
|
2023-11-08 09:37:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
2023-10-16 09:14:38 +08:00
|
|
|
|
}
|