...
|
...
|
@@ -3,15 +3,10 @@ |
|
|
<mapper namespace="com.yoho.search.dal.ProductPriceMapper">
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ProductPrice">
|
|
|
<id column="product_id" property="productId" jdbcType="INTEGER" />
|
|
|
<result column="market_price" property="marketPrice" jdbcType="DECIMAL" />
|
|
|
<id column="product_skn" property="productSkn" jdbcType="INTEGER" />
|
|
|
<result column="retail_price" property="retailPrice" jdbcType="DECIMAL" />
|
|
|
<result column="sales_price" property="salesPrice" jdbcType="DECIMAL" />
|
|
|
<result column="purchase_price" property="purchasePrice" jdbcType="DECIMAL" />
|
|
|
<result column="special_price" property="specialPrice" jdbcType="DECIMAL" />
|
|
|
<result column="yoho_coin_num" property="yohoCoinNum" jdbcType="INTEGER" />
|
|
|
<result column="purchase_num" property="purchaseNum" jdbcType="DECIMAL" />
|
|
|
<result column="purchase_cost" property="purchaseCost" jdbcType="DECIMAL" />
|
|
|
<result column="tariff" property="tariff" jdbcType="DECIMAL" />
|
|
|
<result column="vip_discount_type" property="vipDiscountType" jdbcType="INTEGER" />
|
|
|
<result column="vip_discount" property="vipDiscount" jdbcType="DECIMAL" />
|
|
|
<result column="vip_price" property="vipPrice" jdbcType="DECIMAL" />
|
...
|
...
|
@@ -19,7 +14,6 @@ |
|
|
<result column="vip2_price" property="vip2Price" jdbcType="DECIMAL" />
|
|
|
<result column="vip3_price" property="vip3Price" jdbcType="DECIMAL" />
|
|
|
<result column="student_price" property="studentPrice" jdbcType="DECIMAL" />
|
|
|
<result column="product_skn" property="productSkn" jdbcType="INTEGER" />
|
|
|
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
|
|
|
<result column="student_coin_rate" property="studentCoinRate" jdbcType="DECIMAL" />
|
|
|
<result column="lastReducePriceTime" property="lastReducePriceTime" jdbcType="INTEGER" />
|
...
|
...
|
@@ -28,9 +22,8 @@ |
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
product_id, market_price, sales_price, purchase_price,
|
|
|
special_price, yoho_coin_num,purchase_num, purchase_cost,
|
|
|
tariff, vip_discount_type, vip_discount, vip_price,
|
|
|
product_id, retail_price, sales_price, purchase_price,
|
|
|
vip_discount_type, vip_discount, vip_price,
|
|
|
vip1_price, vip2_price,
|
|
|
vip3_price,student_price,
|
|
|
product_skn,
|
...
|
...
|
@@ -43,32 +36,27 @@ |
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_price
|
|
|
where product_id = #{productId,jdbcType=INTEGER}
|
|
|
where product_skn = #{productSkn,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"
|
|
|
timeout="20000">
|
|
|
delete from product_price
|
|
|
where product_id =
|
|
|
#{productId,jdbcType=INTEGER}
|
|
|
where product_skn =
|
|
|
#{productSkn,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
|
|
|
<insert id="insert" parameterType="com.yoho.search.dal.model.ProductPrice"
|
|
|
timeout="20000">
|
|
|
insert ignore into product_price (
|
|
|
product_id, market_price, sales_price,purchase_price,
|
|
|
special_price, yoho_coin_num,purchase_num, purchase_cost,
|
|
|
tariff, vip_discount_type, vip_discount, vip_price,
|
|
|
retail_price, sales_price,purchase_price,
|
|
|
, vip_discount_type, vip_discount, vip_price,
|
|
|
vip1_price, vip2_price, vip3_price,student_price,
|
|
|
product_skn, update_time, student_coin_rate,lastReducePriceTime,
|
|
|
product_vip_status,basic_price
|
|
|
)values (
|
|
|
#{productId,jdbcType=INTEGER},
|
|
|
#{marketPrice,jdbcType=DECIMAL},#{salesPrice,jdbcType=DECIMAL},#{purchasePrice,jdbcType=DECIMAL},
|
|
|
#{specialPrice,jdbcType=DECIMAL},
|
|
|
#{yohoCoinNum,jdbcType=INTEGER},#{purchaseNum,jdbcType=DECIMAL},
|
|
|
#{purchaseCost,jdbcType=DECIMAL},
|
|
|
#{tariff,jdbcType=DECIMAL},#{vipDiscountType,jdbcType=INTEGER},
|
|
|
#{retailPrice,jdbcType=DECIMAL},#{salesPrice,jdbcType=DECIMAL},#{purchasePrice,jdbcType=DECIMAL},
|
|
|
#{vipDiscountType,jdbcType=INTEGER},
|
|
|
#{vipDiscount,jdbcType=DECIMAL}, #{vipPrice,jdbcType=DECIMAL},
|
|
|
#{vip1Price,jdbcType=DECIMAL},
|
|
|
#{vip2Price,jdbcType=DECIMAL},#{vip3Price,jdbcType=DECIMAL},#{studentPrice,jdbcType=DECIMAL},
|
...
|
...
|
@@ -82,8 +70,8 @@ |
|
|
timeout="20000">
|
|
|
update product_price
|
|
|
<set>
|
|
|
<if test="marketPrice != null">
|
|
|
market_price = #{marketPrice,jdbcType=DECIMAL},
|
|
|
<if test="retailPrice != null">
|
|
|
retail_price = #{retailPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="salesPrice != null">
|
|
|
sales_price = #{salesPrice,jdbcType=DECIMAL},
|
...
|
...
|
@@ -91,21 +79,6 @@ |
|
|
<if test="purchasePrice != null">
|
|
|
purchase_price = #{purchasePrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="specialPrice != null">
|
|
|
special_price = #{specialPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="yohoCoinNum != null">
|
|
|
yoho_coin_num = #{yohoCoinNum,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="purchaseNum != null">
|
|
|
purchase_num = #{purchaseNum,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="purchaseCost != null">
|
|
|
purchase_cost = #{purchaseCost,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="tariff != null">
|
|
|
tariff = #{tariff,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="vipDiscountType != null">
|
|
|
vip_discount_type = #{vipDiscountType,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -123,11 +96,10 @@ |
|
|
</if>
|
|
|
<if test="vip3Price != null">
|
|
|
vip3_price = #{vip3Price,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
student_price = #{studentPrice,jdbcType=DECIMAL},
|
|
|
<if test="productSkn != null">
|
|
|
product_skn = #{productSkn,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="studentPrice != null">
|
|
|
student_price = #{studentPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
...
|
...
|
@@ -144,7 +116,7 @@ |
|
|
basic_price = #{basicPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
</set>
|
|
|
where product_id = #{productId,jdbcType=INTEGER}
|
|
|
where product_skn = #{productSkn,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectCount" resultType="java.lang.Integer" timeout="20000">
|
...
|
...
|
@@ -157,16 +129,6 @@ |
|
|
from product_price limit #{offset},#{pageSize}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByIds" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from product_price where product_id in
|
|
|
<foreach item="item" index="index" collection="list" open="("
|
|
|
separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBySkns" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
...
|
...
|
|