refactor(gateway): 优化代码中的字段名称和查询逻辑
- 将 AdminNoticeVo 中的 userCount 字段注释从"接受用户数"修改为"接收用户数" - 修复 MenuServiceImpl 中上级菜单查询逻辑的错误,将条件从菜单 ID 修改为菜单 PID
This commit is contained in:
parent
1f6d9310b3
commit
8f5c5d1726
@ -13,7 +13,7 @@ public class AdminNoticeVo {
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 接受用户数
|
||||
* 接收用户数
|
||||
*/
|
||||
private Long userCount;
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuRepository, Menu> implement
|
||||
if (baseMapper.exists(new LambdaQueryWrapper<Menu>().eq(Menu::getPermissions, dto.getPermissions()))) {
|
||||
throw new ConstraintException("该权限已存在!请检查输入表单是否出错!");
|
||||
}
|
||||
if (baseMapper.selectOne(new LambdaQueryWrapper<Menu>().eq(Menu::getPid, dto.getPid())) == null && dto.getPid() != null) {
|
||||
if (baseMapper.selectOne(new LambdaQueryWrapper<Menu>().eq(Menu::getId, dto.getPid())) == null && dto.getPid() != null) {
|
||||
throw new ConstraintException("上级菜单不存在!请检查输入表单是否出错!");
|
||||
}
|
||||
Menu menu = mapper.toEntity(dto);
|
||||
|
Loading…
Reference in New Issue
Block a user