修改注释说明

master
星期八 5 years ago
parent ffe8408cc8
commit 01b8c23ee3
  1. 5
      src/main/java/com/lq/cms/service/impl/SysResourceServiceImpl.java
  2. 16
      src/main/java/com/lq/cms/service/impl/SysRoleResourcePermissionServiceImpl.java
  3. 10
      src/main/java/com/lq/cms/web/BaseAdminController.java
  4. 1
      src/main/java/com/lq/cms/web/LoginController.java

@ -1,6 +1,6 @@
package com.lq.cms.service.impl;
import com.lq.cms.emun.PermissionTyepEnum;
import com.lq.cms.emun.PermissionTypeEnum;
import com.lq.cms.emun.StatusTypeEnum;
import com.lq.cms.mode.Menus;
import com.lq.cms.mode.MenusComposite;
@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
* Created by qi_liang on 2018/6/21.
@ -55,7 +54,7 @@ public class SysResourceServiceImpl implements SysResourceService {
Map<String,Object> map=new HashMap(3);
map.put("userId",sysUserId);
map.put("parentId", Constant.TOP_PARENT_ID);
map.put("permissionId", PermissionTyepEnum.SELECT.getValue());
map.put("permissionId", PermissionTypeEnum.SELECT.getValue());
List<SysResource> menusItmeList=sysResourceDao.findMenu(map);
List<MenusComposite> list=new ArrayList<>();
menusItmeList.forEach(sysResource->{

@ -1,7 +1,7 @@
package com.lq.cms.service.impl;
import com.lq.cms.emun.BasicsPermissionKeyEnum;
import com.lq.cms.emun.PermissionTyepEnum;
import com.lq.cms.emun.PermissionTypeEnum;
import com.lq.cms.emun.StatusTypeEnum;
import com.lq.cms.mode.Ztree;
import com.lq.cms.mode.ZtreeComposite;
@ -56,17 +56,17 @@ public class SysRoleResourcePermissionServiceImpl implements SysRoleResourcePer
ztreeItem.setId(sysResource.getId());
ztreeItem.setIconCls(sysResource.getMenuIco());
ztreeItem.setText(sysResource.getMenuName());
ztreeItem.setChecked(isCheck(sysResource.getId(), PermissionTyepEnum.SELECT.getValue(),roleId));
ztreeItem.setChecked(isCheck(sysResource.getId(), PermissionTypeEnum.SELECT.getValue(),roleId));
ztreeItem.setState("close");
ztreeItem.setAttributes(getAttributes(sysResource.getId(), Long.valueOf(PermissionTyepEnum.SELECT.getValue())));
ztreeItem.setAttributes(getAttributes(sysResource.getId(), Long.valueOf(PermissionTypeEnum.SELECT.getValue())));
List<SysResource> menuItmeList=sysResourceDao.findByParentId(sysResource.getId());
for (SysResource resource:menuItmeList){
ZtreeItem ztreeItme1=new ZtreeItem();
ztreeItme1.setId(resource.getId());
ztreeItme1.setText(resource.getMenuName());
ztreeItme1.setIconCls(resource.getMenuIco());
ztreeItme1.setChecked(isCheck(resource.getId(), PermissionTyepEnum.SELECT.getValue(),roleId));
ztreeItme1.setAttributes(getAttributes(resource.getId(),PermissionTyepEnum.SELECT.getValue()));
ztreeItme1.setChecked(isCheck(resource.getId(), PermissionTypeEnum.SELECT.getValue(),roleId));
ztreeItme1.setAttributes(getAttributes(resource.getId(), PermissionTypeEnum.SELECT.getValue()));
List<SysPermission> permissionList = sysPermissionDao.findBySysResourceId(resource.getId());
for (SysPermission sysPermission:permissionList){
if (BasicsPermissionKeyEnum.SELECT_MENU_KEY.getValue().equals(sysPermission.getPermissionKey())){
@ -127,16 +127,16 @@ public class SysRoleResourcePermissionServiceImpl implements SysRoleResourcePer
List<PermissionVo> list = new ArrayList<>();
List<SysResource> sysResourceList = sysResourceDao.findAll();
Iterator<SysResource> iterator = sysResourceList.iterator();
PermissionTyepEnum[] tyepEnums = PermissionTyepEnum.values();
PermissionTypeEnum[] tyepEnums = PermissionTypeEnum.values();
while (iterator.hasNext()){
SysResource sysResource = iterator.next();
if (sysResource!=null){
for (PermissionTyepEnum permissionTyepEnum:tyepEnums){
for (PermissionTypeEnum permissionTypeEnum :tyepEnums){
PermissionVo permissionVo = new PermissionVo();
permissionVo.setMenuId(sysResource.getId());
permissionVo.setMenuName(sysResource.getMenuName());
permissionVo.setMenuUrl(sysResource.getUrlPath());
permissionVo.setPermissionName(permissionTyepEnum.getConstant());
permissionVo.setPermissionName(permissionTypeEnum.getConstant());
list.add(permissionVo);
}
}

@ -1,6 +1,6 @@
package com.lq.cms.web;
import com.lq.cms.emun.PermissionTyepEnum;
import com.lq.cms.emun.PermissionTypeEnum;
import com.lq.cms.mode.AdminDataGridParam;
import com.lq.cms.service.AdminBaseService;
import com.lq.cms.vo.AdminBaseVo;
@ -48,7 +48,7 @@ public abstract class BaseAdminController<T,V extends AdminBaseVo> {
@ResponseBody
public AdminDataGridParam<V> list(V vo){
Subject subject = SecurityUtils.getSubject();
subject.checkPermission(getIndexUrl()+ Constant.PERSSION_MARK+ PermissionTyepEnum.SELECT.getConstant());
subject.checkPermission(getIndexUrl()+ Constant.PERSSION_MARK+ PermissionTypeEnum.SELECT.getConstant());
AdminDataGridParam<V> adminDataGridParam = setPageDate(vo);
return adminDataGridParam;
}
@ -57,7 +57,7 @@ public abstract class BaseAdminController<T,V extends AdminBaseVo> {
@ResponseBody
public AjaxResult save(V vo) throws InstantiationException, IllegalAccessException {
Subject subject = SecurityUtils.getSubject();
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTyepEnum.INSERT.getConstant());
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTypeEnum.INSERT.getConstant());
AjaxResult ajaxResult = new AjaxResult();
T t = getBaseService().save(vo);
ajaxResult.setData(t);
@ -68,7 +68,7 @@ public abstract class BaseAdminController<T,V extends AdminBaseVo> {
@ResponseBody
public AjaxResult update(V vo){
Subject subject = SecurityUtils.getSubject();
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTyepEnum.UPDATE.getConstant());
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTypeEnum.UPDATE.getConstant());
AjaxResult ajaxResult= new AjaxResult();
getBaseService().update(vo);
return ajaxResult;
@ -78,7 +78,7 @@ public abstract class BaseAdminController<T,V extends AdminBaseVo> {
@ResponseBody
public AjaxResult delete(Long id){
Subject subject = SecurityUtils.getSubject();
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTyepEnum.DELETE.getConstant());
subject.checkPermission(getIndexUrl()+Constant.PERSSION_MARK+ PermissionTypeEnum.DELETE.getConstant());
AjaxResult ajaxResult = new AjaxResult();
getBaseService().delete(id);
return ajaxResult;

@ -69,7 +69,6 @@ public class LoginController extends BaseController{
Subject subject=SecurityUtils.getSubject();
UsernamePasswordToken token=new UsernamePasswordToken(loginName,password.toCharArray());
// UsernamePasswordToken token=new UsernamePasswordToken(loginName,password,false);
try {
subject.login(token);
}catch (UnknownAccountException e){

Loading…
Cancel
Save