refactor: 岗位返回null修复
This commit is contained in:
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.agt.framework.common.pojo.CommonResult.success;
|
||||
@@ -58,7 +59,7 @@ public class UserProfileController {
|
||||
// 获得部门信息
|
||||
DeptDO dept = user.getDeptId() != null ? deptService.getDept(user.getDeptId()) : null;
|
||||
// 获得岗位信息
|
||||
List<PostDO> posts = CollUtil.isNotEmpty(user.getPostIds()) ? postService.getPostList(user.getPostIds()) : null;
|
||||
List<PostDO> posts = CollUtil.isNotEmpty(user.getPostIds()) ? postService.getPostList(user.getPostIds()) : Collections.emptyList();
|
||||
return success(UserConvert.INSTANCE.convert(user, userRoles, dept, posts));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user