| | |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCompanyDistrictService; |
| | | import org.springblade.modules.property.service.IPropertyCompanyService; |
| | |
| | | |
| | | /** |
| | | * 根据手机号查询对应账号和手机号的用户信息 |
| | | * |
| | | * @param phoneNumber |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> getUserListByPhoneOrAccount(String phoneNumber) { |
| | | return baseMapper.getUserListByPhoneOrAccount( phoneNumber); |
| | | return baseMapper.getUserListByPhoneOrAccount(phoneNumber); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public UserDetailVO getUserInfo(Long userId) { |
| | | // 根据用户id 获取用户详情信息 |
| | | UserDetailVO userVO = baseMapper.getUserInfo(userId); |
| | | if (null!=userVO){ |
| | | if (null != userVO) { |
| | | // 设置机构 |
| | | userVO.setPassword(null); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<User> getUserInfoByPropertyId(String propertyCompanyId) { |
| | | public List<User> getUserInfoByPropertyId(String propertyCompanyId, String roleId) { |
| | | // 查询物业公司,获取物业公司的机构 |
| | | IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class); |
| | | PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getId, propertyCompanyId)); |
| | | return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString()); |
| | | return baseMapper.getUserInfoByPropertyId(one.getDeptId().toString(), roleId); |
| | | } |
| | | |
| | | @Override |
| | | public Object handleUser() { |
| | | List<User> list = list(Wrappers.<User>lambdaQuery() |
| | | .eq(User::getDeptId, "1727979636479037441") |
| | | .eq(User::getRoleId, "1717429059648606209")); |
| | | IHouseholdService bean = SpringUtil.getBean(IHouseholdService.class); |
| | | int a = 0; |
| | | for (User user : list) { |
| | | System.out.println("查詢處理啊的人:" + user.getId()); |
| | | HouseholdEntity one = bean.getOne(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getAssociatedUserId, user.getId()) |
| | | .eq(HouseholdEntity::getIsDeleted, 0)); |
| | | if (one != null) { |
| | | a++; |
| | | } |
| | | System.out.println("查詢處理啊的人:" + a); |
| | | } |
| | | return null; |
| | | } |
| | | } |