| | |
| | | import com.mindskip.xzs.utility.PageInfoHelper; |
| | | import com.mindskip.xzs.viewmodel.admin.department.DepartmentResponseVM; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | List<UserDepartment> userDepartments = userDepartmentMapper.selectByDepartmentId(e.getId()); |
| | | List<User> list = new ArrayList<>(); |
| | | for (UserDepartment userDepartment : userDepartments) { |
| | | list.add(userService.getUserById(userDepartment.getUserId())); |
| | | User user = userService.getUserById(userDepartment.getUserId()); |
| | | if (ObjectUtils.isNotEmpty(user)) { |
| | | list.add(user); |
| | | } |
| | | } |
| | | departmentVO.setUserList(list); |
| | | departmentVO.setDepartment(e); |