下单接口完成

This commit is contained in:
zhh
2018-09-03 17:12:08 +08:00
parent c9831e0288
commit 2dd5d93919
18 changed files with 2548 additions and 712 deletions

View File

@@ -20,6 +20,8 @@
<result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
<result column="product_brand" jdbcType="VARCHAR" property="productBrand" />
<result column="product_sn" jdbcType="VARCHAR" property="productSn" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -82,7 +84,7 @@
<sql id="Base_Column_List">
id, product_id, product_sku_id, member_id, quantity, price, sp1, sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code, member_nickname, create_date,
modify_date, delete_status, product_category_id
modify_date, delete_status, product_category_id, product_brand, product_sn
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultMap="BaseResultMap">
select
@@ -123,13 +125,15 @@
sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code,
member_nickname, create_date, modify_date,
delete_status, product_category_id)
delete_status, product_category_id, product_brand,
product_sn)
values (#{productId,jdbcType=BIGINT}, #{productSkuId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
#{quantity,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{productPic,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{productSubTitle,jdbcType=VARCHAR}, #{productSkuCode,jdbcType=VARCHAR},
#{memberNickname,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP},
#{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT})
#{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsCartItem">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -188,6 +192,12 @@
<if test="productCategoryId != null">
product_category_id,
</if>
<if test="productBrand != null">
product_brand,
</if>
<if test="productSn != null">
product_sn,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">
@@ -241,6 +251,12 @@
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>
<if test="productBrand != null">
#{productBrand,jdbcType=VARCHAR},
</if>
<if test="productSn != null">
#{productSn,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.OmsCartItemExample" resultType="java.lang.Integer">
@@ -306,6 +322,12 @@
<if test="record.productCategoryId != null">
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
</if>
<if test="record.productBrand != null">
product_brand = #{record.productBrand,jdbcType=VARCHAR},
</if>
<if test="record.productSn != null">
product_sn = #{record.productSn,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -330,7 +352,9 @@
create_date = #{record.createDate,jdbcType=TIMESTAMP},
modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
product_category_id = #{record.productCategoryId,jdbcType=BIGINT}
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
product_brand = #{record.productBrand,jdbcType=VARCHAR},
product_sn = #{record.productSn,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -389,6 +413,12 @@
<if test="productCategoryId != null">
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if test="productBrand != null">
product_brand = #{productBrand,jdbcType=VARCHAR},
</if>
<if test="productSn != null">
product_sn = #{productSn,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -410,7 +440,9 @@
create_date = #{createDate,jdbcType=TIMESTAMP},
modify_date = #{modifyDate,jdbcType=TIMESTAMP},
delete_status = #{deleteStatus,jdbcType=INTEGER},
product_category_id = #{productCategoryId,jdbcType=BIGINT}
product_category_id = #{productCategoryId,jdbcType=BIGINT},
product_brand = #{productBrand,jdbcType=VARCHAR},
product_sn = #{productSn,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -6,16 +6,25 @@
<result column="order_id" jdbcType="BIGINT" property="orderId" />
<result column="order_sn" jdbcType="VARCHAR" property="orderSn" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
<result column="proudct_pic" jdbcType="VARCHAR" property="proudctPic" />
<result column="product_pic" jdbcType="VARCHAR" property="productPic" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="product_brand" jdbcType="VARCHAR" property="productBrand" />
<result column="product_sn" jdbcType="VARCHAR" property="productSn" />
<result column="product_amount" jdbcType="DECIMAL" property="productAmount" />
<result column="product_count" jdbcType="INTEGER" property="productCount" />
<result column="product_real_amount" jdbcType="DECIMAL" property="productRealAmount" />
<result column="product_price" jdbcType="DECIMAL" property="productPrice" />
<result column="product_quantity" jdbcType="INTEGER" property="productQuantity" />
<result column="product_sku_id" jdbcType="BIGINT" property="productSkuId" />
<result column="product_sku_code" jdbcType="VARCHAR" property="productSkuCode" />
<result column="product_category_id" jdbcType="BIGINT" property="productCategoryId" />
<result column="sp1" jdbcType="VARCHAR" property="sp1" />
<result column="sp2" jdbcType="VARCHAR" property="sp2" />
<result column="sp3" jdbcType="VARCHAR" property="sp3" />
<result column="promotion_name" jdbcType="VARCHAR" property="promotionName" />
<result column="promotion_amount" jdbcType="DECIMAL" property="promotionAmount" />
<result column="coupon_amount" jdbcType="DECIMAL" property="couponAmount" />
<result column="integration_amount" jdbcType="DECIMAL" property="integrationAmount" />
<result column="real_amount" jdbcType="DECIMAL" property="realAmount" />
<result column="gift_integration" jdbcType="INTEGER" property="giftIntegration" />
<result column="gift_growth" jdbcType="INTEGER" property="giftGrowth" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -76,8 +85,10 @@
</where>
</sql>
<sql id="Base_Column_List">
id, order_id, order_sn, product_id, proudct_pic, product_name, product_brand, product_sn,
product_amount, product_count, product_real_amount, sp1, sp2, sp3
id, order_id, order_sn, product_id, product_pic, product_name, product_brand, product_sn,
product_price, product_quantity, product_sku_id, product_sku_code, product_category_id,
sp1, sp2, sp3, promotion_name, promotion_amount, coupon_amount, integration_amount,
real_amount, gift_integration, gift_growth
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.OmsOrderItemExample" resultMap="BaseResultMap">
select
@@ -114,15 +125,21 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_order_item (order_id, order_sn, product_id,
proudct_pic, product_name, product_brand,
product_sn, product_amount, product_count,
product_real_amount, sp1, sp2,
sp3)
product_pic, product_name, product_brand,
product_sn, product_price, product_quantity,
product_sku_id, product_sku_code, product_category_id,
sp1, sp2, sp3, promotion_name,
promotion_amount, coupon_amount, integration_amount,
real_amount, gift_integration, gift_growth
)
values (#{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, #{productId,jdbcType=BIGINT},
#{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER},
#{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR},
#{sp3,jdbcType=VARCHAR})
#{productPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{productPrice,jdbcType=DECIMAL}, #{productQuantity,jdbcType=INTEGER},
#{productSkuId,jdbcType=BIGINT}, #{productSkuCode,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT},
#{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{promotionName,jdbcType=VARCHAR},
#{promotionAmount,jdbcType=DECIMAL}, #{couponAmount,jdbcType=DECIMAL}, #{integrationAmount,jdbcType=DECIMAL},
#{realAmount,jdbcType=DECIMAL}, #{giftIntegration,jdbcType=INTEGER}, #{giftGrowth,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderItem">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -139,8 +156,8 @@
<if test="productId != null">
product_id,
</if>
<if test="proudctPic != null">
proudct_pic,
<if test="productPic != null">
product_pic,
</if>
<if test="productName != null">
product_name,
@@ -151,14 +168,20 @@
<if test="productSn != null">
product_sn,
</if>
<if test="productAmount != null">
product_amount,
<if test="productPrice != null">
product_price,
</if>
<if test="productCount != null">
product_count,
<if test="productQuantity != null">
product_quantity,
</if>
<if test="productRealAmount != null">
product_real_amount,
<if test="productSkuId != null">
product_sku_id,
</if>
<if test="productSkuCode != null">
product_sku_code,
</if>
<if test="productCategoryId != null">
product_category_id,
</if>
<if test="sp1 != null">
sp1,
@@ -169,6 +192,27 @@
<if test="sp3 != null">
sp3,
</if>
<if test="promotionName != null">
promotion_name,
</if>
<if test="promotionAmount != null">
promotion_amount,
</if>
<if test="couponAmount != null">
coupon_amount,
</if>
<if test="integrationAmount != null">
integration_amount,
</if>
<if test="realAmount != null">
real_amount,
</if>
<if test="giftIntegration != null">
gift_integration,
</if>
<if test="giftGrowth != null">
gift_growth,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
@@ -180,8 +224,8 @@
<if test="productId != null">
#{productId,jdbcType=BIGINT},
</if>
<if test="proudctPic != null">
#{proudctPic,jdbcType=VARCHAR},
<if test="productPic != null">
#{productPic,jdbcType=VARCHAR},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
@@ -192,14 +236,20 @@
<if test="productSn != null">
#{productSn,jdbcType=VARCHAR},
</if>
<if test="productAmount != null">
#{productAmount,jdbcType=DECIMAL},
<if test="productPrice != null">
#{productPrice,jdbcType=DECIMAL},
</if>
<if test="productCount != null">
#{productCount,jdbcType=INTEGER},
<if test="productQuantity != null">
#{productQuantity,jdbcType=INTEGER},
</if>
<if test="productRealAmount != null">
#{productRealAmount,jdbcType=DECIMAL},
<if test="productSkuId != null">
#{productSkuId,jdbcType=BIGINT},
</if>
<if test="productSkuCode != null">
#{productSkuCode,jdbcType=VARCHAR},
</if>
<if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT},
</if>
<if test="sp1 != null">
#{sp1,jdbcType=VARCHAR},
@@ -210,6 +260,27 @@
<if test="sp3 != null">
#{sp3,jdbcType=VARCHAR},
</if>
<if test="promotionName != null">
#{promotionName,jdbcType=VARCHAR},
</if>
<if test="promotionAmount != null">
#{promotionAmount,jdbcType=DECIMAL},
</if>
<if test="couponAmount != null">
#{couponAmount,jdbcType=DECIMAL},
</if>
<if test="integrationAmount != null">
#{integrationAmount,jdbcType=DECIMAL},
</if>
<if test="realAmount != null">
#{realAmount,jdbcType=DECIMAL},
</if>
<if test="giftIntegration != null">
#{giftIntegration,jdbcType=INTEGER},
</if>
<if test="giftGrowth != null">
#{giftGrowth,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.OmsOrderItemExample" resultType="java.lang.Integer">
@@ -233,8 +304,8 @@
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=BIGINT},
</if>
<if test="record.proudctPic != null">
proudct_pic = #{record.proudctPic,jdbcType=VARCHAR},
<if test="record.productPic != null">
product_pic = #{record.productPic,jdbcType=VARCHAR},
</if>
<if test="record.productName != null">
product_name = #{record.productName,jdbcType=VARCHAR},
@@ -245,14 +316,20 @@
<if test="record.productSn != null">
product_sn = #{record.productSn,jdbcType=VARCHAR},
</if>
<if test="record.productAmount != null">
product_amount = #{record.productAmount,jdbcType=DECIMAL},
<if test="record.productPrice != null">
product_price = #{record.productPrice,jdbcType=DECIMAL},
</if>
<if test="record.productCount != null">
product_count = #{record.productCount,jdbcType=INTEGER},
<if test="record.productQuantity != null">
product_quantity = #{record.productQuantity,jdbcType=INTEGER},
</if>
<if test="record.productRealAmount != null">
product_real_amount = #{record.productRealAmount,jdbcType=DECIMAL},
<if test="record.productSkuId != null">
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
</if>
<if test="record.productSkuCode != null">
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
</if>
<if test="record.productCategoryId != null">
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
</if>
<if test="record.sp1 != null">
sp1 = #{record.sp1,jdbcType=VARCHAR},
@@ -263,6 +340,27 @@
<if test="record.sp3 != null">
sp3 = #{record.sp3,jdbcType=VARCHAR},
</if>
<if test="record.promotionName != null">
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
</if>
<if test="record.promotionAmount != null">
promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL},
</if>
<if test="record.couponAmount != null">
coupon_amount = #{record.couponAmount,jdbcType=DECIMAL},
</if>
<if test="record.integrationAmount != null">
integration_amount = #{record.integrationAmount,jdbcType=DECIMAL},
</if>
<if test="record.realAmount != null">
real_amount = #{record.realAmount,jdbcType=DECIMAL},
</if>
<if test="record.giftIntegration != null">
gift_integration = #{record.giftIntegration,jdbcType=INTEGER},
</if>
<if test="record.giftGrowth != null">
gift_growth = #{record.giftGrowth,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -274,16 +372,25 @@
order_id = #{record.orderId,jdbcType=BIGINT},
order_sn = #{record.orderSn,jdbcType=VARCHAR},
product_id = #{record.productId,jdbcType=BIGINT},
proudct_pic = #{record.proudctPic,jdbcType=VARCHAR},
product_pic = #{record.productPic,jdbcType=VARCHAR},
product_name = #{record.productName,jdbcType=VARCHAR},
product_brand = #{record.productBrand,jdbcType=VARCHAR},
product_sn = #{record.productSn,jdbcType=VARCHAR},
product_amount = #{record.productAmount,jdbcType=DECIMAL},
product_count = #{record.productCount,jdbcType=INTEGER},
product_real_amount = #{record.productRealAmount,jdbcType=DECIMAL},
product_price = #{record.productPrice,jdbcType=DECIMAL},
product_quantity = #{record.productQuantity,jdbcType=INTEGER},
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
sp1 = #{record.sp1,jdbcType=VARCHAR},
sp2 = #{record.sp2,jdbcType=VARCHAR},
sp3 = #{record.sp3,jdbcType=VARCHAR}
sp3 = #{record.sp3,jdbcType=VARCHAR},
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL},
coupon_amount = #{record.couponAmount,jdbcType=DECIMAL},
integration_amount = #{record.integrationAmount,jdbcType=DECIMAL},
real_amount = #{record.realAmount,jdbcType=DECIMAL},
gift_integration = #{record.giftIntegration,jdbcType=INTEGER},
gift_growth = #{record.giftGrowth,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -300,8 +407,8 @@
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
</if>
<if test="proudctPic != null">
proudct_pic = #{proudctPic,jdbcType=VARCHAR},
<if test="productPic != null">
product_pic = #{productPic,jdbcType=VARCHAR},
</if>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
@@ -312,14 +419,20 @@
<if test="productSn != null">
product_sn = #{productSn,jdbcType=VARCHAR},
</if>
<if test="productAmount != null">
product_amount = #{productAmount,jdbcType=DECIMAL},
<if test="productPrice != null">
product_price = #{productPrice,jdbcType=DECIMAL},
</if>
<if test="productCount != null">
product_count = #{productCount,jdbcType=INTEGER},
<if test="productQuantity != null">
product_quantity = #{productQuantity,jdbcType=INTEGER},
</if>
<if test="productRealAmount != null">
product_real_amount = #{productRealAmount,jdbcType=DECIMAL},
<if test="productSkuId != null">
product_sku_id = #{productSkuId,jdbcType=BIGINT},
</if>
<if test="productSkuCode != null">
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
</if>
<if test="productCategoryId != null">
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if test="sp1 != null">
sp1 = #{sp1,jdbcType=VARCHAR},
@@ -330,6 +443,27 @@
<if test="sp3 != null">
sp3 = #{sp3,jdbcType=VARCHAR},
</if>
<if test="promotionName != null">
promotion_name = #{promotionName,jdbcType=VARCHAR},
</if>
<if test="promotionAmount != null">
promotion_amount = #{promotionAmount,jdbcType=DECIMAL},
</if>
<if test="couponAmount != null">
coupon_amount = #{couponAmount,jdbcType=DECIMAL},
</if>
<if test="integrationAmount != null">
integration_amount = #{integrationAmount,jdbcType=DECIMAL},
</if>
<if test="realAmount != null">
real_amount = #{realAmount,jdbcType=DECIMAL},
</if>
<if test="giftIntegration != null">
gift_integration = #{giftIntegration,jdbcType=INTEGER},
</if>
<if test="giftGrowth != null">
gift_growth = #{giftGrowth,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -338,16 +472,25 @@
set order_id = #{orderId,jdbcType=BIGINT},
order_sn = #{orderSn,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=BIGINT},
proudct_pic = #{proudctPic,jdbcType=VARCHAR},
product_pic = #{productPic,jdbcType=VARCHAR},
product_name = #{productName,jdbcType=VARCHAR},
product_brand = #{productBrand,jdbcType=VARCHAR},
product_sn = #{productSn,jdbcType=VARCHAR},
product_amount = #{productAmount,jdbcType=DECIMAL},
product_count = #{productCount,jdbcType=INTEGER},
product_real_amount = #{productRealAmount,jdbcType=DECIMAL},
product_price = #{productPrice,jdbcType=DECIMAL},
product_quantity = #{productQuantity,jdbcType=INTEGER},
product_sku_id = #{productSkuId,jdbcType=BIGINT},
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
product_category_id = #{productCategoryId,jdbcType=BIGINT},
sp1 = #{sp1,jdbcType=VARCHAR},
sp2 = #{sp2,jdbcType=VARCHAR},
sp3 = #{sp3,jdbcType=VARCHAR}
sp3 = #{sp3,jdbcType=VARCHAR},
promotion_name = #{promotionName,jdbcType=VARCHAR},
promotion_amount = #{promotionAmount,jdbcType=DECIMAL},
coupon_amount = #{couponAmount,jdbcType=DECIMAL},
integration_amount = #{integrationAmount,jdbcType=DECIMAL},
real_amount = #{realAmount,jdbcType=DECIMAL},
gift_integration = #{giftIntegration,jdbcType=INTEGER},
gift_growth = #{giftGrowth,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>