|  |  |  | @ -6,13 +6,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
			
		
	
		
			
				
					|  |  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.auth.AuthAdminDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.auth.DeptUserDao; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dao.auth.SysUserRoleMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.AuthAdmin; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.DeptEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.DeptUserEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.SysUserRole; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.exception.JsonException; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.auth.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.AuthAdminService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.enums.ResultEnum; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.DeptService; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -21,6 +25,7 @@ import java.util.ArrayList; | 
			
		
	
		
			
				
					|  |  |  |  | import java.util.Collections; | 
			
		
	
		
			
				
					|  |  |  |  | import java.util.Date; | 
			
		
	
		
			
				
					|  |  |  |  | import java.util.List; | 
			
		
	
		
			
				
					|  |  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | @Service | 
			
		
	
		
			
				
					|  |  |  |  | @Transactional(rollbackFor = Exception.class) | 
			
		
	
	
		
			
				
					|  |  |  | @ -198,12 +203,24 @@ public class AuthAdminServiceImpl extends ServiceImpl<AuthAdminDao, AuthAdmin> i | 
			
		
	
		
			
				
					|  |  |  |  |             int offset = (request.getPage() - 1) * request.getLimit(); | 
			
		
	
		
			
				
					|  |  |  |  |             PageHelper.offsetPage(offset, request.getLimit()); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         return authAdminDao.getUserByIds(request.getIds(),request.getKey()); | 
			
		
	
		
			
				
					|  |  |  |  |         return authAdminDao.getUserByIds(request.getIds(), request.getKey()); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     DeptService deptService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     DeptUserDao deptUserDao; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |  |     public List<AuthAdmin> getUserByDeptCode(String deptCode) { | 
			
		
	
		
			
				
					|  |  |  |  |         List<AuthAdmin> authAdmins = authAdminDao.selectList(new LambdaQueryWrapper<AuthAdmin>().eq(AuthAdmin::getLocDeptCode, deptCode)); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         DeptEntity deptEntity = deptService.selectByCode(deptCode); | 
			
		
	
		
			
				
					|  |  |  |  |         List<DeptUserEntity> deptUserEntitys = deptUserDao.selectList(new LambdaQueryWrapper<DeptUserEntity>().eq(DeptUserEntity::getDeptId, deptEntity.getId())); | 
			
		
	
		
			
				
					|  |  |  |  |         List<Long> userIds = deptUserEntitys.stream() | 
			
		
	
		
			
				
					|  |  |  |  |                 .map(DeptUserEntity::getUserId) | 
			
		
	
		
			
				
					|  |  |  |  |                 .collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |  |         List<AuthAdmin> authAdmins = authAdminDao.selectList(new LambdaQueryWrapper<AuthAdmin>().in(AuthAdmin::getId, userIds)); | 
			
		
	
		
			
				
					|  |  |  |  |         return authAdmins; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |