liusheng
3 天以前 fdc9651c4b83c18e044a3a9ac6b5e019ffa6328d
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -8,6 +8,7 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.wxopenidConfig.WxOpenIDAuthenticationToken;
import com.ruoyi.system.mapper.SysUserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
@@ -36,6 +37,7 @@
 *
 * @author ruoyi
 */
@Slf4j
@Component
public class SysLoginService {
    @Autowired
@@ -67,6 +69,7 @@
     * @return 结果
     */
    public String login(String username, String password, String code, String uuid, String openId, String dingUserId) {
        log.info("username是否为空:{},password是否为空:{},dingUserId是否为空:{}", username, password, dingUserId);
        //免登
        if (StringUtils.isNotEmpty(dingUserId)) {
            SysUser sysUser = sysUserMapper.selectUserByDingUserId(dingUserId);
@@ -78,7 +81,9 @@
        }
        SysUser sysUser = sysUserMapper.selectUserByUserName(username);
        if (sysUser.getErrorNums() >= 3) {
        //获取锁定次数
        String s = configService.selectConfigByKey("sys.opo.lockpwd");
        if (sysUser.getErrorNums() >= Integer.valueOf(s)) {
            //校验失败次数
            throw new BaseException("你的密码输入错误次数过多,请联系管理员处理");
        }