微服务情况下 emputils.get 有时候没有数据问题
This commit is contained in:
@@ -55,7 +55,11 @@ public class EmpUtils {
|
||||
*/
|
||||
public static Employee get(User user){
|
||||
if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
|
||||
return user.getRefObj();
|
||||
Employee employee = user.getRefObj();
|
||||
if (employee == null) {
|
||||
employee = Static.employeeService.get(user.getRefCode());
|
||||
}
|
||||
return employee;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user