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