|
|
@@ -4,6 +4,8 @@ import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.tuoheng.common.ServiceException; |
|
|
|
import com.tuoheng.constant.HhzUrlConstant; |
|
|
|
import com.tuoheng.mapper.*; |
|
|
@@ -252,11 +254,11 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
if (ObjectUtil.isNull(query.getPage()) || ObjectUtil.isNull(query.getLimit())) { |
|
|
|
return JsonResult.error("分页参数不能为空"); |
|
|
|
} |
|
|
|
IPage<TenantVo> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
IPage<TenantPo> tenantList = tenantMapper.findList(page, query); |
|
|
|
List<TenantPo> records = tenantList.getRecords(); |
|
|
|
//开启分页 |
|
|
|
PageHelper.startPage(query.getPage(),query.getLimit()); |
|
|
|
List<TenantPo> tenantList = tenantMapper.findList(query); |
|
|
|
List<TenantVo> list = new ArrayList<>(); |
|
|
|
for (TenantPo tenantPo : records) { |
|
|
|
for (TenantPo tenantPo : tenantList) { |
|
|
|
TenantVo vo = new TenantVo(); |
|
|
|
vo.setCode(tenantPo.getCode()); |
|
|
|
vo.setName(tenantPo.getName()); |
|
|
@@ -278,10 +280,9 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
vo.setList(businessSystemVoList); |
|
|
|
list.add(vo); |
|
|
|
} |
|
|
|
page.setRecords(list); |
|
|
|
page.setTotal(list.size()); |
|
|
|
PageInfo<TenantVo> tenantVoPageInfo = new PageInfo<>(list); |
|
|
|
|
|
|
|
return JsonResult.success(page); |
|
|
|
return JsonResult.success(tenantVoPageInfo); |
|
|
|
} |
|
|
|
|
|
|
|
|