偏远地区邮编判断调整
This commit is contained in:
@@ -100,6 +100,20 @@
|
||||
select group_id from pay_postcode_group where file_md5 = #{fileMd5} and sheet_name = #{sheetName}
|
||||
</select>
|
||||
|
||||
<select id="selectGroupsForProduct" resultType="com.bms.price.domain.PayPostcodeGroup">
|
||||
select group_id as groupId, block_title as blockTitle, channel_name as channelName,
|
||||
product_name as productName, quote_sheet as quoteSheet, sheet_name as sheetName,
|
||||
config_kind as configKind, coverage, fee_name as feeName, fee_text as feeText,
|
||||
country_name as countryName, country_code as countryCode
|
||||
from pay_postcode_group
|
||||
where
|
||||
<foreach collection="names" item="name" separator=" or ">
|
||||
lower(quote_sheet) = lower(#{name})
|
||||
or lower(product_name) = lower(#{name})
|
||||
or lower(sheet_name) = lower(#{name})
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectGroupsByTokens" resultType="com.bms.price.domain.PayPostcodeGroup">
|
||||
select group_id as groupId, block_title as blockTitle, channel_name as channelName,
|
||||
product_name as productName, quote_sheet as quoteSheet, sheet_name as sheetName,
|
||||
|
||||
@@ -250,12 +250,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertSurcharges">
|
||||
insert into pay_surcharge (
|
||||
product_id, version_no, section_name, fee_name, zone_name, charge_text, amount, currency, price_unit, fee_desc, period_text,
|
||||
effective_start, effective_end, charge_timing, calc_rule, calc_param, sort_no
|
||||
effective_start, effective_end, charge_timing, calc_rule, calc_param, weight_min, weight_max, postcode_param, sort_no
|
||||
) values
|
||||
<foreach collection="list" item="row" separator=",">
|
||||
(#{row.productId}, ifnull(#{row.versionNo}, 1), #{row.sectionName}, #{row.feeName}, #{row.zoneName}, #{row.chargeText}, #{row.amount},
|
||||
#{row.currency}, #{row.priceUnit}, #{row.feeDesc}, #{row.periodText}, #{row.effectiveStart}, #{row.effectiveEnd},
|
||||
#{row.chargeTiming}, ifnull(#{row.calcRule}, 'MANUAL'), #{row.calcParam}, #{row.sortNo})
|
||||
#{row.chargeTiming}, ifnull(#{row.calcRule}, 'MANUAL'), #{row.calcParam}, #{row.weightMin}, #{row.weightMax},
|
||||
#{row.postcodeParam}, #{row.sortNo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -280,7 +281,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select surcharge_id as surchargeId, product_id as productId, version_no as versionNo, section_name as sectionName, fee_name as feeName,
|
||||
zone_name as zoneName, charge_text as chargeText, amount, currency, price_unit as priceUnit, fee_desc as feeDesc,
|
||||
period_text as periodText, effective_start as effectiveStart, effective_end as effectiveEnd,
|
||||
charge_timing as chargeTiming, calc_rule as calcRule, calc_param as calcParam, sort_no as sortNo
|
||||
charge_timing as chargeTiming, calc_rule as calcRule, calc_param as calcParam,
|
||||
weight_min as weightMin, weight_max as weightMax, postcode_param as postcodeParam, sort_no as sortNo
|
||||
from pay_surcharge
|
||||
where product_id in
|
||||
<foreach collection="productIds" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
|
||||
Reference in New Issue
Block a user