Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-product
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-product
Commits
5fab4ff7
Commit
5fab4ff7
authored
Mar 24, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
035571a8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
32 deletions
+59
-32
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
+59
-32
No files found.
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
View file @
5fab4ff7
...
...
@@ -131,88 +131,115 @@
<if
test=
"request.effectiveDate != null"
>
AND DATE(#{request.effectiveDate}) BETWEEN DATE(acr.effective_start) AND DATE(acr.effective_end)
</if>
<!-- 供款年期(数字)匹配 -->
<!--
<if test="request.paymentTerm != null and request.paymentTerm != ''">
-->
<!--
供款年期(数字)匹配:左开右闭
-->
AND (
sa.payment_term_val IS NULL
OR (
sa.payment_term_val = #{request.paymentTerm}
LOCATE('-', sa.payment_term_val) = 0
AND sa.payment_term_val = #{request.paymentTerm}
)
OR (
LOCATE('-', sa.payment_term_val) > 0
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', 1) AS UNSIGNED)
<
= #{request.paymentTerm}
AND (
CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', -1) AS UNSIGNED) >= #{request.paymentTerm}
OR SUBSTRING_INDEX(sa.payment_term_val, '-', -1) = ''
(
SUBSTRING_INDEX(sa.payment_term_val, '-', -1) != ''
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', 1) AS UNSIGNED)
<
#{request.paymentTerm}
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', -1) AS UNSIGNED) >= #{request.paymentTerm}
)
OR
(
SUBSTRING_INDEX(sa.payment_term_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', 1) AS UNSIGNED)
<
#{request.paymentTerm}
)
)
)
<!--</if>-->
<!-- 投保年龄(区间值)匹配 -->
<!--
<if test="request.age != null and request.age != ''">
-->
)
<!--
投保年龄(区间值)匹配:左开右闭
-->
AND (
sa.age_val IS NULL
OR (
sa.age_val = #{request.age}
LOCATE('-', sa.age_val) = 0
AND sa.age_val = #{request.age}
)
OR (
LOCATE('-', sa.age_val) > 0
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', 1) AS UNSIGNED)
<
= CAST(#{request.age} AS UNSIGNED)
AND (
CAST(SUBSTRING_INDEX(sa.age_val, '-', -1) AS UNSIGNED) >= CAST(#{request.age} AS UNSIGNED)
OR SUBSTRING_INDEX(sa.age_val, '-', -1) = ''
(
SUBSTRING_INDEX(sa.age_val, '-', -1) != ''
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.age} AS UNSIGNED)
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', -1) AS UNSIGNED) >= CAST(#{request.age} AS UNSIGNED)
)
OR
(
SUBSTRING_INDEX(sa.age_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.age} AS UNSIGNED)
)
)
)
)
<!--</if>-->
<!-- 期缴保费(区间值)匹配 -->
<!--<if test="request.eachIssuePremium != null">-->
<!-- 期缴保费(区间值)匹配:左开右闭 -->
AND (
sa.premium_val IS NULL
OR (
sa.premium_val = #{request.eachIssuePremium}
LOCATE('-', sa.premium_val) = 0
AND sa.premium_val = #{request.eachIssuePremium}
)
OR (
LOCATE('-', sa.premium_val) > 0
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
= #{request.eachIssuePremium}
AND (
CAST(SUBSTRING_INDEX(sa.premium_val, '-', -1) AS DECIMAL(20,2)) >= #{request.eachIssuePremium}
OR SUBSTRING_INDEX(sa.premium_val, '-', -1) = ''
(
SUBSTRING_INDEX(sa.premium_val, '-', -1) != ''
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
#{request.eachIssuePremium}
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', -1) AS DECIMAL(20,2)) >= #{request.eachIssuePremium}
)
OR
(
SUBSTRING_INDEX(sa.premium_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
#{request.eachIssuePremium}
)
)
)
<!--</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 IS NULL
OR sa.policy_currency_val = #{request.policyCurrency}
)
<!--</if>-->
<!-- 保障年期(数字)匹配 -->
<!--<if test="request.guaranteePeriod != null and request.guaranteePeriod != ''">-->
<!-- 保障年期(数字)匹配:左开右闭 -->
AND (
sa.guarantee_period_val IS NULL
OR (
sa.guarantee_period_val = #{request.guaranteePeriod}
LOCATE('-', sa.guarantee_period_val) = 0
AND sa.guarantee_period_val = #{request.guaranteePeriod}
)
OR (
LOCATE('-', sa.guarantee_period_val) > 0
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', 1) AS UNSIGNED)
<
= CAST(#{request.guaranteePeriod} AS UNSIGNED)
AND (
CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) AS UNSIGNED) >= CAST(#{request.guaranteePeriod} AS UNSIGNED)
OR SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) = ''
(
SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) != ''
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.guaranteePeriod} AS UNSIGNED)
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) AS UNSIGNED) >= CAST(#{request.guaranteePeriod} AS UNSIGNED)
)
OR
(
SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.guaranteePeriod} AS UNSIGNED)
)
)
)
)
<!--</if>-->
ORDER BY acr.effective_start DESC
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment