userentity bug
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
|
||||
package com.peanut.modules.app.resolver;
|
||||
|
||||
import com.peanut.modules.app.service.UserService;
|
||||
import com.peanut.modules.app.annotation.LoginUser;
|
||||
import com.peanut.modules.app.interceptor.AuthorizationInterceptor;
|
||||
import com.peanut.modules.book.entity.UserEntity;
|
||||
import com.peanut.modules.book.entity.MyUserEntity;
|
||||
import com.peanut.modules.book.service.MyUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -29,11 +29,11 @@ import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
@Component
|
||||
public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
private MyUserService userService;
|
||||
|
||||
@Override
|
||||
public boolean supportsParameter(MethodParameter parameter) {
|
||||
return parameter.getParameterType().isAssignableFrom(UserEntity.class) && parameter.hasParameterAnnotation(LoginUser.class);
|
||||
return parameter.getParameterType().isAssignableFrom(MyUserEntity.class) && parameter.hasParameterAnnotation(LoginUser.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +46,7 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
UserEntity user = userService.getById((Long)object);
|
||||
MyUserEntity user = userService.getById((Long)object);
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user