Commit d44f3796 by 林永健

refactor(rpc-dj-pe-analysis): 调整首付款时间筛选条件逻辑

- 删除了对首付款时间范围的统一过滤条件
- 根据业务类型分别应用不同的首付款时间字段过滤
- 为业务类型4使用ext_warranty_first_pay_time字段过滤
- 为业务类型1使用light_mod_first_pay_time字段过滤
- 为业务类型2使用benefits_first_pay_time字段过滤
- 业务类型不匹配时添加默认不匹配条件避免数据错误
1 parent 1c2f69ff
......@@ -122,12 +122,6 @@
#{item}
</foreach>
</if>
<if test="firstPayTimeStart != null">
and sm.first_pay_time >= #{firstPayTimeStart}
</if>
<if test="firstPayTimeEnd != null">
and sm.first_pay_time &lt;= #{firstPayTimeEnd}
</if>
<if test="signedTimeStart != null">
and spc.signed_time >= #{signedTimeStart}
</if>
......@@ -145,6 +139,35 @@
</if>
<if test="businessType != null">
and spcbt.business_type = #{businessType}
<choose>
<when test="businessType == 4">
<if test="firstPayTimeStart != null">
and sm.ext_warranty_first_pay_time >= #{firstPayTimeStart}
</if>
<if test="firstPayTimeEnd != null">
and sm.ext_warranty_first_pay_time &lt;= #{firstPayTimeEnd}
</if>
</when>
<when test="businessType == 1">
<if test="firstPayTimeStart != null">
and sm.light_mod_first_pay_time >= #{firstPayTimeStart}
</if>
<if test="firstPayTimeEnd != null">
and sm.light_mod_first_pay_time &lt;= #{firstPayTimeEnd}
</if>
</when>
<when test="businessType == 2">
<if test="firstPayTimeStart != null">
and sm.benefits_first_pay_time >= #{firstPayTimeStart}
</if>
<if test="firstPayTimeEnd != null">
and sm.benefits_first_pay_time &lt;= #{firstPayTimeEnd}
</if>
</when>
<otherwise>
and 0 = 1
</otherwise>
</choose>
</if>
<if test="mainBrandId != null">
and spcb.main_brand_id = #{mainBrandId}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!