|
@@ -34,19 +34,20 @@
|
|
<result property="usedNum" column="used_num" jdbcType="INTEGER"/>
|
|
<result property="usedNum" column="used_num" jdbcType="INTEGER"/>
|
|
<result property="userLimit" column="user_limit" jdbcType="INTEGER"/>
|
|
<result property="userLimit" column="user_limit" jdbcType="INTEGER"/>
|
|
<result property="extParam" column="ext_param" jdbcType="VARCHAR"/>
|
|
<result property="extParam" column="ext_param" jdbcType="VARCHAR"/>
|
|
|
|
+ <result property="rebValue" column="reb_value" jdbcType="VARCHAR"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectCouponReceiveVo">
|
|
<sql id="selectCouponReceiveVo">
|
|
a.id, a.openid, a.coupon_id, a.expiration_time, a.create_time, a.update_time, a.is_delete,a.use_state,
|
|
a.id, a.openid, a.coupon_id, a.expiration_time, a.create_time, a.update_time, a.is_delete,a.use_state,
|
|
- b.name, b.type, b.discount_type, b.discount_value, b.threshold_amount, b.obtain_way, b.term_days, b.status, b.used_num, b.user_limit, b.ext_param
|
|
|
|
|
|
+ b.name, b.type, b.discount_type, b.discount_value, b.threshold_amount, b.obtain_way, b.term_days, b.status, b.used_num, b.user_limit, b.ext_param,b.reb_value
|
|
</sql>
|
|
</sql>
|
|
<!-- 批量插入 -->
|
|
<!-- 批量插入 -->
|
|
<insert id="insertBatch" keyProperty="id">
|
|
<insert id="insertBatch" keyProperty="id">
|
|
- insert into coupon_receive(id,openid,coupon_id,expiration_time,dept_id,dept_name,create_time,update_time,is_delete)
|
|
|
|
|
|
+ insert into coupon_receive(id,openid,coupon_id,expiration_time,dept_id,dept_name)
|
|
values
|
|
values
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
- (#{entity.id},#{entity.openid},#{entity.couponId},#{entity.expirationTime},#{entity.deptId},#{entity.deptName},#{entity.createTime},#{entity.updateTime},#{entity.isDelete})
|
|
|
|
|
|
+ (#{entity.id},#{entity.openid},#{entity.couponId},#{entity.expirationTime},#{entity.deptId},#{entity.deptName})
|
|
</foreach>
|
|
</foreach>
|
|
</insert>
|
|
</insert>
|
|
<!-- 批量插入或按主键更新 -->
|
|
<!-- 批量插入或按主键更新 -->
|
|
@@ -66,7 +67,6 @@
|
|
update_time = values(update_time),
|
|
update_time = values(update_time),
|
|
is_delete = values(is_delete)
|
|
is_delete = values(is_delete)
|
|
</insert>
|
|
</insert>
|
|
-
|
|
|
|
<select id="getByOpenId" resultMap="CouponReceiveVoMap">
|
|
<select id="getByOpenId" resultMap="CouponReceiveVoMap">
|
|
SELECT
|
|
SELECT
|
|
<include refid="selectCouponReceiveVo"/>
|
|
<include refid="selectCouponReceiveVo"/>
|