Merge remote-tracking branch 'origin/develop_master_new' into develop_master_new
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.slrs.sarRole.enums;
|
||||
|
||||
public enum MenuEnum {
|
||||
|
||||
SY("首页","asdfadf");
|
||||
|
||||
String menuName;
|
||||
String menuId;
|
||||
|
||||
MenuEnum(String menuName, String menuId) {
|
||||
this.menuName = menuName;
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public String getMenuName() {
|
||||
return menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setMenuId(String menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.adc.da.slrs.sarRole.entity.TsRole;
|
||||
import com.adc.da.slrs.sarRole.dao.TsRoleDao;
|
||||
import com.adc.da.slrs.sarRole.entity.TsRoleMenuVO;
|
||||
import com.adc.da.slrs.sarRole.entity.TsRoleResourceVO;
|
||||
import com.adc.da.slrs.sarRole.enums.MenuEnum;
|
||||
import com.adc.da.slrs.sarRole.service.ITsRoleService;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.utils.util.ListUtil;
|
||||
@@ -112,6 +113,8 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
|
||||
tsRole.setRoleHierarchy(parentRole.getRoleHierarchy()+1);
|
||||
}
|
||||
tsRoleDao.insert(tsRole);
|
||||
//配置首页菜单
|
||||
tsRoleDao.addMenu(tsRole.getId(), MenuEnum.SY.getMenuId());
|
||||
List<String> as=tsResourceService.getDefaultByName();
|
||||
as.forEach(s -> {
|
||||
tsRoleDao.addResource(tsRole.getId(),s);
|
||||
|
||||
Reference in New Issue
Block a user