应付配置增加附加费配置,应付账单新增核销、对账、凭证、审核功能
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bms.price.mapper.PaySurchargeRuleMapper">
|
||||
|
||||
<select id="selectByProduct" 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}
|
||||
and term_id = #{termId}
|
||||
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>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into pay_surcharge_rule (
|
||||
product_id, term_id, version_no, calc_rule, enabled, calc_param, rule_detail, postcode_param,
|
||||
zone_name, weight_min, weight_max, sort_no, create_by, create_time, update_by, update_time
|
||||
) values
|
||||
<foreach collection="list" item="row" separator=",">
|
||||
(#{row.productId}, #{row.termId}, ifnull(#{row.versionNo}, 1), #{row.calcRule}, ifnull(#{row.enabled}, '1'),
|
||||
#{row.calcParam}, #{row.ruleDetail}, #{row.postcodeParam}, #{row.zoneName}, #{row.weightMin}, #{row.weightMax}, ifnull(#{row.sortNo}, 0),
|
||||
#{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