|
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.xy.dto.DeviceLogDto;
|
|
import com.xy.dto.DeviceLogDto;
|
|
import com.xy.entity.DeviceLog;
|
|
import com.xy.entity.DeviceLog;
|
|
import com.xy.mapper.DeviceLogMapper;
|
|
import com.xy.mapper.DeviceLogMapper;
|
|
-import com.xy.utils.Beans;
|
|
|
|
-import com.xy.utils.MybatisPlusQuery;
|
|
|
|
-import com.xy.utils.PageBean;
|
|
|
|
-import com.xy.utils.R;
|
|
|
|
|
|
+import com.xy.utils.*;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
@@ -44,7 +41,8 @@ public class DeviceLogServiceImpl extends ServiceImpl<DeviceLogMapper, DeviceLog
|
|
LambdaQueryWrapper<DeviceLog> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(page, DeviceLog.class)
|
|
LambdaQueryWrapper<DeviceLog> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(page, DeviceLog.class)
|
|
.ge(DeviceLog::getLogBeginTime, page.getBeginLogBeginTime())
|
|
.ge(DeviceLog::getLogBeginTime, page.getBeginLogBeginTime())
|
|
.le(DeviceLog::getLogBeginTime, page.getEndLogBeginTime())
|
|
.le(DeviceLog::getLogBeginTime, page.getEndLogBeginTime())
|
|
- .build();
|
|
|
|
|
|
+ .build()
|
|
|
|
+ .orderByDesc(!Emptys.check(pageBean.getOrders()), DeviceLog::getCreateTime);
|
|
IPage<DeviceLog> iPage = page(toIPage(pageBean), lambdaQueryWrapper);
|
|
IPage<DeviceLog> iPage = page(toIPage(pageBean), lambdaQueryWrapper);
|
|
return R.ok(toPageBean(DeviceLogDto.Vo.class, iPage));
|
|
return R.ok(toPageBean(DeviceLogDto.Vo.class, iPage));
|
|
}
|
|
}
|