| | |
| | | package com.iailab.module.data.channel.modbus.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.data.common.utils.PageUtils; |
| | | import com.iailab.module.data.common.utils.Query; |
| | | import com.iailab.module.data.channel.modbus.vo.ModBusDevicePageReqVO; |
| | | import com.iailab.module.data.channel.modbus.dao.ChannelModBusDeviceDao; |
| | | import com.iailab.module.data.channel.modbus.dto.ChannelModBusDeviceDTO; |
| | | import com.iailab.module.data.channel.modbus.entity.ChannelModBusDeviceEntity; |
| | |
| | | /** |
| | | * 分页查询设备 |
| | | * |
| | | * @param params |
| | | * @param reqVO |
| | | */ |
| | | @Override |
| | | public PageUtils queryPage(Map<String, Object> params) { |
| | | |
| | | String name = (String) params.get("name"); |
| | | |
| | | IPage<ChannelModBusDeviceEntity> page = this.page( |
| | | new Query<ChannelModBusDeviceEntity>().getPage(params), |
| | | new QueryWrapper<ChannelModBusDeviceEntity>() |
| | | .like(StringUtils.isNotBlank(name), "name", name) |
| | | .orderByDesc("create_time") |
| | | ); |
| | | return new PageUtils(page); |
| | | public PageResult<ChannelModBusDeviceEntity> queryPage(ModBusDevicePageReqVO reqVO) { |
| | | return channelModBusDeviceDao.selectPage(reqVO); |
| | | } |
| | | |
| | | /** |