|
|
|
@ -39,23 +39,21 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt { |
|
|
|
|
int deleteByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
@Insert({ |
|
|
|
|
"insert into coupon_discount (`name`, img, ", |
|
|
|
|
"`type`, platform, ", |
|
|
|
|
"`condition`, price, ", |
|
|
|
|
"percentage, limit_num, ", |
|
|
|
|
"effective_day, effective_num, ", |
|
|
|
|
"sales_end_time, create_time, ", |
|
|
|
|
"update_time, op_id, ", |
|
|
|
|
"op_name, `status`, ", |
|
|
|
|
"insert into coupon_discount (platform_code, `name`, ", |
|
|
|
|
"img, `type`, `condition`, ", |
|
|
|
|
"price, percentage, ", |
|
|
|
|
"limit_num, effective_day, ", |
|
|
|
|
"effective_num, sales_end_time, ", |
|
|
|
|
"create_time, update_time, ", |
|
|
|
|
"op_id, op_name, `status`, ", |
|
|
|
|
"ext_1, ext_2, ext_3)", |
|
|
|
|
"values (#{name,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{type,jdbcType=INTEGER}, #{platform,jdbcType=INTEGER}, ", |
|
|
|
|
"#{condition,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, ", |
|
|
|
|
"#{percentage,jdbcType=DECIMAL}, #{limitNum,jdbcType=INTEGER}, ", |
|
|
|
|
"#{effectiveDay,jdbcType=INTEGER}, #{effectiveNum,jdbcType=INTEGER}, ", |
|
|
|
|
"#{salesEndTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", |
|
|
|
|
"#{opName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
|
|
|
|
"values (#{platformCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{img,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{condition,jdbcType=DECIMAL}, ", |
|
|
|
|
"#{price,jdbcType=DECIMAL}, #{percentage,jdbcType=DECIMAL}, ", |
|
|
|
|
"#{limitNum,jdbcType=INTEGER}, #{effectiveDay,jdbcType=INTEGER}, ", |
|
|
|
|
"#{effectiveNum,jdbcType=INTEGER}, #{salesEndTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", |
|
|
|
|
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
|
|
|
|
}) |
|
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
@ -68,10 +66,10 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt { |
|
|
|
|
@SelectProvider(type=CouponDiscountSqlProvider.class, method="selectByExample") |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL), |
|
|
|
|
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
|
|
|
|
@Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL), |
|
|
|
@ -92,7 +90,7 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt { |
|
|
|
|
|
|
|
|
|
@Select({ |
|
|
|
|
"select", |
|
|
|
|
"id, `name`, img, `type`, platform, `condition`, price, percentage, limit_num, ", |
|
|
|
|
"id, platform_code, `name`, img, `type`, `condition`, price, percentage, limit_num, ", |
|
|
|
|
"effective_day, effective_num, sales_end_time, create_time, update_time, op_id, ", |
|
|
|
|
"op_name, `status`, ext_1, ext_2, ext_3", |
|
|
|
|
"from coupon_discount", |
|
|
|
@ -100,10 +98,10 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt { |
|
|
|
|
}) |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="platform_code", property="platformCode", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="platform", property="platform", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="condition", property="condition", jdbcType=JdbcType.DECIMAL), |
|
|
|
|
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), |
|
|
|
|
@Result(column="percentage", property="percentage", jdbcType=JdbcType.DECIMAL), |
|
|
|
@ -133,10 +131,10 @@ public interface CouponDiscountMapper extends CouponDiscountMapperExt { |
|
|
|
|
|
|
|
|
|
@Update({ |
|
|
|
|
"update coupon_discount", |
|
|
|
|
"set `name` = #{name,jdbcType=VARCHAR},", |
|
|
|
|
"set platform_code = #{platformCode,jdbcType=VARCHAR},", |
|
|
|
|
"`name` = #{name,jdbcType=VARCHAR},", |
|
|
|
|
"img = #{img,jdbcType=VARCHAR},", |
|
|
|
|
"`type` = #{type,jdbcType=INTEGER},", |
|
|
|
|
"platform = #{platform,jdbcType=INTEGER},", |
|
|
|
|
"`condition` = #{condition,jdbcType=DECIMAL},", |
|
|
|
|
"price = #{price,jdbcType=DECIMAL},", |
|
|
|
|
"percentage = #{percentage,jdbcType=DECIMAL},", |
|
|
|
|