diff --git a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
index 2b3ed9f7d..00ac0f5c6 100644
--- a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+++ b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
@@ -103,8 +103,8 @@
FROM
sys_user u
LEFT JOIN sys_user_role urole ON urole.user_id = u.user_id
- LEFT JOIN sys_role r ON r.role_id = urole.role_id
- WHERE u.username = #{username}
+ LEFT JOIN sys_role r ON r.role_id = urole.role_id and r.del_flag = '0'
+ WHERE u.username = #{username} and u.del_flag = '0'