分页查询设备-设备类型
This commit is contained in:
@ -101,6 +101,12 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
|||||||
public TableDataInfo<Device> queryAll(DeviceQueryCriteria criteria, Page<Device> page) throws IOException {
|
public TableDataInfo<Device> queryAll(DeviceQueryCriteria criteria, Page<Device> page) throws IOException {
|
||||||
|
|
||||||
criteria.setCurrentOwnerId(LoginHelper.getUserId());
|
criteria.setCurrentOwnerId(LoginHelper.getUserId());
|
||||||
|
if (criteria.getDeviceType() != null) {
|
||||||
|
DeviceTypeGrants deviceTypeGrant = deviceTypeGrantsMapper.selectById(criteria.getDeviceType());
|
||||||
|
if (deviceTypeGrant != null) {
|
||||||
|
criteria.setDeviceType(deviceTypeGrant.getDeviceTypeId());
|
||||||
|
}
|
||||||
|
}
|
||||||
IPage<Device> devices = deviceMapper.findAll(criteria, page);
|
IPage<Device> devices = deviceMapper.findAll(criteria, page);
|
||||||
|
|
||||||
List<Device> records = devices.getRecords();
|
List<Device> records = devices.getRecords();
|
||||||
|
Reference in New Issue
Block a user