解决新建菜单目录时系统异常问题

ccongli-dev-0920
LI-CCONG\李聪聪 1 year ago
parent 35076199ff
commit b358c9989f

@ -22,4 +22,10 @@ public enum MenuTypeEnum {
*/
private final Integer type;
// 判断是否不为目录类型
public static boolean isNoDIR(Integer type) {
return !DIR.getType().equals(type);
}
}

@ -27,6 +27,7 @@ import static com.yunxi.scm.framework.common.util.collection.CollectionUtils.con
import static com.yunxi.scm.module.system.dal.dataobject.permission.MenuDO.ID_ROOT;
import static com.yunxi.scm.module.system.enums.ErrorCodeConstants.*;
/**
* Service
*
@ -45,7 +46,9 @@ public class MenuServiceImpl implements MenuService {
private TenantService tenantService;
@Override
@CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission")
@CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission", condition="#reqVO.permission != null")
// @CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission",
// condition="T(com.yunxi.scm.module.system.enums.permission.MenuTypeEnum).isNoDIR(#reqVO.type)")
public Long createMenu(MenuCreateReqVO reqVO) {
// 校验父菜单存在
validateParentMenu(reqVO.getParentId(), null);

Loading…
Cancel
Save