Commit d0e1d559 by zhangxingmin

push

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