添加优惠券管理接口

This commit is contained in:
zhh
2018-08-28 17:27:16 +08:00
parent a5faaf1567
commit 201b405a08
17 changed files with 928 additions and 624 deletions

View File

@@ -5,7 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
<result column="platform" jdbcType="INTEGER" property="platform" />
<result column="count" jdbcType="INTEGER" property="count" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="per_limit" jdbcType="INTEGER" property="perLimit" />
@@ -123,7 +123,7 @@
use_type, note, publish_count,
use_count, receive_count, enable_time,
code, member_level)
values (#{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR},
values (#{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platform,jdbcType=INTEGER},
#{count,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{perLimit,jdbcType=INTEGER},
#{minPoint,jdbcType=DECIMAL}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{useType,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR}, #{publishCount,jdbcType=INTEGER},
@@ -196,7 +196,7 @@
#{name,jdbcType=VARCHAR},
</if>
<if test="platform != null">
#{platform,jdbcType=VARCHAR},
#{platform,jdbcType=INTEGER},
</if>
<if test="count != null">
#{count,jdbcType=INTEGER},
@@ -261,7 +261,7 @@
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.platform != null">
platform = #{record.platform,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=INTEGER},
</if>
<if test="record.count != null">
count = #{record.count,jdbcType=INTEGER},
@@ -315,7 +315,7 @@
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=INTEGER},
count = #{record.count,jdbcType=INTEGER},
amount = #{record.amount,jdbcType=DECIMAL},
per_limit = #{record.perLimit,jdbcType=INTEGER},
@@ -344,7 +344,7 @@
name = #{name,jdbcType=VARCHAR},
</if>
<if test="platform != null">
platform = #{platform,jdbcType=VARCHAR},
platform = #{platform,jdbcType=INTEGER},
</if>
<if test="count != null">
count = #{count,jdbcType=INTEGER},
@@ -395,7 +395,7 @@
update sms_coupon
set type = #{type,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR},
platform = #{platform,jdbcType=INTEGER},
count = #{count,jdbcType=INTEGER},
amount = #{amount,jdbcType=DECIMAL},
per_limit = #{perLimit,jdbcType=INTEGER},

View File

@@ -3,7 +3,7 @@
<mapper namespace="com.macro.mall.mapper.SmsCouponProductRelationMapper">
<resultMap id="BaseResultMap" type="com.macro.mall.model.SmsCouponProductRelation">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="coupon_id" jdbcType="INTEGER" property="couponId" />
<result column="coupon_id" jdbcType="BIGINT" property="couponId" />
<result column="product_id" jdbcType="BIGINT" property="productId" />
</resultMap>
<sql id="Example_Where_Clause">
@@ -102,7 +102,7 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into sms_coupon_product_relation (coupon_id, product_id)
values (#{couponId,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT})
values (#{couponId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.SmsCouponProductRelation">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -119,7 +119,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="couponId != null">
#{couponId,jdbcType=INTEGER},
#{couponId,jdbcType=BIGINT},
</if>
<if test="productId != null">
#{productId,jdbcType=BIGINT},
@@ -139,7 +139,7 @@
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.couponId != null">
coupon_id = #{record.couponId,jdbcType=INTEGER},
coupon_id = #{record.couponId,jdbcType=BIGINT},
</if>
<if test="record.productId != null">
product_id = #{record.productId,jdbcType=BIGINT},
@@ -152,7 +152,7 @@
<update id="updateByExample" parameterType="map">
update sms_coupon_product_relation
set id = #{record.id,jdbcType=BIGINT},
coupon_id = #{record.couponId,jdbcType=INTEGER},
coupon_id = #{record.couponId,jdbcType=BIGINT},
product_id = #{record.productId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -162,7 +162,7 @@
update sms_coupon_product_relation
<set>
<if test="couponId != null">
coupon_id = #{couponId,jdbcType=INTEGER},
coupon_id = #{couponId,jdbcType=BIGINT},
</if>
<if test="productId != null">
product_id = #{productId,jdbcType=BIGINT},
@@ -172,7 +172,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.SmsCouponProductRelation">
update sms_coupon_product_relation
set coupon_id = #{couponId,jdbcType=INTEGER},
set coupon_id = #{couponId,jdbcType=BIGINT},
product_id = #{productId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>