From 7306feb6ef771bce42a9df846284ad6f57efb45c Mon Sep 17 00:00:00 2001 From: hewenqiang <1527468660@qq.com> Date: 星期四, 20 一月 2022 15:24:38 +0800 Subject: [PATCH] fix 修改用户信息校验方法。 1. 校验用户名称是否唯一采用baseMapper.exists()方法判断是否存在。 2. 校验手机号码和校验email是否唯一,当存在userId时,sql查询条件才加上不等于当前userId。 --- ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java index ea6afa2..70fda9a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java @@ -1,7 +1,6 @@ package com.ruoyi.system.service; -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.core.domain.TreeSelect; +import cn.hutool.core.lang.tree.Tree; import com.ruoyi.common.core.domain.entity.SysDept; import java.util.List; @@ -11,7 +10,7 @@ * * @author Lion Li */ -public interface ISysDeptService extends IService<SysDept> { +public interface ISysDeptService { /** * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 * @@ -21,20 +20,12 @@ List<SysDept> selectDeptList(SysDept dept); /** - * 鏋勫缓鍓嶇鎵�闇�瑕佹爲缁撴瀯 - * - * @param depts 閮ㄩ棬鍒楄〃 - * @return 鏍戠粨鏋勫垪琛� - */ - List<SysDept> buildDeptTree(List<SysDept> depts); - - /** * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 * * @param depts 閮ㄩ棬鍒楄〃 * @return 涓嬫媺鏍戠粨鏋勫垪琛� */ - List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts); + List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts); /** * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� @@ -42,7 +33,7 @@ * @param roleId 瑙掕壊ID * @return 閫変腑閮ㄩ棬鍒楄〃 */ - List<Integer> selectDeptListByRoleId(Long roleId); + List<Long> selectDeptListByRoleId(Long roleId); /** * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅 -- Gitblit v1.9.3