Commit d0e1d559 by zhangxingmin

push

parent 662b958a
......@@ -14,6 +14,7 @@
</where>
</select>
<!-- 根据你的需求,我已对 conditionList 中的筛选条件进行了调整:每个字段的匹配条件都增加了 OR sa.xxx_val IS NULL,确保当 species_json 中不存在该字段时,不参与筛选,避免因 NULL 值导致数据被过滤。-->
<select id="conditionList"
resultType="com.yd.product.feign.response.announcementcommissionratio.ApiAnnouncementCommissionRatioListResponse">
WITH valid_species AS (
......@@ -132,8 +133,10 @@
AND DATE(#{request.effectiveDate}) BETWEEN DATE(acr.effective_start) AND DATE(acr.effective_end)
</if>
<!-- 供款年期(数字)匹配 -->
<if test="request.paymentTerm != null and request.paymentTerm != ''">
<!--<if test="request.paymentTerm != null and request.paymentTerm != ''">-->
AND (
sa.payment_term_val IS NULL
OR (
sa.payment_term_val = #{request.paymentTerm}
OR (
LOCATE('-', sa.payment_term_val) > 0
......@@ -144,10 +147,13 @@
)
)
)
</if>
)
<!--</if>-->
<!-- 投保年龄(区间值)匹配 -->
<if test="request.age != null and request.age != ''">
<!--<if test="request.age != null and request.age != ''">-->
AND (
sa.age_val IS NULL
OR (
sa.age_val = #{request.age}
OR (
LOCATE('-', sa.age_val) > 0
......@@ -158,10 +164,13 @@
)
)
)
</if>
)
<!--</if>-->
<!-- 期缴保费(区间值)匹配 -->
<if test="request.eachIssuePremium != null">
<!--<if test="request.eachIssuePremium != null">-->
AND (
sa.premium_val IS NULL
OR (
sa.premium_val = #{request.eachIssuePremium}
OR (
LOCATE('-', sa.premium_val) > 0
......@@ -172,18 +181,27 @@
)
)
)
</if>
)
<!--</if>-->
<!-- 专业投资者(选项)匹配 -->
<if test="request.professionalInvestor != null and request.professionalInvestor != ''">
AND sa.professional_val = #{request.professionalInvestor}
</if>
<!--<if test="request.professionalInvestor != null and request.professionalInvestor != ''">-->
AND (
sa.professional_val IS NULL
OR sa.professional_val = #{request.professionalInvestor}
)
<!--</if>-->
<!-- 保单币种(选项)匹配 -->
<if test="request.policyCurrency != null and request.policyCurrency != ''">
AND sa.policy_currency_val = #{request.policyCurrency}
</if>
<!--<if test="request.policyCurrency != null and request.policyCurrency != ''">-->
AND (
sa.policy_currency_val IS NULL
OR sa.policy_currency_val = #{request.policyCurrency}
)
<!--</if>-->
<!-- 保障年期(数字)匹配 -->
<if test="request.guaranteePeriod != null and request.guaranteePeriod != ''">
<!--<if test="request.guaranteePeriod != null and request.guaranteePeriod != ''">-->
AND (
sa.guarantee_period_val IS NULL
OR (
sa.guarantee_period_val = #{request.guaranteePeriod}
OR (
LOCATE('-', sa.guarantee_period_val) > 0
......@@ -194,7 +212,8 @@
)
)
)
</if>
)
<!--</if>-->
ORDER BY acr.effective_start DESC
</select>
</mapper>
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