🎨 Improving structure / format of the code.代码格式化

This commit is contained in:
lishangbu 2020-12-28 23:36:35 +08:00
parent 28cdd9c014
commit ab0e0fb8c1
2 changed files with 3 additions and 5 deletions

View File

@ -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));
Assert.isTrue(CollUtil.isEmpty(menuList),"菜单含有下级不能删除");
Assert.isTrue(CollUtil.isEmpty(menuList), "菜单含有下级不能删除");
sysRoleMenuMapper.delete(Wrappers.<SysRoleMenu>query().lambda().eq(SysRoleMenu::getMenuId, id));
// 删除当前菜单及其子菜单
@ -98,8 +98,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
@Override
public List<MenuTree> treeMenu(boolean lazy, Integer parentId) {
if (!lazy) {
return buildTree(
baseMapper.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSort)),
return buildTree(baseMapper.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSort)),
CommonConstants.MENU_TREE_ROOT_ID);
}
@ -124,7 +123,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
return TreeUtils.build(menuTreeList, parent);
}
/**
* 通过sysMenu创建树形节点
* @param menus

View File

@ -157,7 +157,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
public Boolean updateUserInfo(UserDTO userDto) {
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.setPassword(ENCODER.encode(userDto.getNewpassword1()));