use of com.bc.pmpheep.back.vo.CmsManualVO in project pmph by BCSquad.
the class CmsManualServiceImpl method listCmsManual.
@Override
public PageResult<CmsManualVO> listCmsManual(PageParameter<CmsManualVO> pageParameter, String sessionId) throws CheckedServiceException {
// 获取当前登陆用户
PmphUser pmphUser = SessionUtil.getPmphUserBySessionId(sessionId);
if (ObjectUtil.isNull(pmphUser) || ObjectUtil.isNull(pmphUser.getId())) {
throw new CheckedServiceException(CheckedExceptionBusiness.CMS, CheckedExceptionResult.NULL_PARAM, "用户为空");
}
PageResult<CmsManualVO> pageResult = new PageResult<CmsManualVO>();
// 将页面大小和页面页码拷贝
PageParameterUitl.CopyPageParameter(pageParameter, pageResult);
// 包含数据总条数的数据集
List<CmsManualVO> cmsManualVOs = cmsManualDao.listCmsManual(pageParameter);
if (CollectionUtil.isNotEmpty(cmsManualVOs)) {
Integer count = cmsManualVOs.get(0).getCount();
pageResult.setTotal(count);
pageResult.setRows(cmsManualVOs);
}
return pageResult;
}
Aggregations