This commit is contained in:
2023-07-10 17:40:14 +08:00
parent d52133394c
commit 373754c2bb
41 changed files with 413 additions and 239 deletions

View File

@ -4,8 +4,8 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qiaoba.module.system.mapper.SysDeptMapper">
<select id="checkDeptNameUnique" resultType="int">
select count(1) from sys_dept
<select id="checkDeptNameUnique" resultType="string">
select dept_name from sys_dept
where dept_name = #{deptName} and parent_id = #{parentId}
<if test="deptId != null and deptId != ''">and dept_id != #{deptId}</if>
</select>

View File

@ -147,18 +147,18 @@
<select id="selectVoList" resultMap="SysUserVoResult">
<include refid="selectUserVo"/>
</select>
<select id="checkUsernameUnique" resultType="int">
select count(*) from sys_user where username = #{username}
<select id="checkUsernameUnique" resultType="string">
select username from sys_user where username = #{username}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
</select>
<select id="checkPhoneUnique" resultType="int">
select count(*) from sys_user where phone = #{phone}
<select id="checkPhoneUnique" resultType="string">
select phone from sys_user where phone = #{phone}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
</select>
<select id="checkEmailUnique" resultType="int">
select count(*) from sys_user where email = #{email}
<select id="checkEmailUnique" resultType="string">
select email from sys_user where email = #{email}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
</select>