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