企业国别 企业单位返回值total问题
This commit is contained in:
+6
-1
@@ -2,6 +2,8 @@ package com.mhd.oms.application.service.erpCountry;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
@@ -49,10 +51,13 @@ public class ErpCountryApplicationService{
|
||||
erpCountryDTO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
}
|
||||
PageHelper.startPage(erpCountryDTO.getPageNum(),erpCountryDTO.getPageSize());
|
||||
List<ErpCountryPO> list = erpCountryMapper.queryList(erpCountryDTO);
|
||||
|
||||
Page<ErpCountryPO> page = (Page<ErpCountryPO>) list;
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setData(list);
|
||||
tableDataInfo.setTotal(list.size());
|
||||
tableDataInfo.setTotal(page.getTotal());
|
||||
tableDataInfo.setCode(200);
|
||||
return tableDataInfo;
|
||||
|
||||
|
||||
+12
-1
@@ -2,6 +2,8 @@ package com.mhd.oms.application.service.erpEnterpriseUnit;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
@@ -44,10 +46,19 @@ public class ErpEnterpriseUnitApplicationService {
|
||||
private GwLogMapper gwLogMapper;
|
||||
|
||||
public TableDataInfo queryList(ErpEnterpriseUnitDO erpEnterpriseUnitDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null) {
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
if (topOrganizationId != null && topOrganizationId != 1) {
|
||||
erpEnterpriseUnitDO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
}
|
||||
PageHelper.startPage(erpEnterpriseUnitDO.getPageNum(),erpEnterpriseUnitDO.getPageSize());
|
||||
List<ErpEnterpriseUnitPO> list = erpEnterpriseUnitMapper.queryList(erpEnterpriseUnitDO);
|
||||
Page<ErpEnterpriseUnitPO> page = (Page<ErpEnterpriseUnitPO>) list;
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setData(list);
|
||||
tableDataInfo.setTotal(list.size());
|
||||
tableDataInfo.setTotal(page.getTotal());
|
||||
tableDataInfo.setCode(200);
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
+2
-1
@@ -51,6 +51,7 @@ public class ErpEnterpriseUnitDO extends BaseVOEntity {
|
||||
@ApiModelProperty(value = "每页数量")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "每页数量")
|
||||
private Long TopOrganizationId;
|
||||
|
||||
}
|
||||
|
||||
@@ -32,4 +32,11 @@ public class ErpCountryDTO {
|
||||
|
||||
@ApiModelProperty(value = "所属组织ID")
|
||||
private Long TopOrganizationId;
|
||||
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数量")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user