修改打单计费逻辑

This commit is contained in:
wuweihua
2026-11-09 23:38:07 +08:00
parent 16afa0d590
commit de5784cbac
7 changed files with 377 additions and 3 deletions
@@ -70,6 +70,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by case when t.status = '1' then 0 when t.status = '0' then 1 else 2 end, p.product_name, t.term_id desc
</select>
<select id="selectTermIdBySetProductAt" resultType="long">
select t.term_id
from pay_product_term t
where t.price_set_id = #{priceSetId}
and t.product_id = #{productId}
and t.effective_start is not null
and t.effective_start &lt;= date(#{bizDate})
and (t.effective_end is null or t.effective_end &gt;= date(#{bizDate}))
order by ifnull(t.version_no, 1) desc, t.term_id desc
limit 1
</select>
<select id="selectLabelVersionGroups" resultType="com.bms.price.domain.LabelPackageVersion">
select #{priceSetId} as priceSetId,
t.version_no as versionNo,