| | |
| | | import com.finance.common.constant.UserConstants; |
| | | import com.finance.common.core.domain.entity.SysRole; |
| | | import com.finance.common.core.domain.entity.SysUser; |
| | | import com.finance.common.enums.AreaLevelEnum; |
| | | import com.finance.common.enums.UserTypeEnum; |
| | | import com.finance.common.exception.ServiceException; |
| | | import com.finance.common.utils.BeanUtils; |
| | |
| | | import com.finance.common.utils.StringUtils; |
| | | import com.finance.common.utils.bean.BeanValidators; |
| | | import com.finance.common.utils.spring.SpringUtils; |
| | | import com.finance.system.domain.Region; |
| | | import com.finance.system.domain.SysPost; |
| | | import com.finance.system.domain.SysUserPost; |
| | | import com.finance.system.domain.SysUserRole; |
| | |
| | | import com.finance.system.mapper.SysUserPostMapper; |
| | | import com.finance.system.mapper.SysUserRoleMapper; |
| | | import com.finance.system.query.SysUserQuery; |
| | | import com.finance.system.service.IRegionService; |
| | | import com.finance.system.service.ISysConfigService; |
| | | import com.finance.system.service.ISysUserService; |
| | | import com.finance.system.vo.DeptVO; |
| | |
| | | |
| | | @Autowired |
| | | protected Validator validator; |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | |
| | | deptName) |
| | | .orderByDesc(SysUser::getCreateTime) |
| | | .list(); |
| | | return BeanUtils.copyList(list, DeptVO.class); |
| | | List<DeptVO> deptVOS = BeanUtils.copyList(list, DeptVO.class); |
| | | deptVOS = deptVOS.stream() |
| | | .filter(item -> null != item.getAreaLevel() && item.getAreaLevel() |
| | | .equals(AreaLevelEnum.COUNTY)).peek(item -> { |
| | | Region region = regionService.getParentByCode(item.getAreaCode()); |
| | | if (region != null) { |
| | | item.setCityName(region.getName()); |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | return deptVOS; |
| | | } |
| | | } |