优惠券接口修改

This commit is contained in:
zhh
2018-11-09 16:16:17 +08:00
parent 483721db8f
commit 7d3b72bd93
14 changed files with 1874 additions and 1336 deletions

View File

@@ -12,8 +12,12 @@
c.*,
cpr.id cpr_id,
cpr.product_id cpr_product_id,
cpr.product_name cpr_product_name,
cpr.product_sn cpr_product_sn,
cpcr.id cpcr_id,
cpcr.product_category_id cpcr_product_category_id
cpcr.product_category_id cpcr_product_category_id,
cpcr.product_category_name cpcr_product_category_name,
cpcr.parent_category_name cpcr_parent_category_name
FROM
sms_coupon c
LEFT JOIN sms_coupon_product_relation cpr ON c.id = cpr.coupon_id

View File

@@ -2,10 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.dao.SmsCouponProductCategoryRelationDao">
<insert id="insertList">
INSERT INTO sms_coupon_product_category_relation (product_category_id,coupon_id) VALUES
INSERT INTO sms_coupon_product_category_relation (product_category_id,product_category_name,parent_category_name,coupon_id) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productCategoryId,jdbcType=BIGINT},
#{item.couponId,jdbcType=INTEGER})
#{item.productCategoryName,jdbcType=VARCHAR},
#{item.parentCategoryName,jdbcType=VARCHAR},
#{item.couponId,jdbcType=BIGINT})
</foreach>
</insert>
</mapper>

View File

@@ -2,9 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.dao.SmsCouponProductRelationDao">
<insert id="insertList">
INSERT INTO sms_coupon_product_relation (product_id,coupon_id) VALUES
INSERT INTO sms_coupon_product_relation (product_id,product_name,product_sn,coupon_id) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productId,jdbcType=BIGINT},
#{item.productName,jdbcType=VARCHAR},
#{item.productSn,jdbcType=VARCHAR},
#{item.couponId,jdbcType=INTEGER})
</foreach>
</insert>