diff --git a/src/main/java/com/lq/cms/service/impl/SysPermissionServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysPermissionServiceImpl.java index daef001..5e218e4 100644 --- a/src/main/java/com/lq/cms/service/impl/SysPermissionServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysPermissionServiceImpl.java @@ -39,30 +39,6 @@ public class SysPermissionServiceImpl implements SysPermissionService{ @Override public List findListPage(SysPermissionVo vo) { List sysPermissionVos = sysPermissionDao.findListPage(vo); - sysPermissionVos.forEach(sysPermissionVo1->{ - Optional sysResourceIdOptional = Optional.of(sysPermissionVo1.getSysResourceId()); - if (sysResourceIdOptional.isPresent()) { - SysResource sysResource = sysResourceDao.findOne(sysResourceIdOptional.get()); - if (sysResource!=null) { - sysPermissionVo1.setSysResourceName(sysResource.getMenuName()); - } - } - Optional createUserIdOptional = Optional.of(sysPermissionVo1.getCreateUserId()); - if (createUserIdOptional.isPresent()) { - SysUser createUser = sysUserDao.findOne(createUserIdOptional.get()); - if (createUser!=null) { - sysPermissionVo1.setCreateUserName(createUser.getLoginName()); - } - } - Optional updateUserIdOptional = Optional.of(sysPermissionVo1.getUpdateUserId()); - if (updateUserIdOptional.isPresent()) { - SysUser updateUser = sysUserDao.findOne(updateUserIdOptional.get()); - if (updateUser!=null) { - sysPermissionVo1.setUpdateUserName(updateUser.getLoginName()); - } - } - - }); return sysPermissionVos; } diff --git a/src/main/resources/mybatis/mapping/SysPermissionDao.xml b/src/main/resources/mybatis/mapping/SysPermissionDao.xml index 900dc2a..052e65b 100644 --- a/src/main/resources/mybatis/mapping/SysPermissionDao.xml +++ b/src/main/resources/mybatis/mapping/SysPermissionDao.xml @@ -8,6 +8,10 @@ permission_type,permission_key,name,sys_resource_id,id,status,create_time,create_user_id,update_time,update_user_id + + permission_type,permission_key,name,sys_resource_id,sp.id,sp.status,sp.create_time,sp.create_user_id,sp.update_time,sp.update_user_id + +