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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
107 additions
and
80 deletions
+107
-80
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
+107
-80
No files found.
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
View file @
5fab4ff7
...
@@ -131,88 +131,115 @@
...
@@ -131,88 +131,115 @@
<if
test=
"request.effectiveDate != null"
>
<if
test=
"request.effectiveDate != null"
>
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 != ''">-->
<!-- 供款年期(数字)匹配:左开右闭 -->
AND (
AND (
sa.payment_term_val IS NULL
sa.payment_term_val IS NULL
OR (
OR (
sa.payment_term_val = #{request.paymentTerm}
LOCATE('-', sa.payment_term_val) = 0
OR (
AND sa.payment_term_val = #{request.paymentTerm}
LOCATE('-', sa.payment_term_val) > 0
)
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', 1) AS UNSIGNED)
<
= #{request.paymentTerm}
OR (
AND (
LOCATE('-', sa.payment_term_val) > 0
CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', -1) AS UNSIGNED) >= #{request.paymentTerm}
AND (
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}
)
)
<!--</if>-->
OR
<!-- 投保年龄(区间值)匹配 -->
(
<!--<if test="request.age != null and request.age != ''">-->
SUBSTRING_INDEX(sa.payment_term_val, '-', -1) = ''
AND (
AND CAST(SUBSTRING_INDEX(sa.payment_term_val, '-', 1) AS UNSIGNED)
<
#{request.paymentTerm}
sa.age_val IS NULL
)
OR (
)
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 (
AND (
CAST(SUBSTRING_INDEX(sa.age_val, '-', -1) AS UNSIGNED) >= CAST(#{request.age} AS UNSIGNED)
sa.age_val IS NULL
OR SUBSTRING_INDEX(sa.age_val, '-', -1) = ''
OR (
)
LOCATE('-', sa.age_val) = 0
)
AND sa.age_val = #{request.age}
)
)
)
OR (
<!--</if>-->
LOCATE('-', sa.age_val) > 0
<!-- 期缴保费(区间值)匹配 -->
AND (
<!--<if test="request.eachIssuePremium != null">-->
(
AND (
SUBSTRING_INDEX(sa.age_val, '-', -1) != ''
sa.premium_val IS NULL
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.age} AS UNSIGNED)
OR (
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', -1) AS UNSIGNED) >= CAST(#{request.age} AS UNSIGNED)
sa.premium_val = #{request.eachIssuePremium}
)
OR (
OR
LOCATE('-', sa.premium_val) > 0
(
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
= #{request.eachIssuePremium}
SUBSTRING_INDEX(sa.age_val, '-', -1) = ''
AND (
AND CAST(SUBSTRING_INDEX(sa.age_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.age} AS UNSIGNED)
CAST(SUBSTRING_INDEX(sa.premium_val, '-', -1) AS DECIMAL(20,2)) >= #{request.eachIssuePremium}
)
OR SUBSTRING_INDEX(sa.premium_val, '-', -1) = ''
)
)
)
)
)
)
)
<!-- 期缴保费(区间值)匹配:左开右闭 -->
<!--</if>-->
AND (
sa.premium_val IS NULL
OR (
LOCATE('-', sa.premium_val) = 0
AND sa.premium_val = #{request.eachIssuePremium}
)
OR (
LOCATE('-', sa.premium_val) > 0
AND (
(
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 test="request.professionalInvestor != null and request.professionalInvestor != ''">-->
AND (
AND (
sa.professional_val IS NULL
sa.professional_val IS NULL
OR sa.professional_val = #{request.professionalInvestor}
OR sa.professional_val = #{request.professionalInvestor}
)
)
<!--</if>-->
<!-- 保单币种(选项)匹配 -->
<!-- 保单币种(选项)匹配 -->
<!--<if test="request.policyCurrency != null and request.policyCurrency != ''">-->
AND (
AND (
sa.policy_currency_val IS NULL
sa.policy_currency_val IS NULL
OR sa.policy_currency_val = #{request.policyCurrency}
OR sa.policy_currency_val = #{request.policyCurrency}
)
)
<!--</if>-->
<!-- 保障年期(数字)匹配:左开右闭 -->
<!-- 保障年期(数字)匹配 -->
AND (
<!--<if test="request.guaranteePeriod != null and request.guaranteePeriod != ''">-->
sa.guarantee_period_val IS NULL
AND (
OR (
sa.guarantee_period_val IS NULL
LOCATE('-', sa.guarantee_period_val) = 0
OR (
AND 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
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', 1) AS UNSIGNED)
<
= CAST(#{request.guaranteePeriod} AS UNSIGNED)
AND (
AND (
(
CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) AS UNSIGNED) >= CAST(#{request.guaranteePeriod} AS UNSIGNED)
SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) != ''
OR 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
)
(
<!--</if>-->
SUBSTRING_INDEX(sa.guarantee_period_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.guarantee_period_val, '-', 1) AS UNSIGNED)
<
CAST(#{request.guaranteePeriod} AS UNSIGNED)
)
)
)
)
ORDER BY acr.effective_start DESC
ORDER BY acr.effective_start DESC
</select>
</select>
</mapper>
</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