增加订单失败状态
This commit is contained in:
@@ -317,6 +317,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByProduct" resultType="int">
|
||||
select count(1)
|
||||
from product_country
|
||||
where product_code = #{productCode}
|
||||
and ifnull(is_del, '0') = '0'
|
||||
<if test="bizDate != null">
|
||||
and (effective_date is null or effective_date <= #{bizDate})
|
||||
and (expire_date is null or expire_date > #{bizDate})
|
||||
</if>
|
||||
<if test="bizDate == null">
|
||||
and expire_date is null
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByProductCountryZone" resultType="int">
|
||||
select count(1)
|
||||
from product_country
|
||||
where product_code = #{productCode}
|
||||
and ifnull(is_del, '0') = '0'
|
||||
<choose>
|
||||
<when test="countryCode != null and countryCode != ''">
|
||||
and upper(country_code) = upper(#{countryCode})
|
||||
</when>
|
||||
<when test="countryName != null and countryName != ''">
|
||||
and country_name = #{countryName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="zoneCode != null and zoneCode != ''">
|
||||
and upper(ifnull(zone_code,'')) = upper(#{zoneCode})
|
||||
</when>
|
||||
<otherwise>
|
||||
and (zone_code is null or zone_code = '')
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="bizDate != null">
|
||||
and (effective_date is null or effective_date <= #{bizDate})
|
||||
and (expire_date is null or expire_date > #{bizDate})
|
||||
</if>
|
||||
<if test="bizDate == null">
|
||||
and expire_date is null
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectOpenByProductCode" resultMap="BmsProductCountryResult">
|
||||
<include refid="selectVo"/>
|
||||
where c.product_code = #{productCode}
|
||||
|
||||
@@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="customerActiveStatus" column="customer_active_status" />
|
||||
<result property="creditArrearsStatus" column="credit_arrears_status" />
|
||||
<result property="refundStatus" column="refund_status" />
|
||||
<result property="billingFailStatus" column="billing_fail_status" />
|
||||
<result property="roundMode" column="round_mode" />
|
||||
<result property="createBy" column="created_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
weight_min, weight_max, weight_label, effective_date, charge_weight,
|
||||
freight_rate, base_freight_rate, discount_percent, registration_fee,
|
||||
freight_amount, surcharge_amount, income_total, pay_total, currency, ar_bill_status,
|
||||
customer_active_status, credit_arrears_status, refund_status, round_mode,
|
||||
customer_active_status, credit_arrears_status, refund_status, billing_fail_status, round_mode,
|
||||
created_by, create_time, updated_by, update_time
|
||||
from prc_order_bill p
|
||||
</sql>
|
||||
@@ -530,7 +531,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
weight_min, weight_max, weight_label, effective_date, charge_weight,
|
||||
freight_rate, base_freight_rate, discount_percent, registration_fee,
|
||||
freight_amount, surcharge_amount, income_total, pay_total, currency, ar_bill_status,
|
||||
customer_active_status, credit_arrears_status, refund_status, round_mode,
|
||||
customer_active_status, credit_arrears_status, refund_status, billing_fail_status, round_mode,
|
||||
create_time
|
||||
) values (
|
||||
#{billId}, #{billKey}, #{orderNo}, #{trackingNo}, #{transferNo},
|
||||
@@ -544,7 +545,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{weightMin}, #{weightMax}, #{weightLabel}, #{effectiveDate}, #{chargeWeight},
|
||||
#{freightRate}, #{baseFreightRate}, #{discountPercent}, #{registrationFee},
|
||||
#{freightAmount}, #{surchargeAmount}, #{incomeTotal}, #{payTotal}, #{currency}, #{arBillStatus},
|
||||
#{customerActiveStatus}, #{creditArrearsStatus}, #{refundStatus}, #{roundMode},
|
||||
#{customerActiveStatus}, #{creditArrearsStatus}, #{refundStatus}, #{billingFailStatus}, #{roundMode},
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
@@ -614,6 +615,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
customer_active_status = #{customerActiveStatus},
|
||||
credit_arrears_status = #{creditArrearsStatus},
|
||||
refund_status = #{refundStatus},
|
||||
billing_fail_status = #{billingFailStatus},
|
||||
round_mode = #{roundMode},
|
||||
update_time = sysdate()
|
||||
where bill_id = #{billId}
|
||||
|
||||
@@ -462,6 +462,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="countByPsvProduct" resultType="int">
|
||||
select count(1)
|
||||
from prc_price_set_detail
|
||||
where psv_id = #{psvId}
|
||||
and product_code = #{productCode}
|
||||
</select>
|
||||
|
||||
<select id="countByPsvProductCountryZone" resultType="int">
|
||||
select count(1)
|
||||
from prc_price_set_detail
|
||||
where psv_id = #{psvId}
|
||||
and product_code = #{productCode}
|
||||
<choose>
|
||||
<when test="countryCode != null and countryCode != ''">
|
||||
and upper(ifnull(country_code,'')) = upper(#{countryCode})
|
||||
</when>
|
||||
<when test="countryName != null and countryName != ''">
|
||||
and country_name = #{countryName}
|
||||
</when>
|
||||
<otherwise>
|
||||
and 1 = 0
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="zoneCode != null and zoneCode != ''">
|
||||
and upper(ifnull(zone_code,'')) = upper(#{zoneCode})
|
||||
</when>
|
||||
<otherwise>
|
||||
and (zone_code is null or zone_code = '')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="selectDiscountMatch" resultMap="PrcPriceSetDetailResult">
|
||||
<include refid="selectPrcPriceSetDetailVo"/>
|
||||
where price_set_id = #{priceSetId}
|
||||
|
||||
Reference in New Issue
Block a user