Search in sources :

Example 1 with CmsManualVO

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;
}
Also used : CmsManualVO(com.bc.pmpheep.back.vo.CmsManualVO) PmphUser(com.bc.pmpheep.back.po.PmphUser) CheckedServiceException(com.bc.pmpheep.service.exception.CheckedServiceException) PageResult(com.bc.pmpheep.back.plugin.PageResult)

Aggregations

PageResult (com.bc.pmpheep.back.plugin.PageResult)1 PmphUser (com.bc.pmpheep.back.po.PmphUser)1 CmsManualVO (com.bc.pmpheep.back.vo.CmsManualVO)1 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)1