From ce1b9f07adf3cd033f2aa6491b9250ca36dc5b15 Mon Sep 17 00:00:00 2001 From: qi Date: Mon, 30 Mar 2020 18:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87jdk8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java index 56caf71..ea5ffc4 100755 --- a/src/main/java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysUserRoleServiceImpl.java @@ -34,7 +34,7 @@ public class SysUserRoleServiceImpl implements SysUserRoleService { Date nowTime=new Date(); sysUserRoleDao.deleteByUserId(id); if (roleList!=null&&roleList.size()>0) { - for (Long roleId : roleList) { + roleList.forEach(roleId->{ SysUserRole sysUserRole = findByRoleIdAndUserId(id, roleId); if (sysUserRole != null) { sysUserRole.setStatus(StatusTypeEnum.STATUS_ACTIVITY_YES.getValue()); @@ -49,7 +49,7 @@ public class SysUserRoleServiceImpl implements SysUserRoleService { sysUserRole.setRoleId(roleId); sysUserRoleDao.save(sysUserRole); } - } + }); } }