提交价格套餐功能
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
<?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.ruoyi.price.mapper.PrcCustomerPriceSetMapper">
|
||||
|
||||
<resultMap type="PrcCustomerPriceSet" id="PrcCustomerPriceSetResult">
|
||||
<id property="customerPricesetId" column="customer_priceset_id" />
|
||||
<result property="priceSetId" column="price_set_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="bindPriority" column="bind_priority" />
|
||||
<result property="prBegindate" column="pr_begindate" />
|
||||
<result property="prEnddate" column="pr_enddate" />
|
||||
<result property="priceSetNote" column="price_set_note" />
|
||||
<result property="createBy" column="created_by" />
|
||||
<result property="createTime" column="created_at" />
|
||||
<result property="updateBy" column="updated_by" />
|
||||
<result property="updateTime" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcCustomerPriceSetVo">
|
||||
select customer_priceset_id, price_set_id, customer_id, customer_name, bind_priority,
|
||||
pr_begindate, pr_enddate, price_set_note,
|
||||
created_by, created_at, updated_by, updated_at
|
||||
from prc_customer_price_set
|
||||
</sql>
|
||||
|
||||
<select id="selectPrcCustomerPriceSetById" parameterType="Long" resultMap="PrcCustomerPriceSetResult">
|
||||
<include refid="selectPrcCustomerPriceSetVo"/>
|
||||
where customer_priceset_id = #{customerPricesetId}
|
||||
</select>
|
||||
|
||||
<select id="selectPrcCustomerPriceSetList" parameterType="PrcCustomerPriceSet" resultMap="PrcCustomerPriceSetResult">
|
||||
<include refid="selectPrcCustomerPriceSetVo"/>
|
||||
<where>
|
||||
<if test="priceSetId != null">
|
||||
AND price_set_id = #{priceSetId}
|
||||
</if>
|
||||
<if test="customerId != null">
|
||||
AND customer_id = #{customerId}
|
||||
</if>
|
||||
<if test="customerName != null and customerName != ''">
|
||||
AND customer_name like concat('%', #{customerName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by bind_priority asc, customer_priceset_id asc
|
||||
</select>
|
||||
|
||||
<select id="countByPriceSetId" parameterType="Long" resultType="int">
|
||||
select count(1) from prc_customer_price_set where price_set_id = #{priceSetId}
|
||||
</select>
|
||||
|
||||
<select id="countOverlap" resultType="int">
|
||||
select count(1)
|
||||
from prc_customer_price_set c
|
||||
inner join prc_price_set s on s.price_set_id = c.price_set_id
|
||||
where c.customer_id = #{customerId}
|
||||
and s.status = 'E'
|
||||
<if test="priceSetId != null">
|
||||
AND c.price_set_id <> #{priceSetId}
|
||||
</if>
|
||||
and c.pr_begindate <= ifnull(#{endDate}, '9999-12-31')
|
||||
and ifnull(c.pr_enddate, '9999-12-31') >= #{beginDate}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcCustomerPriceSet" parameterType="PrcCustomerPriceSet" useGeneratedKeys="true" keyProperty="customerPricesetId">
|
||||
insert into prc_customer_price_set (
|
||||
<if test="priceSetId != null">price_set_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="bindPriority != null">bind_priority,</if>
|
||||
<if test="prBegindate != null">pr_begindate,</if>
|
||||
<if test="prEnddate != null">pr_enddate,</if>
|
||||
<if test="priceSetNote != null">price_set_note,</if>
|
||||
<if test="createBy != null and createBy != ''">created_by,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="priceSetId != null">#{priceSetId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="bindPriority != null">#{bindPriority},</if>
|
||||
<if test="prBegindate != null">#{prBegindate},</if>
|
||||
<if test="prEnddate != null">#{prEnddate},</if>
|
||||
<if test="priceSetNote != null">#{priceSetNote},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcCustomerPriceSet" parameterType="PrcCustomerPriceSet">
|
||||
update prc_customer_price_set
|
||||
<set>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="bindPriority != null">bind_priority = #{bindPriority},</if>
|
||||
<if test="prBegindate != null">pr_begindate = #{prBegindate},</if>
|
||||
pr_enddate = #{prEnddate},
|
||||
<if test="priceSetNote != null">price_set_note = #{priceSetNote},</if>
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where customer_priceset_id = #{customerPricesetId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcCustomerPriceSetByIds" parameterType="Long">
|
||||
delete from prc_customer_price_set where customer_priceset_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deletePrcCustomerPriceSetByPriceSetId" parameterType="Long">
|
||||
delete from prc_customer_price_set where price_set_id = #{priceSetId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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.ruoyi.price.mapper.PrcPriceSetDetailMapper">
|
||||
|
||||
<resultMap type="PrcPriceSetDetail" id="PrcPriceSetDetailResult">
|
||||
<id property="psdId" column="psd_id" />
|
||||
<result property="priceSetId" column="price_set_id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="countryCode" column="country_code" />
|
||||
<result property="countryName" column="country_name" />
|
||||
<result property="zdId" column="zd_id" />
|
||||
<result property="wsdId" column="wsd_id" />
|
||||
<result property="weightLabel" column="weight_label" />
|
||||
<result property="fvValue" column="fv_value" />
|
||||
<result property="fvRegistrationFee" column="fv_registration_fee" />
|
||||
<result property="discountValue" column="discount_value" />
|
||||
<result property="prId" column="pr_id" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcPriceSetDetailVo">
|
||||
select psd_id, price_set_id, product_code, product_name, country_code, country_name,
|
||||
zd_id, wsd_id, weight_label, fv_value, fv_registration_fee, discount_value,
|
||||
pr_id, created_at, updated_at
|
||||
from prc_price_set_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectPrcPriceSetDetailById" parameterType="Long" resultMap="PrcPriceSetDetailResult">
|
||||
<include refid="selectPrcPriceSetDetailVo"/>
|
||||
where psd_id = #{psdId}
|
||||
</select>
|
||||
|
||||
<select id="selectPrcPriceSetDetailList" parameterType="PrcPriceSetDetail" resultMap="PrcPriceSetDetailResult">
|
||||
<include refid="selectPrcPriceSetDetailVo"/>
|
||||
<where>
|
||||
<if test="priceSetId != null">
|
||||
AND price_set_id = #{priceSetId}
|
||||
</if>
|
||||
<if test="productCode != null and productCode != ''">
|
||||
AND product_code = #{productCode}
|
||||
</if>
|
||||
<if test="countryCode != null and countryCode != ''">
|
||||
AND country_code = #{countryCode}
|
||||
</if>
|
||||
</where>
|
||||
order by psd_id asc
|
||||
</select>
|
||||
|
||||
<select id="countProductByPriceSetId" parameterType="Long" resultType="int">
|
||||
select count(distinct product_code) from prc_price_set_detail where price_set_id = #{priceSetId}
|
||||
</select>
|
||||
|
||||
<select id="countByPriceSetId" parameterType="Long" resultType="int">
|
||||
select count(1) from prc_price_set_detail where price_set_id = #{priceSetId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcPriceSetDetail" parameterType="PrcPriceSetDetail" useGeneratedKeys="true" keyProperty="psdId">
|
||||
insert into prc_price_set_detail (
|
||||
<if test="priceSetId != null">price_set_id,</if>
|
||||
<if test="productCode != null and productCode != ''">product_code,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="countryCode != null">country_code,</if>
|
||||
<if test="countryName != null">country_name,</if>
|
||||
<if test="zdId != null">zd_id,</if>
|
||||
<if test="wsdId != null">wsd_id,</if>
|
||||
<if test="weightLabel != null">weight_label,</if>
|
||||
<if test="fvValue != null">fv_value,</if>
|
||||
<if test="fvRegistrationFee != null">fv_registration_fee,</if>
|
||||
<if test="discountValue != null">discount_value,</if>
|
||||
<if test="prId != null">pr_id,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="priceSetId != null">#{priceSetId},</if>
|
||||
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="countryCode != null">#{countryCode},</if>
|
||||
<if test="countryName != null">#{countryName},</if>
|
||||
<if test="zdId != null">#{zdId},</if>
|
||||
<if test="wsdId != null">#{wsdId},</if>
|
||||
<if test="weightLabel != null">#{weightLabel},</if>
|
||||
<if test="fvValue != null">#{fvValue},</if>
|
||||
<if test="fvRegistrationFee != null">#{fvRegistrationFee},</if>
|
||||
<if test="discountValue != null">#{discountValue},</if>
|
||||
<if test="prId != null">#{prId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcPriceSetDetail" parameterType="PrcPriceSetDetail">
|
||||
update prc_price_set_detail
|
||||
<set>
|
||||
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
country_code = #{countryCode},
|
||||
country_name = #{countryName},
|
||||
zd_id = #{zdId},
|
||||
wsd_id = #{wsdId},
|
||||
weight_label = #{weightLabel},
|
||||
fv_value = #{fvValue},
|
||||
fv_registration_fee = #{fvRegistrationFee},
|
||||
discount_value = #{discountValue},
|
||||
pr_id = #{prId},
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where psd_id = #{psdId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcPriceSetDetailByIds" parameterType="Long">
|
||||
delete from prc_price_set_detail where psd_id in
|
||||
<foreach item="psdId" collection="array" open="(" separator="," close=")">
|
||||
#{psdId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deletePrcPriceSetDetailByPriceSetId" parameterType="Long">
|
||||
delete from prc_price_set_detail where price_set_id = #{priceSetId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?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.ruoyi.price.mapper.PrcPriceSetMapper">
|
||||
|
||||
<resultMap type="PrcPriceSet" id="PrcPriceSetResult">
|
||||
<id property="priceSetId" column="price_set_id" />
|
||||
<result property="priceSetCode" column="price_set_code" />
|
||||
<result property="priceSetName" column="price_set_name" />
|
||||
<result property="priceSetNote" column="price_set_note" />
|
||||
<result property="setType" column="set_type" />
|
||||
<result property="defaultDiscount" column="default_discount" />
|
||||
<result property="defaultType" column="default_type" />
|
||||
<result property="calculateSign" column="calculate_sign" />
|
||||
<result property="effectiveDate" column="effective_date" />
|
||||
<result property="expireDate" column="expire_date" />
|
||||
<result property="status" column="status" />
|
||||
<result property="tmsId" column="tms_id" />
|
||||
<result property="createBy" column="created_by" />
|
||||
<result property="createTime" column="created_at" />
|
||||
<result property="updateBy" column="updated_by" />
|
||||
<result property="updateTime" column="updated_at" />
|
||||
<result property="productCount" column="product_count" />
|
||||
<result property="customerCount" column="customer_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcPriceSetVo">
|
||||
select s.price_set_id, s.price_set_code, s.price_set_name, s.price_set_note,
|
||||
s.set_type, s.default_discount, s.default_type, s.calculate_sign,
|
||||
s.effective_date, s.expire_date, s.status, s.tms_id,
|
||||
s.created_by, s.created_at, s.updated_by, s.updated_at,
|
||||
(select count(distinct d.product_code) from prc_price_set_detail d where d.price_set_id = s.price_set_id) as product_count,
|
||||
(select count(1) from prc_customer_price_set c where c.price_set_id = s.price_set_id) as customer_count
|
||||
from prc_price_set s
|
||||
</sql>
|
||||
|
||||
<select id="selectPrcPriceSetById" parameterType="Long" resultMap="PrcPriceSetResult">
|
||||
<include refid="selectPrcPriceSetVo"/>
|
||||
where s.price_set_id = #{priceSetId}
|
||||
</select>
|
||||
|
||||
<select id="selectPrcPriceSetList" parameterType="PrcPriceSet" resultMap="PrcPriceSetResult">
|
||||
<include refid="selectPrcPriceSetVo"/>
|
||||
<where>
|
||||
<if test="setType != null and setType != ''">
|
||||
AND s.set_type = #{setType}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND s.status = #{status}
|
||||
</if>
|
||||
<if test="tmsId != null">
|
||||
AND s.tms_id = #{tmsId}
|
||||
</if>
|
||||
<if test="priceSetName != null and priceSetName != ''">
|
||||
AND s.price_set_name like concat('%', #{priceSetName}, '%')
|
||||
</if>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (
|
||||
s.price_set_code like concat('%', #{keyword}, '%')
|
||||
OR s.price_set_name like concat('%', #{keyword}, '%')
|
||||
OR exists (
|
||||
select 1 from prc_customer_price_set c
|
||||
where c.price_set_id = s.price_set_id
|
||||
and (
|
||||
c.customer_name like concat('%', #{keyword}, '%')
|
||||
or concat(c.customer_id, '') like concat('%', #{keyword}, '%')
|
||||
)
|
||||
)
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
order by s.price_set_id desc
|
||||
</select>
|
||||
|
||||
<select id="countByName" parameterType="PrcPriceSet" resultType="int">
|
||||
select count(1) from prc_price_set
|
||||
where price_set_name = #{priceSetName}
|
||||
<if test="priceSetId != null">
|
||||
AND price_set_id <> #{priceSetId}
|
||||
</if>
|
||||
<if test="tmsId != null">
|
||||
AND tms_id = #{tmsId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcPriceSet" parameterType="PrcPriceSet" useGeneratedKeys="true" keyProperty="priceSetId">
|
||||
insert into prc_price_set (
|
||||
<if test="priceSetCode != null and priceSetCode != ''">price_set_code,</if>
|
||||
<if test="priceSetName != null and priceSetName != ''">price_set_name,</if>
|
||||
<if test="priceSetNote != null">price_set_note,</if>
|
||||
<if test="setType != null and setType != ''">set_type,</if>
|
||||
<if test="defaultDiscount != null">default_discount,</if>
|
||||
<if test="defaultType != null">default_type,</if>
|
||||
<if test="calculateSign != null">calculate_sign,</if>
|
||||
<if test="effectiveDate != null">effective_date,</if>
|
||||
<if test="expireDate != null">expire_date,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="tmsId != null">tms_id,</if>
|
||||
<if test="createBy != null and createBy != ''">created_by,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="priceSetCode != null and priceSetCode != ''">#{priceSetCode},</if>
|
||||
<if test="priceSetName != null and priceSetName != ''">#{priceSetName},</if>
|
||||
<if test="priceSetNote != null">#{priceSetNote},</if>
|
||||
<if test="setType != null and setType != ''">#{setType},</if>
|
||||
<if test="defaultDiscount != null">#{defaultDiscount},</if>
|
||||
<if test="defaultType != null">#{defaultType},</if>
|
||||
<if test="calculateSign != null">#{calculateSign},</if>
|
||||
<if test="effectiveDate != null">#{effectiveDate},</if>
|
||||
<if test="expireDate != null">#{expireDate},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="tmsId != null">#{tmsId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcPriceSet" parameterType="PrcPriceSet">
|
||||
update prc_price_set
|
||||
<set>
|
||||
<if test="priceSetCode != null and priceSetCode != ''">price_set_code = #{priceSetCode},</if>
|
||||
<if test="priceSetName != null and priceSetName != ''">price_set_name = #{priceSetName},</if>
|
||||
<if test="priceSetNote != null">price_set_note = #{priceSetNote},</if>
|
||||
<if test="setType != null and setType != ''">set_type = #{setType},</if>
|
||||
default_discount = #{defaultDiscount},
|
||||
<if test="defaultType != null">default_type = #{defaultType},</if>
|
||||
<if test="calculateSign != null">calculate_sign = #{calculateSign},</if>
|
||||
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
|
||||
expire_date = #{expireDate},
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="tmsId != null">tms_id = #{tmsId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where price_set_id = #{priceSetId}
|
||||
</update>
|
||||
|
||||
<update id="updatePrcPriceSetStatus" parameterType="PrcPriceSet">
|
||||
update prc_price_set
|
||||
<set>
|
||||
status = #{status},
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where price_set_id = #{priceSetId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcPriceSetByIds" parameterType="Long">
|
||||
delete from prc_price_set where price_set_id in
|
||||
<foreach item="priceSetId" collection="array" open="(" separator="," close=")">
|
||||
#{priceSetId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
<?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.ruoyi.price.mapper.PrcWeightSectionDetailMapper">
|
||||
|
||||
<resultMap type="PrcWeightSectionDetail" id="PrcWeightSectionDetailResult">
|
||||
<id property="wsdId" column="wsd_id" />
|
||||
<result property="wstId" column="wst_id" />
|
||||
<result property="wlTitle" column="wl_title" />
|
||||
<result property="wlStartweight" column="wl_startweight" />
|
||||
<result property="wlEndweight" column="wl_endweight" />
|
||||
<result property="weightBillingCode" column="weight_billing_code" />
|
||||
<result property="fvUnitweight" column="fv_unitweight" />
|
||||
<result property="effectiveDate" column="effective_date" />
|
||||
<result property="expireDate" column="expire_date" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcWeightSectionDetailVo">
|
||||
select wsd_id, wst_id, wl_title, wl_startweight, wl_endweight, weight_billing_code,
|
||||
fv_unitweight, effective_date, expire_date, created_at, updated_at
|
||||
from prc_weight_section_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectPrcWeightSectionDetailById" parameterType="Long" resultMap="PrcWeightSectionDetailResult">
|
||||
<include refid="selectPrcWeightSectionDetailVo"/>
|
||||
where wsd_id = #{wsdId}
|
||||
</select>
|
||||
|
||||
<select id="selectPrcWeightSectionDetailListByWstId" parameterType="Long" resultMap="PrcWeightSectionDetailResult">
|
||||
<include refid="selectPrcWeightSectionDetailVo"/>
|
||||
where wst_id = #{wstId}
|
||||
order by wl_startweight asc, wsd_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectPrcWeightSectionDetailList" parameterType="PrcWeightSectionDetail" resultMap="PrcWeightSectionDetailResult">
|
||||
<include refid="selectPrcWeightSectionDetailVo"/>
|
||||
<where>
|
||||
<if test="wstId != null">
|
||||
AND wst_id = #{wstId}
|
||||
</if>
|
||||
<if test="wlTitle != null and wlTitle != ''">
|
||||
AND wl_title like concat('%', #{wlTitle}, '%')
|
||||
</if>
|
||||
<if test="weightBillingCode != null and weightBillingCode != ''">
|
||||
AND weight_billing_code = #{weightBillingCode}
|
||||
</if>
|
||||
</where>
|
||||
order by wl_startweight asc, wsd_id asc
|
||||
</select>
|
||||
|
||||
<select id="countByWstId" parameterType="Long" resultType="int">
|
||||
select count(1) from prc_weight_section_detail where wst_id = #{wstId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcWeightSectionDetail" parameterType="PrcWeightSectionDetail" useGeneratedKeys="true" keyProperty="wsdId">
|
||||
insert into prc_weight_section_detail (
|
||||
<if test="wstId != null">wst_id,</if>
|
||||
<if test="wlTitle != null">wl_title,</if>
|
||||
<if test="wlStartweight != null">wl_startweight,</if>
|
||||
<if test="wlEndweight != null">wl_endweight,</if>
|
||||
<if test="weightBillingCode != null">weight_billing_code,</if>
|
||||
<if test="fvUnitweight != null">fv_unitweight,</if>
|
||||
<if test="effectiveDate != null">effective_date,</if>
|
||||
<if test="expireDate != null">expire_date,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="wstId != null">#{wstId},</if>
|
||||
<if test="wlTitle != null">#{wlTitle},</if>
|
||||
<if test="wlStartweight != null">#{wlStartweight},</if>
|
||||
<if test="wlEndweight != null">#{wlEndweight},</if>
|
||||
<if test="weightBillingCode != null">#{weightBillingCode},</if>
|
||||
<if test="fvUnitweight != null">#{fvUnitweight},</if>
|
||||
<if test="effectiveDate != null">#{effectiveDate},</if>
|
||||
<if test="expireDate != null">#{expireDate},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcWeightSectionDetail" parameterType="PrcWeightSectionDetail">
|
||||
update prc_weight_section_detail
|
||||
<set>
|
||||
<if test="wstId != null">wst_id = #{wstId},</if>
|
||||
<if test="wlTitle != null">wl_title = #{wlTitle},</if>
|
||||
<if test="wlStartweight != null">wl_startweight = #{wlStartweight},</if>
|
||||
<if test="wlEndweight != null">wl_endweight = #{wlEndweight},</if>
|
||||
<if test="weightBillingCode != null">weight_billing_code = #{weightBillingCode},</if>
|
||||
<if test="fvUnitweight != null">fv_unitweight = #{fvUnitweight},</if>
|
||||
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
|
||||
<if test="expireDate != null">expire_date = #{expireDate},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where wsd_id = #{wsdId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcWeightSectionDetailByIds" parameterType="Long">
|
||||
delete from prc_weight_section_detail where wsd_id in
|
||||
<foreach item="wsdId" collection="array" open="(" separator="," close=")">
|
||||
#{wsdId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<?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.ruoyi.price.mapper.PrcWeightSectionTemplateMapper">
|
||||
|
||||
<resultMap type="PrcWeightSectionTemplate" id="PrcWeightSectionTemplateResult">
|
||||
<id property="wstId" column="wst_id" />
|
||||
<result property="wstName" column="wst_name" />
|
||||
<result property="ssCode" column="ss_code" />
|
||||
<result property="pgCode" column="pg_code" />
|
||||
<result property="snId" column="sn_id" />
|
||||
<result property="ctCode" column="ct_code" />
|
||||
<result property="pmCode" column="pm_code" />
|
||||
<result property="wstNote" column="wst_note" />
|
||||
<result property="tmsId" column="tms_id" />
|
||||
<result property="createBy" column="created_by" />
|
||||
<result property="createTime" column="created_at" />
|
||||
<result property="updateBy" column="updated_by" />
|
||||
<result property="updateTime" column="updated_at" />
|
||||
<result property="detailCount" column="detail_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPrcWeightSectionTemplateVo">
|
||||
select wst_id, wst_name, ss_code, pg_code, sn_id, ct_code, pm_code, wst_note, tms_id,
|
||||
created_by, created_at, updated_by, updated_at
|
||||
from prc_weight_section_template
|
||||
</sql>
|
||||
|
||||
<select id="selectPrcWeightSectionTemplateById" parameterType="Long" resultMap="PrcWeightSectionTemplateResult">
|
||||
<include refid="selectPrcWeightSectionTemplateVo"/>
|
||||
where wst_id = #{wstId}
|
||||
</select>
|
||||
|
||||
<select id="selectPrcWeightSectionTemplateList" parameterType="PrcWeightSectionTemplate" resultMap="PrcWeightSectionTemplateResult">
|
||||
<include refid="selectPrcWeightSectionTemplateVo"/>
|
||||
<where>
|
||||
<if test="wstName != null and wstName != ''">
|
||||
AND wst_name like concat('%', #{wstName}, '%')
|
||||
</if>
|
||||
<if test="ssCode != null and ssCode != ''">
|
||||
AND ss_code = #{ssCode}
|
||||
</if>
|
||||
<if test="pgCode != null and pgCode != ''">
|
||||
AND pg_code = #{pgCode}
|
||||
</if>
|
||||
<if test="snId != null">
|
||||
AND sn_id = #{snId}
|
||||
</if>
|
||||
<if test="ctCode != null and ctCode != ''">
|
||||
AND ct_code = #{ctCode}
|
||||
</if>
|
||||
<if test="pmCode != null and pmCode != ''">
|
||||
AND pm_code = #{pmCode}
|
||||
</if>
|
||||
<if test="tmsId != null">
|
||||
AND tms_id = #{tmsId}
|
||||
</if>
|
||||
</where>
|
||||
order by wst_id desc
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcWeightSectionTemplate" parameterType="PrcWeightSectionTemplate" useGeneratedKeys="true" keyProperty="wstId">
|
||||
insert into prc_weight_section_template (
|
||||
<if test="wstName != null and wstName != ''">wst_name,</if>
|
||||
<if test="ssCode != null and ssCode != ''">ss_code,</if>
|
||||
<if test="pgCode != null">pg_code,</if>
|
||||
<if test="snId != null">sn_id,</if>
|
||||
<if test="ctCode != null">ct_code,</if>
|
||||
<if test="pmCode != null">pm_code,</if>
|
||||
<if test="wstNote != null">wst_note,</if>
|
||||
<if test="tmsId != null">tms_id,</if>
|
||||
<if test="createBy != null and createBy != ''">created_by,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="wstName != null and wstName != ''">#{wstName},</if>
|
||||
<if test="ssCode != null and ssCode != ''">#{ssCode},</if>
|
||||
<if test="pgCode != null">#{pgCode},</if>
|
||||
<if test="snId != null">#{snId},</if>
|
||||
<if test="ctCode != null">#{ctCode},</if>
|
||||
<if test="pmCode != null">#{pmCode},</if>
|
||||
<if test="wstNote != null">#{wstNote},</if>
|
||||
<if test="tmsId != null">#{tmsId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcWeightSectionTemplate" parameterType="PrcWeightSectionTemplate">
|
||||
update prc_weight_section_template
|
||||
<set>
|
||||
<if test="wstName != null and wstName != ''">wst_name = #{wstName},</if>
|
||||
<if test="ssCode != null and ssCode != ''">ss_code = #{ssCode},</if>
|
||||
<if test="pgCode != null">pg_code = #{pgCode},</if>
|
||||
<if test="snId != null">sn_id = #{snId},</if>
|
||||
<if test="ctCode != null">ct_code = #{ctCode},</if>
|
||||
<if test="pmCode != null">pm_code = #{pmCode},</if>
|
||||
<if test="wstNote != null">wst_note = #{wstNote},</if>
|
||||
<if test="tmsId != null">tms_id = #{tmsId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where wst_id = #{wstId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcWeightSectionTemplateByIds" parameterType="Long">
|
||||
delete from prc_weight_section_template where wst_id in
|
||||
<foreach item="wstId" collection="array" open="(" separator="," close=")">
|
||||
#{wstId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.ruoyi.price.mapper.XtdZoneCountryMapper">
|
||||
|
||||
<resultMap type="XtdZoneCountry" id="XtdZoneCountryResult">
|
||||
<id property="zcId" column="zc_id" />
|
||||
<result property="zdId" column="zd_id" />
|
||||
<result property="countryCode" column="country_code" />
|
||||
<result property="zcDividekind" column="zc_dividekind" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXtdZoneCountryVo">
|
||||
select zc_id, zd_id, country_code, zc_dividekind, created_at, updated_at
|
||||
from xtd_zonecountry
|
||||
</sql>
|
||||
|
||||
<select id="selectXtdZoneCountryById" parameterType="Long" resultMap="XtdZoneCountryResult">
|
||||
<include refid="selectXtdZoneCountryVo"/>
|
||||
where zc_id = #{zcId}
|
||||
</select>
|
||||
|
||||
<select id="selectXtdZoneCountryListByZdId" parameterType="Long" resultMap="XtdZoneCountryResult">
|
||||
<include refid="selectXtdZoneCountryVo"/>
|
||||
where zd_id = #{zdId}
|
||||
order by zc_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectXtdZoneCountryList" parameterType="XtdZoneCountry" resultMap="XtdZoneCountryResult">
|
||||
<include refid="selectXtdZoneCountryVo"/>
|
||||
<where>
|
||||
<if test="zdId != null">
|
||||
AND zd_id = #{zdId}
|
||||
</if>
|
||||
<if test="countryCode != null and countryCode != ''">
|
||||
AND country_code = #{countryCode}
|
||||
</if>
|
||||
<if test="zcDividekind != null and zcDividekind != ''">
|
||||
AND zc_dividekind = #{zcDividekind}
|
||||
</if>
|
||||
</where>
|
||||
order by zc_id asc
|
||||
</select>
|
||||
|
||||
<select id="countByZdId" parameterType="Long" resultType="int">
|
||||
select count(1) from xtd_zonecountry where zd_id = #{zdId}
|
||||
</select>
|
||||
|
||||
<insert id="insertXtdZoneCountry" parameterType="XtdZoneCountry" useGeneratedKeys="true" keyProperty="zcId">
|
||||
insert into xtd_zonecountry (
|
||||
<if test="zdId != null">zd_id,</if>
|
||||
<if test="countryCode != null and countryCode != ''">country_code,</if>
|
||||
<if test="zcDividekind != null and zcDividekind != ''">zc_dividekind,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="zdId != null">#{zdId},</if>
|
||||
<if test="countryCode != null and countryCode != ''">#{countryCode},</if>
|
||||
<if test="zcDividekind != null and zcDividekind != ''">#{zcDividekind},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateXtdZoneCountry" parameterType="XtdZoneCountry">
|
||||
update xtd_zonecountry
|
||||
<set>
|
||||
<if test="zdId != null">zd_id = #{zdId},</if>
|
||||
<if test="countryCode != null and countryCode != ''">country_code = #{countryCode},</if>
|
||||
<if test="zcDividekind != null and zcDividekind != ''">zc_dividekind = #{zcDividekind},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where zc_id = #{zcId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteXtdZoneCountryByIds" parameterType="Long">
|
||||
delete from xtd_zonecountry where zc_id in
|
||||
<foreach item="zcId" collection="array" open="(" separator="," close=")">
|
||||
#{zcId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?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.ruoyi.price.mapper.XtdZoneDivisionMapper">
|
||||
|
||||
<resultMap type="XtdZoneDivision" id="XtdZoneDivisionResult">
|
||||
<id property="zdId" column="zd_id" />
|
||||
<result property="zsId" column="zs_id" />
|
||||
<result property="zdSort" column="zd_sort" />
|
||||
<result property="zdCode" column="zd_code" />
|
||||
<result property="znName" column="zn_name" />
|
||||
<result property="znEname" column="zn_ename" />
|
||||
<result property="znNote" column="zn_note" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="countryCount" column="country_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXtdZoneDivisionVo">
|
||||
select zd_id, zs_id, zd_sort, zd_code, zn_name, zn_ename, zn_note, created_at, updated_at
|
||||
from xtd_zone_division
|
||||
</sql>
|
||||
|
||||
<select id="selectXtdZoneDivisionById" parameterType="Long" resultMap="XtdZoneDivisionResult">
|
||||
<include refid="selectXtdZoneDivisionVo"/>
|
||||
where zd_id = #{zdId}
|
||||
</select>
|
||||
|
||||
<select id="selectXtdZoneDivisionListByZsId" parameterType="Long" resultMap="XtdZoneDivisionResult">
|
||||
<include refid="selectXtdZoneDivisionVo"/>
|
||||
where zs_id = #{zsId}
|
||||
order by zd_sort asc, zd_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectXtdZoneDivisionList" parameterType="XtdZoneDivision" resultMap="XtdZoneDivisionResult">
|
||||
<include refid="selectXtdZoneDivisionVo"/>
|
||||
<where>
|
||||
<if test="zsId != null">
|
||||
AND zs_id = #{zsId}
|
||||
</if>
|
||||
<if test="zdCode != null and zdCode != ''">
|
||||
AND zd_code like concat('%', #{zdCode}, '%')
|
||||
</if>
|
||||
<if test="znName != null and znName != ''">
|
||||
AND zn_name like concat('%', #{znName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
order by zd_sort asc, zd_id asc
|
||||
</select>
|
||||
|
||||
<select id="countByZsId" parameterType="Long" resultType="int">
|
||||
select count(1) from xtd_zone_division where zs_id = #{zsId}
|
||||
</select>
|
||||
|
||||
<insert id="insertXtdZoneDivision" parameterType="XtdZoneDivision" useGeneratedKeys="true" keyProperty="zdId">
|
||||
insert into xtd_zone_division (
|
||||
<if test="zsId != null">zs_id,</if>
|
||||
<if test="zdSort != null">zd_sort,</if>
|
||||
<if test="zdCode != null">zd_code,</if>
|
||||
<if test="znName != null">zn_name,</if>
|
||||
<if test="znEname != null">zn_ename,</if>
|
||||
<if test="znNote != null">zn_note,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="zsId != null">#{zsId},</if>
|
||||
<if test="zdSort != null">#{zdSort},</if>
|
||||
<if test="zdCode != null">#{zdCode},</if>
|
||||
<if test="znName != null">#{znName},</if>
|
||||
<if test="znEname != null">#{znEname},</if>
|
||||
<if test="znNote != null">#{znNote},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateXtdZoneDivision" parameterType="XtdZoneDivision">
|
||||
update xtd_zone_division
|
||||
<set>
|
||||
<if test="zsId != null">zs_id = #{zsId},</if>
|
||||
<if test="zdSort != null">zd_sort = #{zdSort},</if>
|
||||
<if test="zdCode != null">zd_code = #{zdCode},</if>
|
||||
<if test="znName != null">zn_name = #{znName},</if>
|
||||
<if test="znEname != null">zn_ename = #{znEname},</if>
|
||||
<if test="znNote != null">zn_note = #{znNote},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where zd_id = #{zdId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteXtdZoneDivisionByIds" parameterType="Long">
|
||||
delete from xtd_zone_division where zd_id in
|
||||
<foreach item="zdId" collection="array" open="(" separator="," close=")">
|
||||
#{zdId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?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.ruoyi.price.mapper.XtdZoneSchemeMapper">
|
||||
|
||||
<resultMap type="XtdZoneScheme" id="XtdZoneSchemeResult">
|
||||
<id property="zsId" column="zs_id" />
|
||||
<result property="zsName" column="zs_name" />
|
||||
<result property="ssCode" column="ss_code" />
|
||||
<result property="pgCode" column="pg_code" />
|
||||
<result property="snId" column="sn_id" />
|
||||
<result property="zsNote" column="zs_note" />
|
||||
<result property="tmsId" column="tms_id" />
|
||||
<result property="createBy" column="created_by" />
|
||||
<result property="createTime" column="created_at" />
|
||||
<result property="updateBy" column="updated_by" />
|
||||
<result property="updateTime" column="updated_at" />
|
||||
<result property="divisionCount" column="division_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectXtdZoneSchemeVo">
|
||||
select zs_id, zs_name, ss_code, pg_code, sn_id, zs_note, tms_id,
|
||||
created_by, created_at, updated_by, updated_at
|
||||
from xtd_zone_scheme
|
||||
</sql>
|
||||
|
||||
<select id="selectXtdZoneSchemeById" parameterType="Long" resultMap="XtdZoneSchemeResult">
|
||||
<include refid="selectXtdZoneSchemeVo"/>
|
||||
where zs_id = #{zsId}
|
||||
</select>
|
||||
|
||||
<select id="selectXtdZoneSchemeList" parameterType="XtdZoneScheme" resultMap="XtdZoneSchemeResult">
|
||||
<include refid="selectXtdZoneSchemeVo"/>
|
||||
<where>
|
||||
<if test="zsName != null and zsName != ''">
|
||||
AND zs_name like concat('%', #{zsName}, '%')
|
||||
</if>
|
||||
<if test="ssCode != null and ssCode != ''">
|
||||
AND ss_code = #{ssCode}
|
||||
</if>
|
||||
<if test="pgCode != null and pgCode != ''">
|
||||
AND pg_code = #{pgCode}
|
||||
</if>
|
||||
<if test="snId != null">
|
||||
AND sn_id = #{snId}
|
||||
</if>
|
||||
<if test="tmsId != null">
|
||||
AND tms_id = #{tmsId}
|
||||
</if>
|
||||
</where>
|
||||
order by zs_id desc
|
||||
</select>
|
||||
|
||||
<insert id="insertXtdZoneScheme" parameterType="XtdZoneScheme" useGeneratedKeys="true" keyProperty="zsId">
|
||||
insert into xtd_zone_scheme (
|
||||
<if test="zsName != null and zsName != ''">zs_name,</if>
|
||||
<if test="ssCode != null and ssCode != ''">ss_code,</if>
|
||||
<if test="pgCode != null">pg_code,</if>
|
||||
<if test="snId != null">sn_id,</if>
|
||||
<if test="zsNote != null">zs_note,</if>
|
||||
<if test="tmsId != null">tms_id,</if>
|
||||
<if test="createBy != null and createBy != ''">created_by,</if>
|
||||
created_at
|
||||
) values (
|
||||
<if test="zsName != null and zsName != ''">#{zsName},</if>
|
||||
<if test="ssCode != null and ssCode != ''">#{ssCode},</if>
|
||||
<if test="pgCode != null">#{pgCode},</if>
|
||||
<if test="snId != null">#{snId},</if>
|
||||
<if test="zsNote != null">#{zsNote},</if>
|
||||
<if test="tmsId != null">#{tmsId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateXtdZoneScheme" parameterType="XtdZoneScheme">
|
||||
update xtd_zone_scheme
|
||||
<set>
|
||||
<if test="zsName != null and zsName != ''">zs_name = #{zsName},</if>
|
||||
<if test="ssCode != null and ssCode != ''">ss_code = #{ssCode},</if>
|
||||
<if test="pgCode != null">pg_code = #{pgCode},</if>
|
||||
<if test="snId != null">sn_id = #{snId},</if>
|
||||
<if test="zsNote != null">zs_note = #{zsNote},</if>
|
||||
<if test="tmsId != null">tms_id = #{tmsId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
updated_at = sysdate()
|
||||
</set>
|
||||
where zs_id = #{zsId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteXtdZoneSchemeByIds" parameterType="Long">
|
||||
delete from xtd_zone_scheme where zs_id in
|
||||
<foreach item="zsId" collection="array" open="(" separator="," close=")">
|
||||
#{zsId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user