增加删掉除验证规则
This commit is contained in:
parent
cb031d6ae1
commit
cd89b9932b
|
|
@ -182,8 +182,11 @@ public class SystemMenuServiceImpl implements ISystemMenuService {
|
||||||
SystemMenu model = systemMenuMapper.selectOne(new QueryWrapper<SystemMenu>().eq("id", id));
|
SystemMenu model = systemMenuMapper.selectOne(new QueryWrapper<SystemMenu>().eq("id", id));
|
||||||
Assert.notNull(model, "菜单已不存在!");
|
Assert.notNull(model, "菜单已不存在!");
|
||||||
|
|
||||||
systemMenuMapper.deleteById(id);
|
Assert.isNull(systemMenuMapper.selectOne(
|
||||||
|
new QueryWrapper<SystemMenu>().eq("pid", id)),
|
||||||
|
"请先删除子菜单再操作!");
|
||||||
|
|
||||||
|
systemMenuMapper.deleteById(id);
|
||||||
iSystemRoleMenuService.batchDeleteByMenuId(id);
|
iSystemRoleMenuService.batchDeleteByMenuId(id);
|
||||||
RedisUtil.del(AdminConfig.backstageRolesKey);
|
RedisUtil.del(AdminConfig.backstageRolesKey);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,8 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
||||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||||
systemRoleMapper.insert(model);
|
systemRoleMapper.insert(model);
|
||||||
|
System.out.println(model.getId());
|
||||||
|
System.out.println(systemRoleParam.getMenuIds());
|
||||||
iSystemRoleMenuService.batchSaveByMenuIds(model.getId(), systemRoleParam.getMenuIds());
|
iSystemRoleMenuService.batchSaveByMenuIds(model.getId(), systemRoleParam.getMenuIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue