| | |
| | | import com.moral.api.entity.Organization; |
| | | import com.moral.api.mapper.OrganizationMapper; |
| | | import com.moral.api.pojo.vo.user.QxUser; |
| | | import com.moral.api.service.DeviceService; |
| | | import com.moral.api.service.OrganizationService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.constant.Constants; |
| | |
| | | |
| | | @Autowired |
| | | OrganizationMapper organizationMapper; |
| | | |
| | | @Autowired |
| | | private DeviceService deviceService; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | wrapper.eq("is_delete",Constants.NOT_DELETE); |
| | | List<Organization> organizations = organizationMapper.selectList(wrapper); |
| | | for (int i=0; i<organizations.size(); i++) { |
| | | List<String> macs = deviceService.getMacsByOrganizationId(organizations.get(i).getId()); |
| | | if (ObjectUtils.isEmpty(macs)){ |
| | | organizations.remove(i); |
| | | i--; |
| | | } |
| | | } |
| | | return organizations; |
| | | } |
| | | |