|
@@ -19,8 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description:用户认证业务层
|
|
@@ -43,10 +41,10 @@ public class UserAuthenticationFacade extends UserAuthenticationServiceImpl {
|
|
|
public AuthStatusDTO userAuthentication(UserAuthenticationVO userAuthenticationVO) {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
User user_old = userFacade.getById(userId);
|
|
|
- User user = userFacade.findByName(userAuthenticationVO.getUserName());
|
|
|
+ User user = userFacade.findByName(userAuthenticationVO.getUsername());
|
|
|
if (user == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS,
|
|
|
- "用户【" + userAuthenticationVO.getUserName() + "】不存在,不允许验证");
|
|
|
+ "用户【" + userAuthenticationVO.getUsername() + "】不存在,不允许验证");
|
|
|
} else if (!userId.equals(user.getId())) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
"登录用户【" + user_old.getUsername() + "】与验证用户【" + user.getUsername() + "】不符,不允许验证");
|