|
@@ -433,7 +433,8 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
@ApiOperation("通用集合查询")
|
|
|
public R<List<DeviceInfoDto.Vo>> listCommon(DeviceInfoDto.ListCommon dto) {
|
|
|
String deviceSearch = dto.getDeviceSearch();
|
|
|
- QueryWrapper<DeviceInfo> queryWrapper = new MybatisPlusQuery().eqWrapper(dto.getVo(), DeviceInfo.class).buildQW();
|
|
|
+ DeviceInfoDto.Vo vo = dto.getVo();
|
|
|
+ QueryWrapper<DeviceInfo> queryWrapper = new MybatisPlusQuery().eqWrapper(vo == null ? new DeviceInfoDto.Vo() : vo, DeviceInfo.class).buildQW();
|
|
|
List<Long> placeLineIds = dto.getPlaceLineIds();
|
|
|
List<Long> deviceIds = dto.getDeviceIds();
|
|
|
List<String> columnList = dto.getColumnList();
|
|
@@ -450,7 +451,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
queryWrapper.select(columnList.stream().toArray(String[]::new));
|
|
|
}
|
|
|
if (CollUtil.isNotEmpty(deviceIds)) {
|
|
|
- queryWrapper.eq(LambdaUtils.getUnderlineCaseName(DeviceInfo::getDeviceId), deviceIds);
|
|
|
+ queryWrapper.in(LambdaUtils.getUnderlineCaseName(DeviceInfo::getDeviceId), deviceIds);
|
|
|
}
|
|
|
return R.ok(copy(DeviceInfoDto.Vo.class, list(queryWrapper)));
|
|
|
}
|