liupeng пре 5 година
родитељ
комит
e5751d91c5

+ 5 - 5
code/sapparent/sapservice/src/main/java/org/fouram/mapper/SapUserMapper.xml

@@ -38,7 +38,7 @@
 	</update>
 	
 	<update id="updateResult">
-		update sap_user set result=#{result} where personId=#{personId}
+		update sap_user set result=#{result} where personId=#{personId} and delFlag = 0
 	</update>
 	
 	<select id="selectByUserId" resultType="SapUser">
@@ -46,7 +46,7 @@
 	</select>
 	
 	<select id="selectListByPersonId" resultType="SapUser">
-		select * from sap_user where personId=#{personId} order by isPrimary desc
+		select * from sap_user where personId=#{personId} and delFlag = 0 order by isPrimary desc
 	</select>
 	
 	<select id="selectUnSyncList" resultType="SapUser">
@@ -62,18 +62,18 @@
 	</update>
 	
 	<select id="selectReportUserList" resultType="SapUser">
-		select * from sap_user where result != '垃圾数据' or result is null
+		select * from sap_user where (result != '垃圾数据' or result is null) and delFlag = 0
 	</select>
 	
 	<select id="selectListByName" resultType="SapUser">
 		select * from sap_user 
-		where result = 'SUCCESS' and isPrimary = 1 and name like CONCAT(CONCAT('%', #{name}),'%')
+		where result = 'SUCCESS' and isPrimary = 1 and delFlag = 0 and name like CONCAT(CONCAT('%', #{name}),'%')
 		order by sortNumber ASC
 	</select>
 	
 	<select id="selectListByDepartId" resultType="SapUser">
 		select * from sap_user 
-		where result = 'SUCCESS' and isPrimary = 1 and (
+		where result = 'SUCCESS' and isPrimary = 1 and delFlag = 0 and (
 			firstOrgWxDepartId = #{departId} or secondOrgWxDepartId = #{departId} 
 			or thirdOrgWxDepartId = #{departId} or fourthOrgWxDepartId = #{departId})
 		order by sortNumber ASC