mirror of https://gitee.com/maxjhandsome/pig
🎨 Improving structure / format of the code.代码格式化
This commit is contained in:
parent
28cdd9c014
commit
ab0e0fb8c1
|
@ -76,7 +76,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||||
// 查询父节点为当前节点的节点
|
// 查询父节点为当前节点的节点
|
||||||
List<SysMenu> menuList = this.list(Wrappers.<SysMenu>query().lambda().eq(SysMenu::getParentId, id));
|
List<SysMenu> menuList = this.list(Wrappers.<SysMenu>query().lambda().eq(SysMenu::getParentId, id));
|
||||||
|
|
||||||
Assert.isTrue(CollUtil.isEmpty(menuList),"菜单含有下级不能删除");
|
Assert.isTrue(CollUtil.isEmpty(menuList), "菜单含有下级不能删除");
|
||||||
|
|
||||||
sysRoleMenuMapper.delete(Wrappers.<SysRoleMenu>query().lambda().eq(SysRoleMenu::getMenuId, id));
|
sysRoleMenuMapper.delete(Wrappers.<SysRoleMenu>query().lambda().eq(SysRoleMenu::getMenuId, id));
|
||||||
// 删除当前菜单及其子菜单
|
// 删除当前菜单及其子菜单
|
||||||
|
@ -98,8 +98,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||||
@Override
|
@Override
|
||||||
public List<MenuTree> treeMenu(boolean lazy, Integer parentId) {
|
public List<MenuTree> treeMenu(boolean lazy, Integer parentId) {
|
||||||
if (!lazy) {
|
if (!lazy) {
|
||||||
return buildTree(
|
return buildTree(baseMapper.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSort)),
|
||||||
baseMapper.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSort)),
|
|
||||||
CommonConstants.MENU_TREE_ROOT_ID);
|
CommonConstants.MENU_TREE_ROOT_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +123,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||||
return TreeUtils.build(menuTreeList, parent);
|
return TreeUtils.build(menuTreeList, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过sysMenu创建树形节点
|
* 通过sysMenu创建树形节点
|
||||||
* @param menus
|
* @param menus
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
public Boolean updateUserInfo(UserDTO userDto) {
|
public Boolean updateUserInfo(UserDTO userDto) {
|
||||||
UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername());
|
UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername());
|
||||||
|
|
||||||
Assert.isTrue(ENCODER.matches(userDto.getPassword(), userVO.getPassword()),"原密码错误,修改失败");
|
Assert.isTrue(ENCODER.matches(userDto.getPassword(), userVO.getPassword()), "原密码错误,修改失败");
|
||||||
|
|
||||||
SysUser sysUser = new SysUser();
|
SysUser sysUser = new SysUser();
|
||||||
sysUser.setPassword(ENCODER.encode(userDto.getNewpassword1()));
|
sysUser.setPassword(ENCODER.encode(userDto.getNewpassword1()));
|
||||||
|
|
Loading…
Reference in New Issue