Compare commits
No commits in common. "c0b425737f0730c83307854deb30126b9d5bf5fa" and "82b9aaa041fefe8f809455125b629d996902d945" have entirely different histories.
c0b425737f
...
82b9aaa041
|
|
@ -8,9 +8,7 @@ import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||||
import com.bonus.sgzb.common.core.utils.GlobalConstants;
|
import com.bonus.sgzb.common.core.utils.GlobalConstants;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.redis.service.RedisService;
|
import com.bonus.sgzb.common.redis.service.RedisService;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
|
||||||
import com.bonus.sgzb.system.config.TencentSmsConfig;
|
import com.bonus.sgzb.system.config.TencentSmsConfig;
|
||||||
import com.bonus.sgzb.system.mapper.SysUserMapper;
|
|
||||||
import com.bonus.sgzb.system.service.ISysSmsService;
|
import com.bonus.sgzb.system.service.ISysSmsService;
|
||||||
import com.tencentcloudapi.common.Credential;
|
import com.tencentcloudapi.common.Credential;
|
||||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||||
|
|
@ -48,8 +46,6 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
@Resource
|
|
||||||
private SysUserMapper sysUserMapper;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TencentSmsConfig tencentSmsConfig;
|
private TencentSmsConfig tencentSmsConfig;
|
||||||
|
|
@ -143,11 +139,6 @@ public class SysSmsServiceImpl implements ISysSmsService {
|
||||||
if (phone == null || phone.length() != UserConstants.PHONE_DEFAULT_LENGTH_LOGIN) {
|
if (phone == null || phone.length() != UserConstants.PHONE_DEFAULT_LENGTH_LOGIN) {
|
||||||
return AjaxResult.error("手机号格式错误,请输入11位数字号码");
|
return AjaxResult.error("手机号格式错误,请输入11位数字号码");
|
||||||
}
|
}
|
||||||
// 校验是否存在该手机号
|
|
||||||
SysUser sysUser = sysUserMapper.checkPhoneUnique(phone);
|
|
||||||
if (sysUser == null) {
|
|
||||||
return AjaxResult.error("该手机号未绑定用户,请重新确认");
|
|
||||||
}
|
|
||||||
// 检查发送次数是否超限
|
// 检查发送次数是否超限
|
||||||
if (isOverLimit(phone)) {
|
if (isOverLimit(phone)) {
|
||||||
throw new ServiceException("当天此手机号发送验证码次数超过限制", 1001);
|
throw new ServiceException("当天此手机号发送验证码次数超过限制", 1001);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue