| | |
| | | package com.yuanchu.mom.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | List<Device> devices = deviceMapper.selectList(Wrappers.<Device>lambdaQuery().eq(Device::getDeviceStatus, 0).isNotNull(Device::getInsProductIds)); |
| | | List<Device> devices2 = new ArrayList<>(); |
| | | for (Device device : devices) { |
| | | List<Integer> ids = JSON.parseArray(device.getInsProductIds(), Integer.class); |
| | | for (Integer i : ids) { |
| | | if (i == id) { |
| | | String[] ids = device.getInsProductIds().split(","); |
| | | for (String i : ids) { |
| | | if (i.equals(id+"")) { |
| | | devices2.add(device); |
| | | break; |
| | | } |
| | | } |
| | | } |