From f568a8dda01538a780f3b4a2daac99434e0d8878 Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Mon, 5 Sep 2022 16:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E9=87=8D=E5=A4=84=E7=90=86=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huoran/iasf/service/impl/DeptServiceImpl.java | 3 +-- .../com/huoran/iasf/service/impl/RoleServiceImpl.java | 8 +++++--- src/main/resources/application-dev.yml | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) 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: