This commit is contained in:
2023-06-21 17:16:46 +08:00
parent 44fb832e64
commit 48001595d2
28 changed files with 201 additions and 79 deletions

View File

@ -5,9 +5,9 @@
<mapper namespace="com.qiaoba.module.system.mapper.SysConfigMapper">
<select id="checkKeyIsExist" resultType="string">
select config_key from sys_config
where config_key = #{sysConfig.configKey}
<if test="sysConfig.configId !=null">
and config_id != #{sysConfig.configId}
where config_key = #{configKey}
<if test="configId !=null">
and config_id != #{configId}
</if>
</select>

View File

@ -8,7 +8,6 @@
select count(1) from sys_dept
where dept_name = #{deptName} and parent_id = #{parentId}
<if test="deptId != null and deptId != ''">and dept_id != #{deptId}</if>
limit 1
</select>
<select id="selectDeptIdsByRoleId" resultType="string">
@ -20,11 +19,11 @@
</select>
<select id="existChild" resultType="string">
SELECT dept_id FROM sys_dept where parent_id = #{deptId} LIMIT 1
SELECT dept_id FROM sys_dept where parent_id = #{deptId}
</select>
<select id="existUsed" resultType="string">
SELECT nickname from sys_user where dept_id = #{deptId} limit 1
SELECT nickname from sys_user where dept_id = #{deptId}
</select>
</mapper>

View File

@ -9,7 +9,6 @@
<if test="dictCode != null and dictCode != ''">
and dict_code != #{dictCode}
</if>
limit 1
</select>
<select id="checkDictValueUnique" resultType="string">
@ -17,6 +16,5 @@
<if test="dictCode != null and dictCode != ''">
and dict_code != #{dictCode}
</if>
limit 1
</select>
</mapper>

View File

@ -6,9 +6,9 @@
<select id="checkDictTypeUnique" resultType="string">
select dict_type from sys_dict_type
where dict_type = #{sysDictType.dictType}
<if test="sysDictType.dictId != null and sysDictType.dictId != ''">
and dict_id != #{sysDictType.dictId}
where dict_type = #{dictType}
<if test="dictId != null and dictId != ''">
and dict_id != #{dictId}
</if>
</select>

View File

@ -13,7 +13,7 @@
</select>
<select id="existChild" resultType="string">
select menu_id from sys_menu where parent_id = #{menuId} limit 1
select menu_id from sys_menu where parent_id = #{menuId}
</select>
<select id="existUsed" resultType="string">
@ -21,7 +21,7 @@
FROM sys_role_menu t1
left join sys_role t2
on t1.role_id = t2.role_id
where t1.menu_id = #{menuId} limit 1
where t1.menu_id = #{menuId}
</select>
<select id="selectMenuIdsByRoleId" resultType="string">

View File

@ -10,7 +10,6 @@
<if test="postId != null and postId != ''">
and post_id != #{postId}
</if>
limit 1
</select>
<select id="checkPostCodeUnique" resultType="string">
@ -19,7 +18,6 @@
<if test="postId != null and postId != ''">
and post_id != #{postId}
</if>
limit 1
</select>
</mapper>

View File

@ -10,7 +10,6 @@
<if test="roleId != null and roleId != 0">
and role_id != #{roleId}
</if>
limit 1
</select>
<select id="checkRoleKeyUnique" parameterType="String" resultType="string">
@ -19,7 +18,6 @@
<if test="roleId != null and roleId != 0">
and role_id != #{roleId}
</if>
limit 1
</select>
<select id="selectBindUserByRoleId" resultType="string">
@ -31,6 +29,5 @@
<foreach collection="list" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
LIMIT 1
</select>
</mapper>

View File

@ -150,19 +150,16 @@
<select id="checkUsernameUnique" resultType="int">
select count(*) from sys_user where username = #{username}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
limit 1
</select>
<select id="checkPhoneUnique" resultType="int">
select count(*) from sys_user where phone = #{phone}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
limit 1
</select>
<select id="checkEmailUnique" resultType="int">
select count(*) from sys_user where email = #{email}
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
limit 1
</select>
</mapper>