use of com.bc.pmpheep.back.vo.CmsCategoryRoleVO in project pmph by BCSquad.
the class CmsCategoryServiceImpl method getCmsCategoryDetail.
@Override
public Map<String, Object> getCmsCategoryDetail(Long id) throws CheckedServiceException {
if (ObjectUtil.isNull(id)) {
throw new CheckedServiceException(CheckedExceptionBusiness.CMS, CheckedExceptionResult.NULL_PARAM, "参数为空");
}
Map<String, Object> resultMap = new HashMap<String, Object>();
CmsCategory cmsCategory = this.getCmsCategoryById(id);
resultMap.put("cmsCategory", cmsCategory);
// 按Category查询对应权限
List<CmsCategoryRoleVO> cmsCategoryRoles = this.getCmsCategoryRoleByCategoryId(id);
for (CmsCategoryRoleVO cmsCategoryRole : cmsCategoryRoles) {
if (Const.CMS_CATEGORY_PERMISSSION_1 == cmsCategoryRole.getPermissionType()) {
resultMap.put("permissionId", cmsCategoryRole.getRoleId());
} else {
resultMap.put("authRoleId", cmsCategoryRole.getRoleId());
}
}
return resultMap;
}
Aggregations