|
|
|
@ -3,6 +3,7 @@ package com.hai.dao; |
|
|
|
|
import com.hai.entity.HighCouponRecycle; |
|
|
|
|
import com.hai.entity.HighCouponRecycleExample; |
|
|
|
|
import java.util.List; |
|
|
|
|
import org.apache.ibatis.annotations.Delete; |
|
|
|
|
import org.apache.ibatis.annotations.DeleteProvider; |
|
|
|
|
import org.apache.ibatis.annotations.Insert; |
|
|
|
|
import org.apache.ibatis.annotations.InsertProvider; |
|
|
|
@ -10,7 +11,9 @@ import org.apache.ibatis.annotations.Options; |
|
|
|
|
import org.apache.ibatis.annotations.Param; |
|
|
|
|
import org.apache.ibatis.annotations.Result; |
|
|
|
|
import org.apache.ibatis.annotations.Results; |
|
|
|
|
import org.apache.ibatis.annotations.Select; |
|
|
|
|
import org.apache.ibatis.annotations.SelectProvider; |
|
|
|
|
import org.apache.ibatis.annotations.Update; |
|
|
|
|
import org.apache.ibatis.annotations.UpdateProvider; |
|
|
|
|
import org.apache.ibatis.type.JdbcType; |
|
|
|
|
import org.springframework.stereotype.Repository; |
|
|
|
@ -29,6 +32,12 @@ public interface HighCouponRecycleMapper extends HighCouponRecycleMapperExt { |
|
|
|
|
@DeleteProvider(type=HighCouponRecycleSqlProvider.class, method="deleteByExample") |
|
|
|
|
int deleteByExample(HighCouponRecycleExample example); |
|
|
|
|
|
|
|
|
|
@Delete({ |
|
|
|
|
"delete from high_coupon_recycle", |
|
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
|
}) |
|
|
|
|
int deleteByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
@Insert({ |
|
|
|
|
"insert into high_coupon_recycle (coupon_id, coupon_name, ", |
|
|
|
|
"merchant_id, coupon_sales_code, ", |
|
|
|
@ -56,7 +65,7 @@ public interface HighCouponRecycleMapper extends HighCouponRecycleMapperExt { |
|
|
|
|
|
|
|
|
|
@SelectProvider(type=HighCouponRecycleSqlProvider.class, method="selectByExample") |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), |
|
|
|
@ -76,9 +85,63 @@ public interface HighCouponRecycleMapper extends HighCouponRecycleMapperExt { |
|
|
|
|
}) |
|
|
|
|
List<HighCouponRecycle> selectByExample(HighCouponRecycleExample example); |
|
|
|
|
|
|
|
|
|
@Select({ |
|
|
|
|
"select", |
|
|
|
|
"id, coupon_id, coupon_name, merchant_id, coupon_sales_code, coupon_code_id, ", |
|
|
|
|
"user_id, user_phone, order_no, order_id, child_order_id, `type`, receive_time, ", |
|
|
|
|
"create_time, ext_1, ext_3, ext_2", |
|
|
|
|
"from high_coupon_recycle", |
|
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
|
}) |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="coupon_sales_code", property="couponSalesCode", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="receive_time", property="receiveTime", jdbcType=JdbcType.TIMESTAMP), |
|
|
|
|
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
|
|
|
|
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR) |
|
|
|
|
}) |
|
|
|
|
HighCouponRecycle selectByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
@UpdateProvider(type=HighCouponRecycleSqlProvider.class, method="updateByExampleSelective") |
|
|
|
|
int updateByExampleSelective(@Param("record") HighCouponRecycle record, @Param("example") HighCouponRecycleExample example); |
|
|
|
|
|
|
|
|
|
@UpdateProvider(type=HighCouponRecycleSqlProvider.class, method="updateByExample") |
|
|
|
|
int updateByExample(@Param("record") HighCouponRecycle record, @Param("example") HighCouponRecycleExample example); |
|
|
|
|
|
|
|
|
|
@UpdateProvider(type=HighCouponRecycleSqlProvider.class, method="updateByPrimaryKeySelective") |
|
|
|
|
int updateByPrimaryKeySelective(HighCouponRecycle record); |
|
|
|
|
|
|
|
|
|
@Update({ |
|
|
|
|
"update high_coupon_recycle", |
|
|
|
|
"set coupon_id = #{couponId,jdbcType=BIGINT},", |
|
|
|
|
"coupon_name = #{couponName,jdbcType=VARCHAR},", |
|
|
|
|
"merchant_id = #{merchantId,jdbcType=BIGINT},", |
|
|
|
|
"coupon_sales_code = #{couponSalesCode,jdbcType=VARCHAR},", |
|
|
|
|
"coupon_code_id = #{couponCodeId,jdbcType=BIGINT},", |
|
|
|
|
"user_id = #{userId,jdbcType=BIGINT},", |
|
|
|
|
"user_phone = #{userPhone,jdbcType=VARCHAR},", |
|
|
|
|
"order_no = #{orderNo,jdbcType=VARCHAR},", |
|
|
|
|
"order_id = #{orderId,jdbcType=BIGINT},", |
|
|
|
|
"child_order_id = #{childOrderId,jdbcType=BIGINT},", |
|
|
|
|
"`type` = #{type,jdbcType=INTEGER},", |
|
|
|
|
"receive_time = #{receiveTime,jdbcType=TIMESTAMP},", |
|
|
|
|
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
|
|
|
|
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
|
|
|
|
"ext_3 = #{ext3,jdbcType=VARCHAR},", |
|
|
|
|
"ext_2 = #{ext2,jdbcType=VARCHAR}", |
|
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
|
}) |
|
|
|
|
int updateByPrimaryKey(HighCouponRecycle record); |
|
|
|
|
} |