| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.model.SystemLoginLog; |
| | |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | // 校验验证码 |
| | | if(type!= Constants.TWO){ |
| | | try { |
| | | if(captchaCheck){ |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | |
| | | systemLoginLogService.create(loginLog); |
| | | throw e; |
| | | } |
| | | } |
| | | // 校验用户名和密码 |
| | | Subject subject = SecurityUtils.getSubject(); |
| | | UsernamePasswordToken token = new UsernamePasswordToken(dto.getUsername(), dto.getPassword()); |