| | |
| | | package com.ruoyi.framework.web.service; |
| | | |
| | | import cn.hutool.core.util.PhoneUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.Constants; |
| | |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TAppUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.RandomUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | throw new ServiceException(MessageUtils.message("user.blocked")); |
| | | } |
| | | } |
| | | if ("test".equals(env) || "dev".equals(env)) { |
| | | if (!code.equals("111111")) { |
| | | log.info("登录用户:{} 短信验证码错误{}", username,code); |
| | | throw new ServiceException("短信验证码错误"); |
| | | } |
| | | if (("test".equals(env) || "dev".equals(env)) && code.equals("111111")) { |
| | | //直接放行 |
| | | } else { |
| | | // 校验验证码 |
| | | Object cacheObject = redisCache.getCacheObject(user.getPhone()); |