应付产品增加状态过滤
This commit is contained in:
@@ -320,32 +320,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where product_id = #{rootId} or origin_id = #{rootId}
|
||||
</select>
|
||||
|
||||
<!-- 取价只看有效期。生效/失效开关不参与,和历史页说明一致。 -->
|
||||
<select id="selectEffectiveVersionId" resultType="long">
|
||||
select v.product_id
|
||||
from pay_product v
|
||||
inner join pay_product_term t on t.product_id = v.product_id
|
||||
where (v.channel_id is null or v.channel_id = '')
|
||||
and (v.product_id = #{stableId} or v.origin_id = #{stableId})
|
||||
and t.status = '0'
|
||||
and (t.effective_start is null or t.effective_start <= date(#{bizDate}))
|
||||
and (t.effective_end is null or t.effective_end >= date(#{bizDate}))
|
||||
order by ifnull(v.version_no, 1) desc, v.product_id desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectInactiveCovering" resultMap="PayProductResult">
|
||||
select v.product_id, v.product_name, t.version_no
|
||||
from pay_product v
|
||||
inner join pay_product_term t on t.product_id = v.product_id
|
||||
where (v.channel_id is null or v.channel_id = '')
|
||||
and (v.product_id = #{stableId} or v.origin_id = #{stableId})
|
||||
and ifnull(t.status, '1') <> '0'
|
||||
and (t.effective_start is null or 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, v.product_id desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectLatestVersionId" resultType="long">
|
||||
select v.product_id
|
||||
from pay_product v
|
||||
|
||||
Reference in New Issue
Block a user