Pārlūkot izejas kodu

添加中队和车辆详情

yq 3 gadi atpakaļ
vecāks
revīzija
7189795aea

+ 2 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DeviceAjServiceImpl.java

@@ -1,6 +1,7 @@
 package com.bizmatics.mhfire.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.bizmatics.common.core.bean.CommonPage;
@@ -26,7 +27,7 @@ public class DeviceAjServiceImpl extends AbstractCrudService<DeviceAjMapper, Dev
     @Override
     public CommonPage<DeviceAj> page(String deviceType, Integer current, Integer size, Date startTime, Date endTime) {
         LambdaQueryWrapper<DeviceAj> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.eq(DeviceAj::getDeviceType,deviceType)
+        queryWrapper.eq(StringUtils.isNotBlank(deviceType),DeviceAj::getDeviceType,deviceType)
                 .between(null != startTime && null != endTime,DeviceAj::getCreateTime,startTime,endTime)
                 .orderByDesc(DeviceAj::getCreateTime);
         Page<DeviceAj> page = new Page<>(current, size);