应付配置的附加费配置完善
This commit is contained in:
@@ -12,12 +12,27 @@
|
||||
order by calc_rule, sort_no, rule_id
|
||||
</select>
|
||||
|
||||
<select id="selectByProductId" resultType="com.bms.price.domain.PaySurchargeRule">
|
||||
select rule_id as ruleId, product_id as productId, term_id as termId, version_no as versionNo,
|
||||
calc_rule as calcRule, enabled, calc_param as calcParam, rule_detail as ruleDetail, postcode_param as postcodeParam,
|
||||
zone_name as zoneName, weight_min as weightMin, weight_max as weightMax, sort_no as sortNo
|
||||
from pay_surcharge_rule
|
||||
where product_id = #{productId}
|
||||
order by calc_rule, sort_no, rule_id
|
||||
</select>
|
||||
|
||||
<delete id="deleteByTerm">
|
||||
delete from pay_surcharge_rule
|
||||
where product_id = #{productId}
|
||||
and term_id = #{termId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByProductIds">
|
||||
delete from pay_surcharge_rule
|
||||
where product_id in
|
||||
<foreach collection="productIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into pay_surcharge_rule (
|
||||
product_id, term_id, version_no, calc_rule, enabled, calc_param, rule_detail, postcode_param,
|
||||
@@ -29,18 +44,4 @@
|
||||
#{row.createBy}, sysdate(), #{row.updateBy}, sysdate())
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="selectPreviousVersion" resultType="com.bms.price.domain.PaySurchargeRule">
|
||||
select v.product_id as productId, t.term_id as termId, ifnull(v.version_no, 1) as versionNo
|
||||
from pay_product cur
|
||||
join pay_product v on v.dict_value = cur.dict_value
|
||||
and v.dict_value is not null and v.dict_value <> ''
|
||||
and v.product_id <> cur.product_id
|
||||
and (v.channel_id is null or v.channel_id = '')
|
||||
and ifnull(v.version_no, 1) < ifnull(cur.version_no, 1)
|
||||
join pay_product_term t on t.product_id = v.product_id and t.price_set_id is null
|
||||
where cur.product_id = #{productId}
|
||||
order by ifnull(v.version_no, 1) desc, t.term_id desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user