谭斌 2 лет назад
Родитель
Сommit
d569579d07

+ 2 - 1
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -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();