diff --git a/src/main/java/com/huoran/iasf/service/impl/DeptServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/DeptServiceImpl.java index b7302d5..c7b4cb4 100644 --- a/src/main/java/com/huoran/iasf/service/impl/DeptServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/DeptServiceImpl.java @@ -1,6 +1,5 @@ package com.huoran.iasf.service.impl; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -67,7 +66,7 @@ public class DeptServiceImpl extends ServiceImpl impleme QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("name", sysDept.getName()); queryWrapper.eq("pid", sysDept.getPid()); - if (StrUtil.isNotEmpty(sysDept.getId().toString())) { + if (sysDept.getId()!=null) { queryWrapper.last(" and id != " + sysDept.getId()); } List sysDepts = baseMapper.selectList(queryWrapper); diff --git a/src/main/java/com/huoran/iasf/service/impl/RoleServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/RoleServiceImpl.java index 388e293..c383740 100644 --- a/src/main/java/com/huoran/iasf/service/impl/RoleServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/RoleServiceImpl.java @@ -1,6 +1,5 @@ package com.huoran.iasf.service.impl; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -10,7 +9,10 @@ import com.huoran.iasf.entity.SysRole; import com.huoran.iasf.entity.SysRolePermission; import com.huoran.iasf.entity.SysUserRole; import com.huoran.iasf.mapper.SysRoleMapper; -import com.huoran.iasf.service.*; +import com.huoran.iasf.service.HttpSessionService; +import com.huoran.iasf.service.RolePermissionService; +import com.huoran.iasf.service.RoleService; +import com.huoran.iasf.service.UserRoleService; import com.huoran.iasf.vo.req.RolePermissionOperationReqVO; import com.huoran.iasf.vo.resp.DeptRespNodeVO; import com.huoran.iasf.vo.resp.PermissionRespNode; @@ -140,7 +142,7 @@ public class RoleServiceImpl extends ServiceImpl impleme public boolean checkDeptRepeat(SysRole vo) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("name", vo.getName()); - if (StrUtil.isNotEmpty(vo.getId().toString())) { + if (vo.getId()!=null) { queryWrapper.last(" and id != " + vo.getId()); } List sysRoles = baseMapper.selectList(queryWrapper); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 73a8add..d893554 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -6,9 +6,9 @@ spring: datasource: master: username: root - password: HuoRan@2021 + password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://139.9.47.170:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 + url: jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 cache: type: redis redis: