From 95e54ad11a71699634e949c2ccecdb324d665d35 Mon Sep 17 00:00:00 2001 From: dataprince Date: Tue, 19 Dec 2023 16:10:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9delFlag=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=BAInteger=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ------ ruoyi-admin/pom.xml | 4 +-- .../com/ruoyi/system/domain/SysClient.java | 2 +- .../java/com/ruoyi/system/domain/SysDept.java | 6 ++-- .../java/com/ruoyi/system/domain/SysRole.java | 4 +-- .../java/com/ruoyi/system/domain/SysUser.java | 4 +-- .../ruoyi/system/mapper/SysRoleMapper.java | 2 +- .../service/impl/SysDeptServiceImpl.java | 18 ++++++------ .../service/impl/SysRoleServiceImpl.java | 14 +++++----- .../service/impl/SysUserServiceImpl.java | 28 +++++++++---------- 10 files changed, 41 insertions(+), 49 deletions(-) diff --git a/pom.xml b/pom.xml index ca8fc7f..de5d597 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,6 @@ 1.7.5 3.0.3 1.37.0 - 8.0.33 3.1.1 5.0.1 1.21 @@ -179,13 +178,6 @@ ${satoken.version} - - - mysql - mysql-connector-java - ${mysql.version} - - jakarta.servlet diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 27959ef..8c3f27f 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -27,8 +27,8 @@ - mysql - mysql-connector-java + com.mysql + mysql-connector-j diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClient.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClient.java index 896c084..954328b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClient.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClient.java @@ -74,7 +74,7 @@ public class SysClient extends BaseEntity { * 删除标志(0代表存在 1代表删除) */ @Column(isLogicDelete = true) - private String delFlag; + private Integer delFlag; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java index c0ce60f..57c1b11 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java @@ -38,7 +38,7 @@ public class SysDept extends BaseEntity private String orderNum; /** 负责人 */ - private String leader;//TODO:修改为Long类型 + private String leader;//TODO:修改为Long类型? /** 联系电话 */ private String phone; @@ -49,8 +49,8 @@ public class SysDept extends BaseEntity /** 部门状态:0正常,1停用 */ private String status; - /** 删除标志(0代表存在 2代表删除) */ - private String delFlag; + /** 删除标志(0代表存在 1代表删除) */ + private Integer delFlag; /** 父部门名称 */ @Column(ignore = true) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java index 7b290e5..868e48a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java @@ -61,9 +61,9 @@ public class SysRole extends BaseEntity { private String status; /** - * 删除标志(0代表存在 2代表删除) + * 删除标志(0代表存在 1代表删除) */ - private String delFlag; + private Integer delFlag; /** * 备注 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java index dc913b5..cf4595b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java @@ -65,8 +65,8 @@ public class SysUser extends BaseEntity /** 帐号状态(0正常 1停用) */ private String status; - /** 删除标志(0代表存在 2代表删除) */ - private String delFlag; + /** 删除标志(0代表存在 1代表删除) */ + private Integer delFlag; /** 最后登录IP */ private String loginIp; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index b98578b..4ac433f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -44,7 +44,7 @@ public interface SysRoleMapper extends BaseMapper .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.ROLE_ID.eq(SYS_ROLE.ROLE_ID)) .leftJoin(SYS_USER).as("u").on(SYS_USER.USER_ID.eq(SYS_USER_ROLE.USER_ID)) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)); - queryWrapper.where(SYS_ROLE.DEL_FLAG.eq("0")) + queryWrapper.where(SYS_ROLE.DEL_FLAG.eq(0)) .and(SYS_USER_ROLE.USER_ID.eq(userId)); List userRoles = selectListByQueryAs(queryWrapper, SysRoleVo.class); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index e6fbee3..e896865 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -68,7 +68,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl */ private QueryWrapper buildQueryWrapper(SysDeptBo deptBo) { QueryWrapper queryWrapper = super.buildBaseQueryWrapper(); - queryWrapper.where(SYS_DEPT.DEL_FLAG.eq("0")); + queryWrapper.where(SYS_DEPT.DEL_FLAG.eq(0)); if (ObjectUtil.isNotNull(deptBo.getDeptId())) { queryWrapper.and(SYS_DEPT.DEPT_ID.eq(deptBo.getDeptId())); @@ -173,7 +173,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl @Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId") @Override public SysDeptVo selectDeptById(Long deptId) { - QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq("0")); + QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq(0)); queryWrapper.and(SYS_DEPT.DEPT_ID.eq(deptId)); return this.getOneAs(queryWrapper, SysDeptVo.class);//TODO:缺少parent_name } @@ -185,7 +185,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl */ @Override public long selectDeptCountByName(String deptName) { - QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq("0")).and(SYS_DEPT.DEPT_NAME.eq(deptName)).and(SYS_DEPT.STATUS.eq("0")); + QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq(0)).and(SYS_DEPT.DEPT_NAME.eq(deptName)).and(SYS_DEPT.STATUS.eq("0")); return this.count(queryWrapper); } @@ -196,7 +196,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl */ @Override public SysDeptVo selectDeptByName(String deptName) { - QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq("0")).and(SYS_DEPT.DEPT_NAME.eq(deptName)).and(SYS_DEPT.STATUS.eq("0")); + QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq(0)).and(SYS_DEPT.DEPT_NAME.eq(deptName)).and(SYS_DEPT.STATUS.eq("0")); return this.getOneAs(queryWrapper,SysDeptVo.class); } @@ -212,7 +212,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl .select(QueryMethods.count(SYS_DEPT.DEPT_ID)) .from(SYS_DEPT) .where(SYS_DEPT.STATUS.eq("0")) - .and(SYS_DEPT.DEL_FLAG.eq("0")) + .and(SYS_DEPT.DEL_FLAG.eq(0)) .and(QueryMethods.findInSet(QueryMethods.number(deptId),SYS_DEPT.ANCESTORS).gt(0)); return deptMapper.selectObjectByQueryAs(queryWrapper,Integer.class); @@ -229,7 +229,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl QueryWrapper queryWrapper = QueryWrapper.create() .select(QueryMethods.count(SYS_DEPT.DEPT_ID)) .from(SYS_DEPT) - .where(SYS_DEPT.DEL_FLAG.eq("0")) + .where(SYS_DEPT.DEL_FLAG.eq(0)) .and(SYS_DEPT.PARENT_ID.eq(deptId)); int result = deptMapper.selectObjectByQueryAs(queryWrapper,Integer.class); @@ -247,7 +247,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl public boolean checkDeptNameUnique(SysDeptBo dept) { Long deptId = ObjectUtil.isNull(dept.getDeptId()) ? -1L : dept.getDeptId(); - QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq("0")); + QueryWrapper queryWrapper = query().where(SYS_DEPT.DEL_FLAG.eq(0)); queryWrapper.and(SYS_DEPT.DEPT_NAME.eq(dept.getDeptName())); queryWrapper.and(SYS_DEPT.PARENT_ID.eq(dept.getParentId())); SysDeptVo info = this.getOneAs(queryWrapper, SysDeptVo.class); @@ -295,7 +295,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl } SysDept dept = MapstructUtils.convert(deptBo, SysDept.class); dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); - dept.setDelFlag("0");//0 代表存在 + dept.setDelFlag(0);//0 代表存在 return this.save(dept); } @@ -379,7 +379,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl //update sys_dept set del_flag = '1' where dept_id = #{deptId} SysDept sysDept = new SysDept(); sysDept.setDeptId(deptId); - sysDept.setDelFlag("1"); + sysDept.setDelFlag(1); return this.updateById(sysDept); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index 04f86ca..bd00aa6 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -77,7 +77,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl .leftJoin(SYS_USER).as("u").on(SYS_USER.USER_ID.eq(SYS_USER_ROLE.USER_ID)) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)); - queryWrapper.where(SYS_ROLE.DEL_FLAG.eq("0")); + queryWrapper.where(SYS_ROLE.DEL_FLAG.eq(0)); if (ObjectUtil.isNotNull(roleBo.getRoleId())) { queryWrapper.and(SYS_ROLE.ROLE_ID.eq(roleBo.getRoleId())); } @@ -145,7 +145,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.ROLE_ID.eq(SYS_ROLE.ROLE_ID)) .leftJoin(SYS_USER).as("u").on(SYS_USER.USER_ID.eq(SYS_USER_ROLE.USER_ID)) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)); - queryWrapper.where(SYS_ROLE.DEL_FLAG.eq("0")) + queryWrapper.where(SYS_ROLE.DEL_FLAG.eq(0)) .and(SYS_USER_ROLE.USER_ID.eq(userId)); List userRoles = this.listAs(queryWrapper, SysRoleVo.class); @@ -205,7 +205,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.ROLE_ID.eq(SYS_ROLE.ROLE_ID)) .leftJoin(SYS_USER).as("u").on(SYS_USER.USER_ID.eq(SYS_USER_ROLE.USER_ID)) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)); - queryWrapper.where(SYS_ROLE.DEL_FLAG.eq("0")) + queryWrapper.where(SYS_ROLE.DEL_FLAG.eq(0)) .and(SYS_USER_ROLE.USER_ID.eq(userId)); List perms = this.listAs(queryWrapper, SysRoleVo.class); //List perms = roleMapper.selectRolePermissionByUserId(userId); @@ -272,7 +272,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl public boolean checkRoleNameUnique(SysRoleBo roleBo) { Long roleId = ObjectUtil.isNull(roleBo.getRoleId()) ? -1L : roleBo.getRoleId(); QueryWrapper queryWrapper = query().where(SYS_ROLE.ROLE_NAME.eq(roleBo.getRoleName())) - .and(SYS_ROLE.DEL_FLAG.eq("0")); + .and(SYS_ROLE.DEL_FLAG.eq(0)); SysRole info = this.getOne(queryWrapper); if (ObjectUtil.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { return UserConstants.NOT_UNIQUE; @@ -290,7 +290,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl public boolean checkRoleKeyUnique(SysRoleBo roleBo) { Long roleId = ObjectUtil.isNull(roleBo.getRoleId()) ? -1L : roleBo.getRoleId(); QueryWrapper queryWrapper = query().where(SYS_ROLE.ROLE_KEY.eq(roleBo.getRoleKey())) - .and(SYS_ROLE.DEL_FLAG.eq("0")); + .and(SYS_ROLE.DEL_FLAG.eq(0)); SysRole info = this.getOne(queryWrapper); if (ObjectUtil.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { return UserConstants.NOT_UNIQUE; @@ -359,7 +359,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl @Transactional public boolean insertRole(SysRoleBo roleBo) { SysRole role = MapstructUtils.convert(roleBo, SysRole.class); - role.setDelFlag("0"); + role.setDelFlag(0); role.setDataScope("1");//默认1:全部数据权限 // 新增角色信息 boolean inserted = this.save(role);//使用全局配置的雪花算法主键生成器生成ID值 @@ -563,7 +563,7 @@ public class SysRoleServiceImpl extends BaseServiceImpl .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.ROLE_ID.eq(SYS_ROLE.ROLE_ID)) .leftJoin(SYS_USER).as("u").on(SYS_USER.USER_ID.eq(SYS_USER_ROLE.USER_ID)) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) - .where(SYS_ROLE.DEL_FLAG.eq("0")) + .where(SYS_ROLE.DEL_FLAG.eq(0)) .and(SYS_USER.USER_NAME.eq(userName)); return this.listAs(queryWrapper, SysRoleVo.class); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index db76a32..bbda4dd 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -93,7 +93,7 @@ public class SysUserServiceImpl extends BaseServiceImpl .select(SYS_USER.USER_ID,SYS_USER.TENANT_ID,SYS_USER.DEPT_ID,SYS_USER.NICK_NAME,SYS_USER.USER_NAME,SYS_USER.USER_TYPE,SYS_USER.EMAIL,SYS_USER.AVATAR,SYS_USER.PHONENUMBER,SYS_USER.GENDER,SYS_USER.STATUS,SYS_USER.DEL_FLAG,SYS_USER.LOGIN_IP,SYS_USER.LOGIN_DATE,SYS_USER.CREATE_BY,SYS_USER.CREATE_TIME,SYS_USER.REMARK,SYS_DEPT.DEPT_NAME,SYS_DEPT.LEADER) .from(SYS_USER.as("u")) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) - .where(SYS_USER.DEL_FLAG.eq("0")); + .where(SYS_USER.DEL_FLAG.eq(0)); if (ObjectUtil.isNotNull(userBo.getUserId())) { queryWrapper.and(SYS_USER.USER_ID.eq(userBo.getUserId())); } @@ -139,7 +139,7 @@ public class SysUserServiceImpl extends BaseServiceImpl )) .from(SYS_USER.as("u")) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) - .where(SYS_USER.DEL_FLAG.eq("0")); + .where(SYS_USER.DEL_FLAG.eq(0)); //.leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.USER_ID.eq(SYS_USER.USER_ID)) //.leftJoin(SYS_ROLE).as("r").on(SYS_ROLE.ROLE_ID.eq(SYS_USER_ROLE.ROLE_ID)); } @@ -198,7 +198,7 @@ public class SysUserServiceImpl extends BaseServiceImpl .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.USER_ID.eq(SYS_USER.USER_ID)) .leftJoin(SYS_ROLE).as("r").on(SYS_ROLE.ROLE_ID.eq(SYS_USER_ROLE.ROLE_ID)) - .where(SYS_USER.DEL_FLAG.eq("0")) + .where(SYS_USER.DEL_FLAG.eq(0)) .and(SYS_ROLE.ROLE_ID.eq(userBo.getRoleId())); if (StringUtils.isNotEmpty(userBo.getUserName())) { queryWrapper.and(SYS_USER.USER_NAME.like(userBo.getUserName())); @@ -240,7 +240,7 @@ public class SysUserServiceImpl extends BaseServiceImpl .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) .leftJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.USER_ID.eq(SYS_USER.USER_ID)) .leftJoin(SYS_ROLE).as("r").on(SYS_ROLE.ROLE_ID.eq(SYS_USER_ROLE.ROLE_ID)) - .where(SYS_USER.DEL_FLAG.eq("0")) + .where(SYS_USER.DEL_FLAG.eq(0)) .and(SYS_USER.STATUS.eq("0")) .and(SYS_ROLE.ROLE_ID.ne(userBo.getRoleId()).or(SYS_ROLE.ROLE_ID.isNull())) .and(SYS_USER.USER_ID.notIn(select(SYS_USER.USER_ID).from(SYS_USER.as("u")).innerJoin(SYS_USER_ROLE).as("ur").on(SYS_USER_ROLE.USER_ID.eq(SYS_USER.USER_ID).and(SYS_USER_ROLE.ROLE_ID.eq(userBo.getRoleId()))))); @@ -264,7 +264,7 @@ public class SysUserServiceImpl extends BaseServiceImpl @Override public SysUserVo selectUserByUserName(String userName) { QueryWrapper queryWrapper = buildOneQueryWrapper(); - queryWrapper.where(SYS_USER.DEL_FLAG.eq("0")); + queryWrapper.where(SYS_USER.DEL_FLAG.eq(0)); if (StringUtils.isNotEmpty(userName)) { queryWrapper.and(SYS_USER.USER_NAME.eq(userName)); } @@ -280,7 +280,7 @@ public class SysUserServiceImpl extends BaseServiceImpl @Override public SysUserVo selectUserByEmail(String email) { QueryWrapper queryWrapper = buildOneQueryWrapper(); - queryWrapper.where(SYS_USER.DEL_FLAG.eq("0")); + queryWrapper.where(SYS_USER.DEL_FLAG.eq(0)); if (StringUtils.isNotEmpty(email)) { queryWrapper.and(SYS_USER.EMAIL.eq(email)); } @@ -318,7 +318,7 @@ public class SysUserServiceImpl extends BaseServiceImpl )) .from(SYS_USER.as("u")) .leftJoin(SYS_DEPT).as("d").on(SYS_DEPT.DEPT_ID.eq(SYS_USER.DEPT_ID)) - .where(SYS_USER.DEL_FLAG.eq("0")); + .where(SYS_USER.DEL_FLAG.eq(0)); if (ObjectUtil.isNotNull(userId)) { queryWrapper.and(SYS_USER.USER_ID.eq(userId)); } @@ -365,7 +365,7 @@ public class SysUserServiceImpl extends BaseServiceImpl public boolean checkUserNameUnique(SysUserBo userBo) { Long userId = ObjectUtil.isNull(userBo.getUserId()) ? -1L : userBo.getUserId(); QueryWrapper queryWrapper = query().where(SYS_USER.USER_NAME.eq(userBo.getUserName())) - .and(SYS_USER.DEL_FLAG.eq("0")); + .and(SYS_USER.DEL_FLAG.eq(0)); SysUser info = this.getOne(queryWrapper); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; @@ -383,7 +383,7 @@ public class SysUserServiceImpl extends BaseServiceImpl public boolean checkPhoneUnique(SysUserBo user) { Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); QueryWrapper queryWrapper = query().where(SYS_USER.PHONENUMBER.eq(user.getPhonenumber())) - .and(SYS_USER.DEL_FLAG.eq("0")); + .and(SYS_USER.DEL_FLAG.eq(0)); SysUser info = this.getOne(queryWrapper); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; @@ -401,7 +401,7 @@ public class SysUserServiceImpl extends BaseServiceImpl public boolean checkEmailUnique(SysUserBo user) { Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); QueryWrapper queryWrapper = query().where(SYS_USER.EMAIL.eq(user.getEmail())) - .and(SYS_USER.DEL_FLAG.eq("0")); + .and(SYS_USER.DEL_FLAG.eq(0)); SysUser info = this.getOne(queryWrapper); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; @@ -455,7 +455,7 @@ public class SysUserServiceImpl extends BaseServiceImpl .select(QueryMethods.count(SYS_USER.USER_ID)) .from(SYS_USER) .where(SYS_USER.DEPT_ID.eq(deptId)) - .and(SYS_USER.DEL_FLAG.eq("0")); + .and(SYS_USER.DEL_FLAG.eq(0)); int result = userMapper.selectObjectByQueryAs(queryWrapper,Integer.class); return result > 0; @@ -659,7 +659,7 @@ public class SysUserServiceImpl extends BaseServiceImpl //逻辑删除用户:update sys_user set del_flag = '1' where user_id = #{userId} SysUser sysUser = new SysUser(); sysUser.setUserId(userId); - sysUser.setDelFlag("1"); + sysUser.setDelFlag(1); return this.updateById(sysUser); } @@ -684,7 +684,7 @@ public class SysUserServiceImpl extends BaseServiceImpl //逻辑删除:update sys_user set del_flag = '1' where user_id in QueryWrapper queryWrapper = query().where(SYS_USER.USER_ID.in(Arrays.asList(userIds))); SysUser sysUser = new SysUser(); - sysUser.setDelFlag("1"); + sysUser.setDelFlag(1); return this.update(sysUser,queryWrapper); //return UpdateChain.of(SysUser.class) // .set(SysUser::getDelFlag, "1") @@ -765,7 +765,7 @@ public class SysUserServiceImpl extends BaseServiceImpl */ @Override public List selectUserListByDept(Long deptId) { - QueryWrapper queryWrapper = query().where(SYS_USER.DEPT_ID.eq(deptId)).and(SYS_USER.DEL_FLAG.eq("0")); + QueryWrapper queryWrapper = query().where(SYS_USER.DEPT_ID.eq(deptId)).and(SYS_USER.DEL_FLAG.eq(0)); return this.listAs(queryWrapper,SysUserVo.class); } }