From 9ddfe1d82f96e2146c362054cd8c61afd83c0abd Mon Sep 17 00:00:00 2001 From: qi_liang Date: Tue, 21 May 2019 09:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=83=A8=E5=88=86=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lq/cms/service/impl/SysResourceServiceImpl.java | 2 ++ .../impl/SysRoleResourcePermissionServiceImpl.java | 8 ++++++-- src/main/java/com/lq/entity/SysFile.java | 2 -- src/main/java/com/lq/entity/SysUser.java | 5 ----- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java index 75c87c6..8890bf9 100755 --- a/src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletRequest; import java.util.*; +import java.util.stream.Stream; /** * Created by qi_liang on 2018/6/21. @@ -83,6 +84,7 @@ public class SysResourceServiceImpl extends BaseServiceImpl impleme List sysResourceList = sysResourceDao.findByParentId(0L); Iterator sysResourceIterator = sysResourceList.iterator(); List list=new ArrayList<>(); + Stream resourceStream = sysResourceList.stream(); while (sysResourceIterator.hasNext()){ SysResource sysResource = sysResourceIterator.next(); MenusItem menusItem=new MenusItem(); diff --git a/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java b/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java index 2dc6fde..8aabbfc 100755 --- a/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java +++ b/src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java @@ -27,6 +27,10 @@ import java.util.*; @Service public class SysRoleResourcePermissionServiceImpl extends BaseServiceImpl implements SysRoleResourcePermissionService { + public static final String RESOURCE_SYMBOL = "_"; + + public static final String PERMISSIONID_KEY = "id_permissionId"; + @Autowired private SysRoleResourcePermissionDao sysRoleResourcePermissionDao; @@ -54,7 +58,7 @@ public class SysRoleResourcePermissionServiceImpl extends BaseServiceImpl map=new HashMap(); - map.put("id_permissionId",sysResource.getId()+"_"+PermissionTyepEnum.SELECT.getValue()); + map.put(PERMISSIONID_KEY,sysResource.getId()+RESOURCE_SYMBOL+PermissionTyepEnum.SELECT.getValue()); ztreeItem.setAttributes(getAttributes(sysResource.getId(), Long.valueOf(PermissionTyepEnum.SELECT.getValue()))); List menuItmeList=sysResourceDao.findByParentId(sysResource.getId()); for (SysResource resource:menuItmeList){ @@ -153,7 +157,7 @@ public class SysRoleResourcePermissionServiceImpl extends BaseServiceImpl getAttributes(Long resourceId,Long permissionId){ Map map=new HashMap<>(); - map.put("id_permissionId",resourceId+"_"+permissionId); + map.put(PERMISSIONID_KEY,resourceId+RESOURCE_SYMBOL+permissionId); return map; } } diff --git a/src/main/java/com/lq/entity/SysFile.java b/src/main/java/com/lq/entity/SysFile.java index 67f5d5b..768142f 100755 --- a/src/main/java/com/lq/entity/SysFile.java +++ b/src/main/java/com/lq/entity/SysFile.java @@ -12,13 +12,11 @@ public class SysFile extends IdEntity { /** * 文件名 */ - private String fileName; /** * 文件路径(相对路径) */ - private String path; /** * 上传时间 diff --git a/src/main/java/com/lq/entity/SysUser.java b/src/main/java/com/lq/entity/SysUser.java index 7d7e6aa..4ae6700 100755 --- a/src/main/java/com/lq/entity/SysUser.java +++ b/src/main/java/com/lq/entity/SysUser.java @@ -17,17 +17,14 @@ public class SysUser extends IdEntity { /** * 密码 */ - private String password; /** * 创建时间 */ - private Date createTime; /** * 更新时间 */ - private Date updateTime; /** * 最后登陆时间 @@ -36,12 +33,10 @@ public class SysUser extends IdEntity { /** * 备注 */ - private String remarks; /** * 头像 */ - private String imgUrl; /** * 电子邮件