Commit 14c7465bc6d281e8e7bb88176857b012723e5f2c

Authored by 杜继强
1 parent 105f1a27

修改创建菜单时permission为空,缓存KEY 为空的BUG ,判断 reqVO.permission 为空时,不做 @CacheEvict 的操作

yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/permission/MenuServiceImpl.java
... ... @@ -45,7 +45,7 @@ public class MenuServiceImpl implements MenuService {
45 45 private TenantService tenantService;
46 46  
47 47 @Override
48   - @CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission")
  48 + @CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, condition = "#reqVO.permission != null", key = "#reqVO.permission")
49 49 public Long createMenu(MenuCreateReqVO reqVO) {
50 50 // 校验父菜单存在
51 51 validateParentMenu(reqVO.getParentId(), null);
... ...