删除部分空格

master
星期八 6 years ago
parent e75c8b3f77
commit 9ddfe1d82f
  1. 2
      src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java
  2. 8
      src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java
  3. 2
      src/main/java/com/lq/entity/SysFile.java
  4. 5
      src/main/java/com/lq/entity/SysUser.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<SysResource> impleme
List<SysResource> sysResourceList = sysResourceDao.findByParentId(0L);
Iterator<SysResource> sysResourceIterator = sysResourceList.iterator();
List<MenusComposite> list=new ArrayList<>();
Stream<SysResource> resourceStream = sysResourceList.stream();
while (sysResourceIterator.hasNext()){
SysResource sysResource = sysResourceIterator.next();
MenusItem menusItem=new MenusItem();

@ -27,6 +27,10 @@ import java.util.*;
@Service
public class SysRoleResourcePermissionServiceImpl extends BaseServiceImpl<SysRoleResourcePermission> 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<SysRol
ztreeItem.setChecked(isCheck(sysResource.getId(), PermissionTyepEnum.SELECT.getValue(),roleId));
ztreeItem.setState("close");
Map<String,Object> map=new HashMap<String,Object>();
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<SysResource> menuItmeList=sysResourceDao.findByParentId(sysResource.getId());
for (SysResource resource:menuItmeList){
@ -153,7 +157,7 @@ public class SysRoleResourcePermissionServiceImpl extends BaseServiceImpl<SysRol
//内部方法,拼接资源和权限ID
private Map<String,Object> getAttributes(Long resourceId,Long permissionId){
Map<String,Object> map=new HashMap<>();
map.put("id_permissionId",resourceId+"_"+permissionId);
map.put(PERMISSIONID_KEY,resourceId+RESOURCE_SYMBOL+permissionId);
return map;
}
}

@ -12,13 +12,11 @@ public class SysFile extends IdEntity {
/**
* 文件名
*/
private String fileName;
/**
* 文件路径(相对路径)
*/
private String path;
/**
* 上传时间

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

Loading…
Cancel
Save