安徽省公司短信平台
This commit is contained in:
parent
40576bf75b
commit
db20e6514c
|
|
@ -100,6 +100,15 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 省公司短信平台sms-util -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ahsbd</groupId>
|
||||||
|
<artifactId>sms-util</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${project.basedir}/lib/sms-util-1.0.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -108,6 +117,9 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<includeSystemScope>true</includeSystemScope>
|
||||||
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.bonus.common.core.constant.SecurityConstants;
|
||||||
import com.bonus.common.core.domain.R;
|
import com.bonus.common.core.domain.R;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.security.service.EmailService;
|
import com.bonus.common.security.service.EmailService;
|
||||||
import com.bonus.common.security.service.SmsService;
|
|
||||||
import com.bonus.system.api.RemoteUserService;
|
import com.bonus.system.api.RemoteUserService;
|
||||||
import com.bonus.system.api.model.LoginUser;
|
import com.bonus.system.api.model.LoginUser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.bonus.common.core.domain.R;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
import com.bonus.common.security.service.EmailService;
|
import com.bonus.common.security.service.EmailService;
|
||||||
import com.bonus.common.security.service.SmsService;
|
|
||||||
import com.bonus.config.SystemConfig;
|
import com.bonus.config.SystemConfig;
|
||||||
import com.bonus.system.api.RemoteUserService;
|
import com.bonus.system.api.RemoteUserService;
|
||||||
import com.bonus.system.api.model.LoginUser;
|
import com.bonus.system.api.model.LoginUser;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.bonus.auth.service;
|
||||||
|
|
||||||
|
import com.bonus.common.core.constant.CacheConstants;
|
||||||
|
import com.bonus.common.core.exception.CaptchaException;
|
||||||
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
|
import com.bonus.common.core.utils.VerificationCodeUtils;
|
||||||
|
import com.bonus.auth.utils.SmsUtils;
|
||||||
|
import com.bonus.common.redis.service.RedisService;
|
||||||
|
import com.bonus.common.security.config.VerificationCodeConfig;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import static com.bonus.common.core.utils.VerificationCodeUtils.CodeType.NUMERIC;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bonus
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class SmsService {
|
||||||
|
@Resource
|
||||||
|
private VerificationCodeConfig verificationCodeConfig;
|
||||||
|
@Resource
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成手机验证码
|
||||||
|
*
|
||||||
|
* @return AjaxResult
|
||||||
|
* @throws CaptchaException 自定义captcha 异常
|
||||||
|
*/
|
||||||
|
public void sendSimplePhone(String to) {
|
||||||
|
if (StringUtils.isEmpty(to)) {
|
||||||
|
throw new CaptchaException("手机号不能为空");
|
||||||
|
}
|
||||||
|
String code = VerificationCodeUtils.generateVerificationCode(NUMERIC);
|
||||||
|
String str = verificationCodeConfig.getContent().replace("<code>", code);
|
||||||
|
str = str.replace("<time>", verificationCodeConfig.getTime().toString());
|
||||||
|
//String s = SmsUtils.smsToken(to, str, "");
|
||||||
|
String s = SmsUtils.sendMsgToSms(Arrays.asList(to), str);
|
||||||
|
log.error("省公司短信平台发送短信返回结果=" + s);
|
||||||
|
if (StringUtils.isNotEmpty(s)) {
|
||||||
|
if (s.contains("ok")) {
|
||||||
|
String verifyKey = CacheConstants.VERIFICATION_CODE + StringUtils.nvl(to, "");
|
||||||
|
redisService.setCacheObject(verifyKey, code, verificationCodeConfig.getTime(), TimeUnit.MINUTES);
|
||||||
|
} else {
|
||||||
|
throw new CaptchaException("获取短信失败");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new CaptchaException("获取短信失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.auth.service;
|
package com.bonus.auth.service;
|
||||||
|
|
||||||
|
import com.bonus.auth.utils.SmsUtils;
|
||||||
import com.bonus.common.core.constant.CacheConstants;
|
import com.bonus.common.core.constant.CacheConstants;
|
||||||
import com.bonus.common.core.constant.Constants;
|
import com.bonus.common.core.constant.Constants;
|
||||||
import com.bonus.common.core.domain.R;
|
import com.bonus.common.core.domain.R;
|
||||||
|
|
@ -7,7 +8,6 @@ import com.bonus.common.core.exception.CaptchaException;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.VerificationCodeUtils;
|
import com.bonus.common.core.utils.VerificationCodeUtils;
|
||||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.redis.service.RedisService;
|
import com.bonus.common.redis.service.RedisService;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.bonus.auth.utils;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.ah.sbd.SmsTool;
|
||||||
|
import com.ah.sbd.utils.param.BatchSmsByContentParam;
|
||||||
|
import com.ah.sbd.utils.param.SmsParam;
|
||||||
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
|
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SmsUtils {
|
||||||
|
// 安徽省公司短信平台key
|
||||||
|
public static final String ANHUI_COMPANY_SMS_KEY = "Wq1FZobZC5iJIAGKWh6gpKUmdGKBOQq7koHmx+Vg49g/dSjSFlw+2qRQmMmyXvJT";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送消息到短信
|
||||||
|
*
|
||||||
|
* @param phoneNumbers 电话号码列表,可能包含无效或重复的号码
|
||||||
|
* @param msg 要发送的短信消息内容
|
||||||
|
* @return 发送短信的结果,具体形式依赖于SmsUtils.smsToken的实现
|
||||||
|
* 此方法首先检查电话号码列表是否为空,如果为空,则直接返回空字符串。
|
||||||
|
* 接下来,它会移除列表中所有为空的电话号码,
|
||||||
|
* 然后对列表中超过11位的电话号码进行解密处理,
|
||||||
|
* 确保只有有效的电话号码被用来发送短信。
|
||||||
|
*/
|
||||||
|
public static String sendMsgToSms(List<String> phoneNumbers, String msg) {
|
||||||
|
// 检查电话号码列表和消息内容是否有效
|
||||||
|
if (CollectionUtils.isEmpty(phoneNumbers) || StringUtils.isBlank(msg)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤掉无效的电话号码
|
||||||
|
phoneNumbers.removeIf(StringUtils::isEmpty);
|
||||||
|
|
||||||
|
// 对超过11位的电话号码进行解密处理
|
||||||
|
phoneNumbers.replaceAll(phoneNumber ->
|
||||||
|
phoneNumber.length() > 11 ? Sm4Utils.decrypt(phoneNumber) : phoneNumber
|
||||||
|
);
|
||||||
|
|
||||||
|
// 根据电话号码数量发送短信
|
||||||
|
if (phoneNumbers.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
} else if (phoneNumbers.size() == 1) {
|
||||||
|
JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumbers.get(0), msg), ANHUI_COMPANY_SMS_KEY);
|
||||||
|
return sendResult.toString();
|
||||||
|
} else {
|
||||||
|
JSONObject sendResult = SmsTool.sendSms(new BatchSmsByContentParam(phoneNumbers, msg), ANHUI_COMPANY_SMS_KEY);
|
||||||
|
return sendResult.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -165,15 +165,6 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 省公司短信平台sms-util -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.ahsbd</groupId>
|
|
||||||
<artifactId>sms-util</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${project.basedir}/lib/sms-util-1.0.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,31 @@
|
||||||
package com.bonus.common.core.utils.sms;
|
//package com.bonus.common.core.utils.sms;
|
||||||
|
//
|
||||||
import cn.hutool.json.JSONObject;
|
//import cn.hutool.json.JSONObject;
|
||||||
import com.ah.sbd.SmsTool;
|
//import com.ah.sbd.SmsTool;
|
||||||
import com.ah.sbd.utils.param.BatchSmsByContentParam;
|
//import com.ah.sbd.utils.param.BatchSmsByContentParam;
|
||||||
import com.ah.sbd.utils.param.SmsParam;
|
//import com.ah.sbd.utils.param.SmsParam;
|
||||||
import com.alibaba.fastjson2.JSON;
|
//import com.alibaba.fastjson2.JSON;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
//import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
//import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
import com.bonus.common.core.utils.http.HttpRequestHelper;
|
//import com.bonus.common.core.utils.http.HttpRequestHelper;
|
||||||
import org.springframework.util.CollectionUtils;
|
//import org.springframework.util.CollectionUtils;
|
||||||
|
//
|
||||||
import java.net.URLEncoder;
|
//import java.net.URLEncoder;
|
||||||
import java.util.HashMap;
|
//import java.util.HashMap;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
public class SmsUtils {
|
//public class SmsUtils {
|
||||||
// 安徽省公司短信平台key
|
// // 安徽省公司短信平台key
|
||||||
public static final String ANHUI_COMPANY_SMS_KEY = "Wq1FZobZC5iJIAGKWh6gpKUmdGKBOQq7koHmx+Vg49g/dSjSFlw+2qRQmMmyXvJT";
|
// public static final String ANHUI_COMPANY_SMS_KEY = "Wq1FZobZC5iJIAGKWh6gpKUmdGKBOQq7koHmx+Vg49g/dSjSFlw+2qRQmMmyXvJT";
|
||||||
/**
|
// /**
|
||||||
* 发送短信验证码
|
// * 发送短信验证码
|
||||||
*
|
// *
|
||||||
* @param mobile 发信发送的目的号码.多个号码之间用半角逗号隔开
|
// * @param mobile 发信发送的目的号码.多个号码之间用半角逗号隔开
|
||||||
* @param content 短信的内容,内容需要UTF-8编码
|
// * @param content 短信的内容,内容需要UTF-8编码
|
||||||
* @param sendTime 为空表示立即发送,定时发送格式:20101024090810
|
// * @param sendTime 为空表示立即发送,定时发送格式:20101024090810
|
||||||
* @return 是否发送成功
|
// * @return 是否发送成功
|
||||||
*/
|
// */
|
||||||
// public static String smsToken(String mobile, String content, String sendTime) {
|
// public static String smsToken(String mobile, String content, String sendTime) {
|
||||||
// Map<String, String> headers = new HashMap<>();
|
// Map<String, String> headers = new HashMap<>();
|
||||||
// Map<String, Object> mapJson = new HashMap<>(6);
|
// Map<String, Object> mapJson = new HashMap<>(6);
|
||||||
|
|
@ -55,42 +55,5 @@ public class SmsUtils {
|
||||||
// String json = JSON.toJSONString(mapJson);
|
// String json = JSON.toJSONString(mapJson);
|
||||||
// return HttpRequestHelper.postJson(SmsConfig.DOMAIN, urlWithParams, json, headers);
|
// return HttpRequestHelper.postJson(SmsConfig.DOMAIN, urlWithParams, json, headers);
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
/**
|
//}
|
||||||
* 发送消息到短信
|
|
||||||
*
|
|
||||||
* @param phoneNumbers 电话号码列表,可能包含无效或重复的号码
|
|
||||||
* @param msg 要发送的短信消息内容
|
|
||||||
* @return 发送短信的结果,具体形式依赖于SmsUtils.smsToken的实现
|
|
||||||
* 此方法首先检查电话号码列表是否为空,如果为空,则直接返回空字符串。
|
|
||||||
* 接下来,它会移除列表中所有为空的电话号码,
|
|
||||||
* 然后对列表中超过11位的电话号码进行解密处理,
|
|
||||||
* 确保只有有效的电话号码被用来发送短信。
|
|
||||||
*/
|
|
||||||
public static String sendMsgToSms(List<String> phoneNumbers, String msg) {
|
|
||||||
// 检查电话号码列表和消息内容是否有效
|
|
||||||
if (CollectionUtils.isEmpty(phoneNumbers) || StringUtils.isBlank(msg)) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 过滤掉无效的电话号码
|
|
||||||
phoneNumbers.removeIf(StringUtils::isEmpty);
|
|
||||||
|
|
||||||
// 对超过11位的电话号码进行解密处理
|
|
||||||
phoneNumbers.replaceAll(phoneNumber ->
|
|
||||||
phoneNumber.length() > 11 ? Sm4Utils.decrypt(phoneNumber) : phoneNumber
|
|
||||||
);
|
|
||||||
|
|
||||||
// 根据电话号码数量发送短信
|
|
||||||
if (phoneNumbers.isEmpty()) {
|
|
||||||
return "";
|
|
||||||
} else if (phoneNumbers.size() == 1) {
|
|
||||||
JSONObject sendResult = SmsTool.sendSms(new SmsParam(phoneNumbers.get(0), msg), ANHUI_COMPANY_SMS_KEY);
|
|
||||||
return sendResult.toString();
|
|
||||||
} else {
|
|
||||||
JSONObject sendResult = SmsTool.sendSms(new BatchSmsByContentParam(phoneNumbers, msg), ANHUI_COMPANY_SMS_KEY);
|
|
||||||
return sendResult.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,57 +1,56 @@
|
||||||
package com.bonus.common.security.service;
|
//package com.bonus.common.security.service;
|
||||||
|
//
|
||||||
import com.bonus.common.core.constant.CacheConstants;
|
//import com.bonus.common.core.constant.CacheConstants;
|
||||||
import com.bonus.common.core.exception.CaptchaException;
|
//import com.bonus.common.core.exception.CaptchaException;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
//import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.VerificationCodeUtils;
|
//import com.bonus.common.core.utils.VerificationCodeUtils;
|
||||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
//import com.bonus.common.core.utils.sms.SmsUtils;
|
||||||
import com.bonus.common.redis.service.RedisService;
|
//import com.bonus.common.redis.service.RedisService;
|
||||||
import com.bonus.common.security.config.VerificationCodeConfig;
|
//import com.bonus.common.security.config.VerificationCodeConfig;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
import javax.annotation.Resource;
|
//import javax.annotation.Resource;
|
||||||
import java.util.Arrays;
|
//import java.util.Arrays;
|
||||||
import java.util.concurrent.TimeUnit;
|
//import java.util.concurrent.TimeUnit;
|
||||||
|
//
|
||||||
import static com.bonus.common.core.utils.VerificationCodeUtils.CodeType.NUMERIC;
|
//import static com.bonus.common.core.utils.VerificationCodeUtils.CodeType.NUMERIC;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author bonus
|
// * @author bonus
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class SmsService {
|
//public class SmsService {
|
||||||
@Resource
|
// @Resource
|
||||||
private VerificationCodeConfig verificationCodeConfig;
|
// private VerificationCodeConfig verificationCodeConfig;
|
||||||
@Resource
|
// @Resource
|
||||||
private RedisService redisService;
|
// private RedisService redisService;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 生成手机验证码
|
// * 生成手机验证码
|
||||||
*
|
// *
|
||||||
* @return AjaxResult
|
// * @return AjaxResult
|
||||||
* @throws CaptchaException 自定义captcha 异常
|
// * @throws CaptchaException 自定义captcha 异常
|
||||||
*/
|
// */
|
||||||
public void sendSimplePhone(String to) {
|
// public void sendSimplePhone(String to) {
|
||||||
if (StringUtils.isEmpty(to)) {
|
// if (StringUtils.isEmpty(to)) {
|
||||||
throw new CaptchaException("手机号不能为空");
|
// throw new CaptchaException("手机号不能为空");
|
||||||
}
|
// }
|
||||||
String code = VerificationCodeUtils.generateVerificationCode(NUMERIC);
|
// String code = VerificationCodeUtils.generateVerificationCode(NUMERIC);
|
||||||
String str = verificationCodeConfig.getContent().replace("<code>", code);
|
// String str = verificationCodeConfig.getContent().replace("<code>", code);
|
||||||
str = str.replace("<time>", verificationCodeConfig.getTime().toString());
|
// str = str.replace("<time>", verificationCodeConfig.getTime().toString());
|
||||||
//String s = SmsUtils.smsToken(to, str, "");
|
// String s = SmsUtils.smsToken(to, str, "");
|
||||||
String s = SmsUtils.sendMsgToSms(Arrays.asList(to), str);
|
// log.error("省公司短信平台发送短信返回结果=" + s);
|
||||||
log.error("省公司短信平台发送短信返回结果=" + s);
|
// if (StringUtils.isNotEmpty(s)) {
|
||||||
if (StringUtils.isNotEmpty(s)) {
|
// if (s.contains("ok")) {
|
||||||
if (s.contains("ok")) {
|
// String verifyKey = CacheConstants.VERIFICATION_CODE + StringUtils.nvl(to, "");
|
||||||
String verifyKey = CacheConstants.VERIFICATION_CODE + StringUtils.nvl(to, "");
|
// redisService.setCacheObject(verifyKey, code, verificationCodeConfig.getTime(), TimeUnit.MINUTES);
|
||||||
redisService.setCacheObject(verifyKey, code, verificationCodeConfig.getTime(), TimeUnit.MINUTES);
|
// } else {
|
||||||
} else {
|
// throw new CaptchaException("获取短信失败");
|
||||||
throw new CaptchaException("获取短信失败");
|
// }
|
||||||
}
|
// } else {
|
||||||
} else {
|
// throw new CaptchaException("获取短信失败");
|
||||||
throw new CaptchaException("获取短信失败");
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import com.bonus.common.core.utils.SpringUtils;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.utils.bean.BeanValidators;
|
import com.bonus.common.core.utils.bean.BeanValidators;
|
||||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
//import com.bonus.common.core.utils.sms.SmsUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import com.bonus.common.datascope.annotation.DataScope;
|
import com.bonus.common.datascope.annotation.DataScope;
|
||||||
|
|
@ -600,10 +600,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||||
}
|
}
|
||||||
Integer i = userMapper.approvalStatus(userId);
|
Integer i = userMapper.approvalStatus(userId);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
if (StringUtils.isNotEmpty(sysUser.getPhonenumber())) {
|
// if (StringUtils.isNotEmpty(sysUser.getPhonenumber())) {
|
||||||
//SmsUtils.smsToken(sysUser.getPhonenumber(), "您的账号:" + sysUser.getUserName() + "已通过审批,请登录系统", "");
|
// SmsUtils.smsToken(sysUser.getPhonenumber(), "您的账号:" + sysUser.getUserName() + "已通过审批,请登录系统", "");
|
||||||
SmsUtils.sendMsgToSms(Arrays.asList(sysUser.getPhonenumber()), "您的账号:" + sysUser.getUserName() + "已通过审批,请登录系统");
|
// }
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(sysUser.getEmail())) {
|
if (StringUtils.isNotEmpty(sysUser.getEmail())) {
|
||||||
sendSimpleEmail(sysUser.getEmail(), "您的账号:" + sysUser.getUserName() + "已通过审批,请登录系统");
|
sendSimpleEmail(sysUser.getEmail(), "您的账号:" + sysUser.getUserName() + "已通过审批,请登录系统");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue