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; /** * 电子邮件