From 08190f79cacd3b405ce35a15091b5743ffdaa649 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Tue, 1 Oct 2019 15:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=8C=E9=87=87=E7=94=A8left=20join=E8=BF=9E?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SysPermissionServiceImpl.java | 24 ------------------- .../mybatis/mapping/SysPermissionDao.xml | 15 ++++++++---- 2 files changed, 11 insertions(+), 28 deletions(-) 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 + +