|
|
|
@ -39,20 +39,20 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt { |
|
|
|
|
int deleteByPrimaryKey(Long id); |
|
|
|
|
|
|
|
|
|
@Insert({ |
|
|
|
|
"insert into goods_specs (goods_id, third_id, ", |
|
|
|
|
"`name`, pur_limit, ", |
|
|
|
|
"sale_price, original_price, ", |
|
|
|
|
"stock, show_img, ", |
|
|
|
|
"sales_end_time, `status`, ", |
|
|
|
|
"create_time, update_time, ", |
|
|
|
|
"ext_1, ext_2, ext_3)", |
|
|
|
|
"values (#{goodsId,jdbcType=BIGINT}, #{thirdId,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{name,jdbcType=VARCHAR}, #{purLimit,jdbcType=INTEGER}, ", |
|
|
|
|
"#{salePrice,jdbcType=DECIMAL}, #{originalPrice,jdbcType=DECIMAL}, ", |
|
|
|
|
"#{stock,jdbcType=INTEGER}, #{showImg,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{salesEndTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
|
|
|
|
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
|
|
|
|
"insert into goods_specs (goods_id, `name`, ", |
|
|
|
|
"pur_limit, sale_price, ", |
|
|
|
|
"original_price, stock, ", |
|
|
|
|
"show_img, sales_end_time, ", |
|
|
|
|
"`status`, create_time, ", |
|
|
|
|
"update_time, ext_1, ", |
|
|
|
|
"ext_2, ext_3)", |
|
|
|
|
"values (#{goodsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{purLimit,jdbcType=INTEGER}, #{salePrice,jdbcType=DECIMAL}, ", |
|
|
|
|
"#{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, ", |
|
|
|
|
"#{showImg,jdbcType=VARCHAR}, #{salesEndTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", |
|
|
|
|
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", |
|
|
|
|
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
|
|
|
|
}) |
|
|
|
|
@Options(useGeneratedKeys=true,keyProperty="id") |
|
|
|
|
int insert(GoodsSpecs record); |
|
|
|
@ -65,7 +65,6 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt { |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL), |
|
|
|
@ -84,16 +83,14 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt { |
|
|
|
|
|
|
|
|
|
@Select({ |
|
|
|
|
"select", |
|
|
|
|
"id, goods_id, third_id, `name`, pur_limit, sale_price, original_price, stock, ", |
|
|
|
|
"show_img, sales_end_time, `status`, create_time, update_time, ext_1, ext_2, ", |
|
|
|
|
"ext_3", |
|
|
|
|
"id, goods_id, `name`, pur_limit, sale_price, original_price, stock, show_img, ", |
|
|
|
|
"sales_end_time, `status`, create_time, update_time, ext_1, ext_2, ext_3", |
|
|
|
|
"from goods_specs", |
|
|
|
|
"where id = #{id,jdbcType=BIGINT}" |
|
|
|
|
}) |
|
|
|
|
@Results({ |
|
|
|
|
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
|
|
|
|
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
|
|
|
|
@Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), |
|
|
|
|
@Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER), |
|
|
|
|
@Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL), |
|
|
|
@ -122,7 +119,6 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt { |
|
|
|
|
@Update({ |
|
|
|
|
"update goods_specs", |
|
|
|
|
"set goods_id = #{goodsId,jdbcType=BIGINT},", |
|
|
|
|
"third_id = #{thirdId,jdbcType=VARCHAR},", |
|
|
|
|
"`name` = #{name,jdbcType=VARCHAR},", |
|
|
|
|
"pur_limit = #{purLimit,jdbcType=INTEGER},", |
|
|
|
|
"sale_price = #{salePrice,jdbcType=DECIMAL},", |
|
|
|
|