Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
precision-effect
Commits
e1a1cbc2
Commit
e1a1cbc2
authored
Aug 11, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户及部门唯一校验修改
parent
7fb33e12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
SysDeptMapper.xml
...system/src/main/resources/mapper/system/SysDeptMapper.xml
+1
-1
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+6
-6
No files found.
precision-effect-system/src/main/resources/mapper/system/SysDeptMapper.xml
View file @
e1a1cbc2
...
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"checkDeptNameUnique"
resultMap=
"SysDeptResult"
>
<select
id=
"checkDeptNameUnique"
resultMap=
"SysDeptResult"
>
<include
refid=
"selectDeptVo"
/>
<include
refid=
"selectDeptVo"
/>
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
where dept_name=#{deptName} and parent_id = #{parentId}
and del_flag = '0'
limit 1
</select>
</select>
<insert
id=
"insertDept"
parameterType=
"SysDept"
>
<insert
id=
"insertDept"
parameterType=
"SysDept"
>
...
...
precision-effect-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
e1a1cbc2
...
@@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectUserByUserName"
parameterType=
"String"
resultMap=
"SysUserResult"
>
<select
id=
"selectUserByUserName"
parameterType=
"String"
resultMap=
"SysUserResult"
>
<include
refid=
"selectUserVo"
/>
<include
refid=
"selectUserVo"
/>
where u.user_name = #{userName}
where u.user_name = #{userName}
and u.del_flag = '0'
</select>
</select>
<select
id=
"selectUserById"
parameterType=
"Long"
resultMap=
"SysUserResult"
>
<select
id=
"selectUserById"
parameterType=
"Long"
resultMap=
"SysUserResult"
>
...
@@ -92,15 +92,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -92,15 +92,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</select>
<select
id=
"checkUserNameUnique"
parameterType=
"String"
resultType=
"int"
>
<select
id=
"checkUserNameUnique"
parameterType=
"String"
resultType=
"int"
>
select count(1) from sys_user where user_name = #{userName} limit 1
select count(1) from sys_user where user_name = #{userName}
and del_flag = '0'
limit 1
</select>
</select>
<select
id=
"checkPhoneUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
<select
id=
"checkPhoneUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber}
and del_flag = '0'
limit 1
</select>
</select>
<select
id=
"checkEmailUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
<select
id=
"checkEmailUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
select user_id, email from sys_user where email = #{email} limit 1
select user_id, email from sys_user where email = #{email}
and del_flag = '0'
limit 1
</select>
</select>
<insert
id=
"insertUser"
parameterType=
"SysUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
<insert
id=
"insertUser"
parameterType=
"SysUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
...
@@ -161,11 +161,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -161,11 +161,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
</update>
<update
id=
"updateUserAvatar"
parameterType=
"SysUser"
>
<update
id=
"updateUserAvatar"
parameterType=
"SysUser"
>
update sys_user set avatar = #{avatar} where user_name = #{userName}
update sys_user set avatar = #{avatar} where user_name = #{userName}
and del_flag = '0'
</update>
</update>
<update
id=
"resetUserPwd"
parameterType=
"SysUser"
>
<update
id=
"resetUserPwd"
parameterType=
"SysUser"
>
update sys_user set password = #{password} where user_name = #{userName}
update sys_user set password = #{password} where user_name = #{userName}
and del_flag = '0'
</update>
</update>
<delete
id=
"deleteUserById"
parameterType=
"Long"
>
<delete
id=
"deleteUserById"
parameterType=
"Long"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment