|
@@ -1,5 +1,6 @@
|
|
|
package com.slibra.framework.web.service;
|
|
|
|
|
|
+import com.slibra.system.mapper.SysPostMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -36,6 +37,9 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
|
|
@Autowired
|
|
|
private SysPermissionService permissionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysPostMapper sysPostMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
|
|
|
{
|
|
@@ -55,6 +59,11 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
|
|
log.info("登录用户:{} 已被停用.", username);
|
|
|
throw new ServiceException(MessageUtils.message("user.blocked"));
|
|
|
}
|
|
|
+ //2024年08月16日10:21:30 额外再处理一下用户的职位信息(前端接口使用)
|
|
|
+ Long[] postIds = user.getPostIds();
|
|
|
+ if (StringUtils.isNotEmpty(postIds)){
|
|
|
+ user.setPosition(this.sysPostMapper.getPostNamesByIds(postIds));
|
|
|
+ }
|
|
|
|
|
|
passwordService.validate(user);
|
|
|
|