fix: 客商风险等级筛选不再排除黑名单(与组合展示口径一致)

This commit is contained in:
刘泉佳
2026-10-30 11:58:49 +08:00
parent c40cbfeefb
commit 410c7c167c
@@ -181,20 +181,20 @@
<if test="customer.createTimeEnd != null">
AND create_time &lt;= #{customer.createTimeEnd}
</if>
<!-- 客商风险筛选:黑名单优先,等级筛选排除黑名单避免重复命中 -->
<!-- 客商风险筛选:blacklist 按黑名单状态过滤;等级筛选与黑名单独立(黑名单客商也有等级,组合展示口径一致) -->
<if test="customer.customerRisk != null and customer.customerRisk != ''">
<choose>
<when test="customer.customerRisk == 'blacklist'">
AND hcs_black_status = 'yes'
</when>
<when test="customer.customerRisk == 'high'">
AND hcs_risk_level = '2' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
AND hcs_risk_level = '2'
</when>
<when test="customer.customerRisk == 'middle'">
AND hcs_risk_level = '1' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
AND hcs_risk_level = '1'
</when>
<otherwise>
AND hcs_risk_level = '0' AND (hcs_black_status IS NULL OR hcs_black_status != 'yes')
AND hcs_risk_level = '0'
</otherwise>
</choose>
</if>