Commit e84ecf56 authored by 徐州's avatar 徐州

完成客戶查詢需求

parent d420af44
......@@ -384,4 +384,16 @@
</if>
</select>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -889,4 +889,40 @@
and customer_source_type=8
and creater=#{userId}
</select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer where is_delete = 0
<if test="status != null and status != '' ">
AND status = #{status}
</if>
<if test="manager_id != null and manager_id == 0">
AND manager_id IS NULL
</if>
<if test="manager_id != null and manager_id == 1">
AND manager_id IS NOT NULL
</if>
<if test="createSource != null and createSource != '' ">
AND create_source = #{createSource}
</if>
<if test="isRecycled != null and isRecycled >=0">
AND isRecycled = #{isRecycled}
</if>
<if test="notBuyIntention != null and notBuyIntention != ''">
AND buy_intention != #{notBuyIntention}
</if>
<if test="hotlone != null and hotlone != ''">
AND status in (11,0,99)
</if>
<if test="isWaitCall != null and isWaitCall != ''">
AND isWaitCall = #{isWaitCall}
</if>
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by phone
</select>
</mapper>
\ No newline at end of file
......@@ -1232,4 +1232,34 @@
</if>
</select>
<select id="getExistByPhone" parameterType="map" resultMap="infoMap">
SELECT * FROM customer_merge where is_delete = 0 and
STATUS IN ( 11, 0, 99 ) AND
( isWaitCall = 0 OR isWaitCall IS NULL )
<if test="phoneList != null and phoneList.size() > 0 ">
and (
phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone1 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone2 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
OR bak_phone3 IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
</select>
</mapper>
......@@ -66,5 +66,14 @@
customerId = #{customerId}
WHERE id = #{id}
</update>
<select id="getExistByPhone" parameterType="map" resultType="String">
SELECT DISTINCT phone FROM market_customer where (manager_id is null or manager_id = '')
<if test="phoneList != null and phoneList.size() > 0 ">
and phone IN
<foreach collection="phoneList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment