mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update mybatis-plus 3.4.3 => 3.4.3.3 适配升级 (包含不兼容升级) 请详细阅读 mybatis-plus 官方升级文档
This commit is contained in:
@ -58,7 +58,7 @@ public interface ISysDeptService extends IService<SysDept> {
|
||||
* @param deptId 部门ID
|
||||
* @return 子部门数
|
||||
*/
|
||||
public int selectNormalChildrenDeptById(Long deptId);
|
||||
public long selectNormalChildrenDeptById(Long deptId);
|
||||
|
||||
/**
|
||||
* 是否存在部门子节点
|
||||
|
@ -69,7 +69,7 @@ public interface ISysPostService extends IService<SysPost> {
|
||||
* @param postId 岗位ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int countUserPostById(Long postId);
|
||||
public long countUserPostById(Long postId);
|
||||
|
||||
/**
|
||||
* 删除岗位信息
|
||||
|
@ -101,7 +101,7 @@ public interface ISysRoleService extends IService<SysRole> {
|
||||
* @param roleId 角色ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int countUserRoleByRoleId(Long roleId);
|
||||
public long countUserRoleByRoleId(Long roleId);
|
||||
|
||||
/**
|
||||
* 新增保存角色信息
|
||||
|
@ -120,7 +120,7 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
* @return 子部门数
|
||||
*/
|
||||
@Override
|
||||
public int selectNormalChildrenDeptById(Long deptId) {
|
||||
public long selectNormalChildrenDeptById(Long deptId) {
|
||||
return count(new LambdaQueryWrapper<SysDept>()
|
||||
.eq(SysDept::getStatus, 0)
|
||||
.apply("find_in_set({0}, ancestors)", deptId));
|
||||
@ -134,7 +134,7 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChildByDeptId(Long deptId) {
|
||||
int result = count(new LambdaQueryWrapper<SysDept>()
|
||||
long result = count(new LambdaQueryWrapper<SysDept>()
|
||||
.eq(SysDept::getParentId, deptId)
|
||||
.last("limit 1"));
|
||||
return result > 0;
|
||||
@ -148,7 +148,7 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
||||
*/
|
||||
@Override
|
||||
public boolean checkDeptExistUser(Long deptId) {
|
||||
int result = userMapper.selectCount(new LambdaQueryWrapper<SysUser>()
|
||||
long result = userMapper.selectCount(new LambdaQueryWrapper<SysUser>()
|
||||
.eq(SysUser::getDeptId, deptId));
|
||||
return result > 0;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
*/
|
||||
@Override
|
||||
public boolean hasChildByMenuId(Long menuId) {
|
||||
int result = count(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId,menuId));
|
||||
long result = count(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId,menuId));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ public class SysMenuServiceImpl extends ServicePlusImpl<SysMenuMapper, SysMenu,
|
||||
*/
|
||||
@Override
|
||||
public boolean checkMenuExistRole(Long menuId) {
|
||||
int result = roleMenuMapper.selectCount(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId,menuId));
|
||||
long result = roleMenuMapper.selectCount(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId,menuId));
|
||||
return result > 0;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class SysPostServiceImpl extends ServicePlusImpl<SysPostMapper, SysPost,
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int countUserPostById(Long postId) {
|
||||
public long countUserPostById(Long postId) {
|
||||
return userPostMapper.selectCount(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getPostId,postId));
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int countUserRoleByRoleId(Long roleId) {
|
||||
public long countUserRoleByRoleId(Long roleId) {
|
||||
return userRoleMapper.selectCount(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getRoleId, roleId));
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
|
||||
*/
|
||||
@Override
|
||||
public String checkUserNameUnique(String userName) {
|
||||
int count = count(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, userName).last("limit 1"));
|
||||
long count = count(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, userName).last("limit 1"));
|
||||
if (count > 0) {
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user