...
|
...
|
@@ -153,15 +153,12 @@ public class HostInfoServiceImpl implements IHostInfoService { |
|
|
|
|
|
@Override
|
|
|
public PageResponse<HostInfo> getHostInfos(HostInfoReq req) {
|
|
|
logger.info("getHostInfos with param is {}", req);
|
|
|
|
|
|
// 组装分页对象
|
|
|
PageBean page = PageBean.initPageInfo(req.getCurrentPage(),
|
|
|
req.getPageSize(), req);
|
|
|
// 先查询符合条件的总数量
|
|
|
int total = hostInfoMapper.selectCountByCodition(page);
|
|
|
logger.info("selectUserTotal num is {}, with param is {}", total,
|
|
|
req);
|
|
|
|
|
|
// 数量为0 直接返回
|
|
|
if (total == 0) {
|
|
|
// 返回初始page对象
|
...
|
...
|
@@ -170,7 +167,6 @@ public class HostInfoServiceImpl implements IHostInfoService { |
|
|
// 获取列表
|
|
|
List<HostInfo> HostInfos = hostInfoMapper.selectHostInfosByCodition(page);
|
|
|
if (CollectionUtils.isEmpty(HostInfos)) {
|
|
|
logger.debug("getHostInfos is null with param is {}", req);
|
|
|
return null;
|
|
|
}
|
|
|
PageResponse<HostInfo> response = new PageResponse<HostInfo>();
|
...
|
...
|
|