Browse Source

Merge remote-tracking branch 'origin/developer' into developerH

Duan_xu 2 years ago
parent
commit
67b36f24fa
1 changed files with 14 additions and 3 deletions
  1. 14 3
      src/main/resources/mappings/modules/user/CmUserMapper.xml

+ 14 - 3
src/main/resources/mappings/modules/user/CmUserMapper.xml

@@ -556,9 +556,20 @@
     <select id="selectByMobileOrEmail" resultType="com.caimei.modules.user.entity.CmUser">
     <select id="selectByMobileOrEmail" resultType="com.caimei.modules.user.entity.CmUser">
 		select u.*,cu.mobile as operatorMobile from user u
 		select u.*,cu.mobile as operatorMobile from user u
 		left join cm_mall_operation_user cu on cu.userID = u.userID
 		left join cm_mall_operation_user cu on cu.userID = u.userID
-		where (u.bindMobile = #{mobileOrEmail}
-		or u.email = #{mobileOrEmail}
-		or (cu.mobile = #{mobileOrEmail} and cu.delFlag != 1))
+		where (u.bindMobile = #{mobileOrEmail} or u.email = #{mobileOrEmail})
+		AND u.userIdentity IN (1,2,3,4)
+		AND u.userOrganizeID = 0
+		<if test="source == 'www'">
+			AND u.registerUserTypeID IN (1,3,4)
+		</if>
+		<if test="source == 'crm'">
+			AND u.registerUserTypeID IN (1,2,3,32,4)
+		</if>
+		UNION
+		select u.*,cu.mobile as operatorMobile from user u
+		left join cm_mall_operation_user cu on cu.userID = u.userID
+		where cu.mobile = #{mobileOrEmail}
+		AND cu.delFlag != 1
 		AND u.userIdentity IN (1,2,3,4)
 		AND u.userIdentity IN (1,2,3,4)
 		AND u.userOrganizeID = 0
 		AND u.userOrganizeID = 0
 		<if test="source == 'www'">
 		<if test="source == 'www'">