修改打单计费逻辑
This commit is contained in:
@@ -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 <= date(#{bizDate})
|
||||
and (t.effective_end is null or t.effective_end >= 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,
|
||||
|
||||
Reference in New Issue
Block a user