| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.constant.UserConstant; |
| | | import com.whyc.constant.UserLogTypeEnum; |
| | | import com.whyc.constant.YamlProperties; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.UserClient; |
| | |
| | | } |
| | | //验证正确,清除验证码 |
| | | ActionUtil.getSession().removeAttribute("fontDynamicCode"); |
| | | /*String password = ""; |
| | | try { |
| | | password = URLDecoder.decode(pwd, "utf-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | }*/ |
| | | |
| | | String[] dataArr = RSAUtil.decryptFront(pwd, RSAUtil.fontSeparator); |
| | | //验签md5 |
| | | if (!dataArr[1].equals(ActionUtil.EncryptionMD5(org.apache.commons.lang3.StringUtils.trim(dataArr[0])).toString())) { |
| | |
| | | } else { |
| | | servletContext.setAttribute(userName + "_login_fail_times_" + System.currentTimeMillis(), 0); |
| | | } |
| | | // CommonUtil.record(0, UserOperation.TYPE_LOGIN_FAIL.getType(), UserOperation.TYPE_LOGIN_FAIL.getTypeName(), UserOperation.TYPE_LOGIN_FAIL.getTypeNameEn()); |
| | | CommonUtil.record( UserLogTypeEnum.CATEGORY_SYSTEM.getType(), UserLogTypeEnum.LOGIN.getType(),UserLogTypeEnum.LOGIN.getName(), UserLogTypeEnum.LOGIN.getName()); |
| | | return response.set(1, false, "账号或密码错误"); |
| | | }else if(e instanceof AuthenticationException){ |
| | | return response.set(1, false, "密码解析失败"); |
| | |
| | | } |
| | | //查询用户对应的班组标识 |
| | | dataList.add(bjService.getGroupFlag(userInf.getId().intValue())); |
| | | // CommonUtil.record(((User) subject.getPrincipal()).getId(), UserOperation.TYPE_LOGIN.getType(), UserOperation.TYPE_LOGIN.getTypeName(), UserOperation.TYPE_LOGIN.getTypeNameEn()); |
| | | CommonUtil.record( UserLogTypeEnum.CATEGORY_SYSTEM.getType(), UserLogTypeEnum.LOGIN.getType(),UserLogTypeEnum.LOGIN.getName(), UserLogTypeEnum.LOGIN.getName()); |
| | | return response.setII(1, true, dataList, "登录成功"); |
| | | } |
| | | return response.set(1, false,"认证未通过"); |