Md5加密登录
This commit is contained in:
parent
00b26569ff
commit
7b0bd0e175
|
@ -30,7 +30,6 @@ public class EmployeeServiceImpl implements EmployeeService {
|
|||
* @return Employee
|
||||
*/
|
||||
public Employee login(EmployeeLoginDTO employeeLoginDTO) {
|
||||
|
||||
String username = employeeLoginDTO.getUsername();
|
||||
String password = employeeLoginDTO.getPassword();
|
||||
|
||||
|
@ -44,7 +43,7 @@ public class EmployeeServiceImpl implements EmployeeService {
|
|||
}
|
||||
|
||||
// 密码比对
|
||||
// TODO 后期需要进行md5加密,然后再进行比对
|
||||
password = DigestUtils.md5DigestAsHex(password.getBytes());// Md5加密
|
||||
if (!password.equals(employee.getPassword())) {
|
||||
// 密码错误
|
||||
throw new PasswordErrorException(MessageConstant.PASSWORD_ERROR);
|
||||
|
|
Loading…
Reference in New Issue