소스 검색

修改新增用户判断用户邮箱是否存在 因多用户导致的bug

王苗苗 6 달 전
부모
커밋
700f6059bc

+ 1 - 1
slibra-system/src/main/java/com/slibra/system/mapper/SysUserMapper.java

@@ -125,7 +125,7 @@ public interface SysUserMapper
      * @param type
      * @return 结果
      */
-    public SysUser checkEmailUnique(String email, Integer type);
+    public SysUser checkEmailUnique(@Param("email") String email, @Param("type") Integer type);
 
     SysUser selectUserByPhonenumber(String phoneNumber);
 }

+ 1 - 1
slibra-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -153,7 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	
 	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
+		select user_id, email from sys_user where email = #{email} and type = #{type} and del_flag = '0' limit 1
 	</select>
 	
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">