Commit 390132d9 authored by zhh's avatar zhh
Browse files

修复主键重名问题

parent d74b7c2b
...@@ -99,21 +99,20 @@ ...@@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnReason"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderReturnReason">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_reason (id, name, sort, insert into oms_order_return_reason (name, sort, status
status) )
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}
#{status,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnReason"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderReturnReason">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_return_reason insert into oms_order_return_reason
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
......
...@@ -102,23 +102,22 @@ ...@@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.OmsOrderSetting"> <insert id="insert" parameterType="com.macro.mall.model.OmsOrderSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_setting (id, flash_order_overtime, normal_order_overtime, insert into oms_order_setting (flash_order_overtime, normal_order_overtime,
confirm_overtime, finish_overtime, comment_overtime confirm_overtime, finish_overtime, comment_overtime
) )
values (#{id,jdbcType=BIGINT}, #{flashOrderOvertime,jdbcType=INTEGER}, #{normalOrderOvertime,jdbcType=INTEGER}, values (#{flashOrderOvertime,jdbcType=INTEGER}, #{normalOrderOvertime,jdbcType=INTEGER},
#{confirmOvertime,jdbcType=INTEGER}, #{finishOvertime,jdbcType=INTEGER}, #{commentOvertime,jdbcType=INTEGER} #{confirmOvertime,jdbcType=INTEGER}, #{finishOvertime,jdbcType=INTEGER}, #{commentOvertime,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderSetting"> <insert id="insertSelective" parameterType="com.macro.mall.model.OmsOrderSetting">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into oms_order_setting insert into oms_order_setting
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="flashOrderOvertime != null"> <if test="flashOrderOvertime != null">
flash_order_overtime, flash_order_overtime,
</if> </if>
...@@ -136,7 +135,6 @@ ...@@ -136,7 +135,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="flashOrderOvertime != null"> <if test="flashOrderOvertime != null">
#{flashOrderOvertime,jdbcType=INTEGER}, #{flashOrderOvertime,jdbcType=INTEGER},
</if> </if>
......
...@@ -101,23 +101,20 @@ ...@@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsAlbum"> <insert id="insert" parameterType="com.macro.mall.model.PmsAlbum">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album (id, name, cover_pic, insert into pms_album (name, cover_pic, pic_count,
pic_count, sort, description sort, description)
) values (#{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{picCount,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR})
#{picCount,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbum"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbum">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album insert into pms_album
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
...@@ -135,7 +132,6 @@ ...@@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
......
...@@ -98,21 +98,18 @@ ...@@ -98,21 +98,18 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsAlbumPic"> <insert id="insert" parameterType="com.macro.mall.model.PmsAlbumPic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album_pic (id, album_id, pic insert into pms_album_pic (album_id, pic)
) values (#{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR})
values (#{id,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbumPic"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsAlbumPic">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_album_pic insert into pms_album_pic
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="albumId != null"> <if test="albumId != null">
album_id, album_id,
</if> </if>
...@@ -121,7 +118,6 @@ ...@@ -121,7 +118,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="albumId != null"> <if test="albumId != null">
#{albumId,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT},
</if> </if>
......
...@@ -130,25 +130,24 @@ ...@@ -130,25 +130,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsBrand"> <insert id="insert" parameterType="com.macro.mall.model.PmsBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_brand (id, name, first_letter, insert into pms_brand (name, first_letter, sort,
sort, factory_status, show_status, factory_status, show_status, product_count,
product_count, product_comment_count, logo, product_comment_count, logo, big_pic,
big_pic, brand_story) brand_story)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR}, #{bigPic,jdbcType=VARCHAR},
#{bigPic,jdbcType=VARCHAR}, #{brandStory,jdbcType=LONGVARCHAR}) #{brandStory,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsBrand"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsBrand">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_brand insert into pms_brand
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
...@@ -181,7 +180,6 @@ ...@@ -181,7 +180,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
......
...@@ -134,29 +134,26 @@ ...@@ -134,29 +134,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsComment"> <insert id="insert" parameterType="com.macro.mall.model.PmsComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment (id, product_id, member_nick_name, insert into pms_comment (product_id, member_nick_name, product_name,
product_name, star, member_ip, star, member_ip, create_time,
create_time, show_status, product_attribute, show_status, product_attribute, collect_couont,
collect_couont, read_count, pics, read_count, pics, member_icon,
member_icon, replay_count, content replay_count, content)
) values (#{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{productName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{collectCouont,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{collectCouont,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
#{memberIcon,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsComment"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsComment">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment insert into pms_comment
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -201,7 +198,6 @@ ...@@ -201,7 +198,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -102,23 +102,22 @@ ...@@ -102,23 +102,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsCommentReplay"> <insert id="insert" parameterType="com.macro.mall.model.PmsCommentReplay">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment_replay (id, comment_id, member_nick_name, insert into pms_comment_replay (comment_id, member_nick_name, member_icon,
member_icon, content, create_time, content, create_time, type
type) )
values (#{id,jdbcType=BIGINT}, #{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, values (#{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=INTEGER}
#{type,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsCommentReplay"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsCommentReplay">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_comment_replay insert into pms_comment_replay
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="commentId != null"> <if test="commentId != null">
comment_id, comment_id,
</if> </if>
...@@ -139,7 +138,6 @@ ...@@ -139,7 +138,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="commentId != null"> <if test="commentId != null">
#{commentId,jdbcType=BIGINT}, #{commentId,jdbcType=BIGINT},
</if> </if>
......
...@@ -103,23 +103,22 @@ ...@@ -103,23 +103,22 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsFeightTemplate"> <insert id="insert" parameterType="com.macro.mall.model.PmsFeightTemplate">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_feight_template (id, name, charge_type, insert into pms_feight_template (name, charge_type, first_weight,
first_weight, first_fee, continue_weight, first_fee, continue_weight, continme_fee,
continme_fee, dest) dest)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER}, #{firstWeight,jdbcType=DECIMAL},
#{firstWeight,jdbcType=DECIMAL}, #{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL}, #{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL}, #{continmeFee,jdbcType=DECIMAL},
#{continmeFee,jdbcType=DECIMAL}, #{dest,jdbcType=VARCHAR}) #{dest,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsFeightTemplate"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsFeightTemplate">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_feight_template insert into pms_feight_template
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
...@@ -143,7 +142,6 @@ ...@@ -143,7 +142,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
......
...@@ -99,21 +99,20 @@ ...@@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsMemberPrice"> <insert id="insert" parameterType="com.macro.mall.model.PmsMemberPrice">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_member_price (id, product_id, member_level_id, insert into pms_member_price (product_id, member_level_id, member_price
member_price) )
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT}, #{memberPrice,jdbcType=DECIMAL}
#{memberPrice,jdbcType=DECIMAL}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsMemberPrice"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsMemberPrice">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_member_price insert into pms_member_price
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -99,21 +99,20 @@ ...@@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeCategory"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_category (id, name, attribute_count, insert into pms_product_attribute_category (name, attribute_count, param_count
param_count) )
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER}, #{paramCount,jdbcType=INTEGER}
#{paramCount,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_category insert into pms_product_attribute_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="name != null"> <if test="name != null">
name, name,
</if> </if>
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
......
...@@ -108,27 +108,26 @@ ...@@ -108,27 +108,26 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttribute"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttribute">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute (id, product_attribute_category_id, name, insert into pms_product_attribute (product_attribute_category_id, name,
select_type, input_type, input_list, select_type, input_type, input_list,
sort, filter_type, search_type, sort, filter_type, search_type,
related_status, hand_add_status, type related_status, hand_add_status, type
) )
values (#{id,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{productAttributeCategoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{selectType,jdbcType=INTEGER}, #{inputType,jdbcType=INTEGER}, #{inputList,jdbcType=VARCHAR}, #{selectType,jdbcType=INTEGER}, #{inputType,jdbcType=INTEGER}, #{inputList,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER},
#{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER} #{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttribute"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttribute">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute insert into pms_product_attribute
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productAttributeCategoryId != null"> <if test="productAttributeCategoryId != null">
product_attribute_category_id, product_attribute_category_id,
</if> </if>
...@@ -164,7 +163,6 @@ ...@@ -164,7 +163,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productAttributeCategoryId != null"> <if test="productAttributeCategoryId != null">
#{productAttributeCategoryId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT},
</if> </if>
......
...@@ -99,21 +99,20 @@ ...@@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeValue"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductAttributeValue">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_value (id, pms_product_id, pms_product_attribute_id, insert into pms_product_attribute_value (pms_product_id, pms_product_attribute_id,
value) value)
values (#{id,jdbcType=BIGINT}, #{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT}, values (#{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
#{value,jdbcType=VARCHAR}) #{value,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeValue"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductAttributeValue">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_attribute_value insert into pms_product_attribute_value
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="pmsProductId != null"> <if test="pmsProductId != null">
pms_product_id, pms_product_id,
</if> </if>
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="pmsProductId != null"> <if test="pmsProductId != null">
#{pmsProductId,jdbcType=BIGINT}, #{pmsProductId,jdbcType=BIGINT},
</if> </if>
......
...@@ -98,21 +98,20 @@ ...@@ -98,21 +98,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category_attribute_relation (id, product_category_id, product_attribute_id insert into pms_product_category_attribute_relation (product_category_id, product_attribute_id
) )
values (#{id,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{productAttributeId,jdbcType=BIGINT} values (#{productCategoryId,jdbcType=BIGINT}, #{productAttributeId,jdbcType=BIGINT}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategoryAttributeRelation">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category_attribute_relation insert into pms_product_category_attribute_relation
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productCategoryId != null"> <if test="productCategoryId != null">
product_category_id, product_category_id,
</if> </if>
...@@ -121,7 +120,6 @@ ...@@ -121,7 +120,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productCategoryId != null"> <if test="productCategoryId != null">
#{productCategoryId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
</if> </if>
......
...@@ -131,27 +131,24 @@ ...@@ -131,27 +131,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductCategory"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category (id, parent_id, name, insert into pms_product_category (parent_id, name, level,
level, product_count, product_unit, product_count, product_unit, nav_status,
nav_status, show_status, sort, show_status, sort, icon,
icon, keywords, description keywords, description)
) values (#{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{navStatus,jdbcType=INTEGER},
#{level,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{navStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
#{icon,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategory"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductCategory">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_category insert into pms_product_category
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="parentId != null"> <if test="parentId != null">
parent_id, parent_id,
</if> </if>
...@@ -187,7 +184,6 @@ ...@@ -187,7 +184,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="parentId != null"> <if test="parentId != null">
#{parentId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT},
</if> </if>
......
...@@ -99,21 +99,20 @@ ...@@ -99,21 +99,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductFullReduction"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductFullReduction">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_full_reduction (id, product_id, full_price, insert into pms_product_full_reduction (product_id, full_price, reduce_price
reduce_price) )
values (#{id,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL}, values (#{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL}, #{reducePrice,jdbcType=DECIMAL}
#{reducePrice,jdbcType=DECIMAL}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductFullReduction"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductFullReduction">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_full_reduction insert into pms_product_full_reduction
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=INTEGER},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -100,21 +100,20 @@ ...@@ -100,21 +100,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductLadder"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductLadder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_ladder (id, product_id, count, insert into pms_product_ladder (product_id, count, discount,
discount, price) price)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, values (#{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER}, #{discount,jdbcType=DECIMAL},
#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}) #{price,jdbcType=DECIMAL})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductLadder"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductLadder">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_ladder insert into pms_product_ladder
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -129,7 +128,6 @@ ...@@ -129,7 +128,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -167,49 +167,48 @@ ...@@ -167,49 +167,48 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProduct"> <insert id="insert" parameterType="com.macro.mall.model.PmsProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product (id, brand_id, product_category_id, insert into pms_product (brand_id, product_category_id, feight_template_id,
feight_template_id, product_attribute_category_id, product_attribute_category_id, flash_promotion_id,
flash_promotion_id, name, pic, name, pic, product_sn,
product_sn, delete_status, publish_status, delete_status, publish_status, new_status,
new_status, recommand_status, verify_status, recommand_status, verify_status, sort,
sort, sale, price, sale, price, promotion_price,
promotion_price, gift_point, use_point_limit, gift_point, use_point_limit, sub_title,
sub_title, original_price, stock, original_price, stock, low_stock,
low_stock, unit, weight, unit, weight, preview_status,
preview_status, service_ids, keywords, service_ids, keywords, note,
note, album_pics, detail_title, album_pics, detail_title, flash_promotion_price,
flash_promotion_price, flash_promotion_count, flash_promotion_count, flash_promotion_sort,
flash_promotion_sort, promotion_start_time, promotion_start_time, promotion_end_time,
promotion_end_time, promotion_per_limit, promotion_per_limit, promotion_type, description,
promotion_type, description, detail_desc, detail_desc, detail_html, detail_mobile_html
detail_html, detail_mobile_html) )
values (#{id,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, values (#{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}, #{feightTemplateId,jdbcType=BIGINT},
#{feightTemplateId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT}, #{flashPromotionId,jdbcType=INTEGER},
#{flashPromotionId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER},
#{newStatus,jdbcType=INTEGER}, #{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER}, #{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sale,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{promotionPrice,jdbcType=DECIMAL},
#{promotionPrice,jdbcType=DECIMAL}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER}, #{subTitle,jdbcType=VARCHAR},
#{subTitle,jdbcType=VARCHAR}, #{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER},
#{lowStock,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{previewStatus,jdbcType=INTEGER},
#{previewStatus,jdbcType=INTEGER}, #{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR},
#{note,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR}, #{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR}, #{flashPromotionPrice,jdbcType=DECIMAL},
#{flashPromotionPrice,jdbcType=DECIMAL}, #{flashPromotionCount,jdbcType=INTEGER}, #{flashPromotionCount,jdbcType=INTEGER}, #{flashPromotionSort,jdbcType=INTEGER},
#{flashPromotionSort,jdbcType=INTEGER}, #{promotionStartTime,jdbcType=TIMESTAMP}, #{promotionStartTime,jdbcType=TIMESTAMP}, #{promotionEndTime,jdbcType=TIMESTAMP},
#{promotionEndTime,jdbcType=TIMESTAMP}, #{promotionPerLimit,jdbcType=INTEGER}, #{promotionPerLimit,jdbcType=INTEGER}, #{promotionType,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR},
#{promotionType,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR}, #{detailDesc,jdbcType=LONGVARCHAR}, #{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR}
#{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product insert into pms_product
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="brandId != null"> <if test="brandId != null">
brand_id, brand_id,
</if> </if>
...@@ -338,7 +337,6 @@ ...@@ -338,7 +337,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="brandId != null"> <if test="brandId != null">
#{brandId,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT},
</if> </if>
......
...@@ -108,27 +108,24 @@ ...@@ -108,27 +108,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductOperateLog"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductOperateLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_operate_log (id, product_id, price_old, insert into pms_product_operate_log (product_id, price_old, price_new,
price_new, sale_price_old, sale_price_new, sale_price_old, sale_price_new, gift_point_old,
gift_point_old, gift_point_new, use_point_limit_old, gift_point_new, use_point_limit_old, use_point_limit_new,
use_point_limit_new, operate_man, create_time operate_man, create_time)
) values (#{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{priceNew,jdbcType=DECIMAL},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointOld,jdbcType=INTEGER},
#{priceNew,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{usePointLimitNew,jdbcType=INTEGER},
#{giftPointOld,jdbcType=INTEGER}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
#{usePointLimitNew,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductOperateLog"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductOperateLog">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_operate_log insert into pms_product_operate_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -164,7 +161,6 @@ ...@@ -164,7 +161,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -101,23 +101,20 @@ ...@@ -101,23 +101,20 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsProductVertifyRecord"> <insert id="insert" parameterType="com.macro.mall.model.PmsProductVertifyRecord">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_vertify_record (id, product_id, create_time, insert into pms_product_vertify_record (product_id, create_time, vertify_man,
vertify_man, status, detail status, detail)
) values (#{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{vertifyMan,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR})
#{vertifyMan,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductVertifyRecord"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProductVertifyRecord">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_product_vertify_record insert into pms_product_vertify_record
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -135,7 +132,6 @@ ...@@ -135,7 +132,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
...@@ -106,25 +106,24 @@ ...@@ -106,25 +106,24 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsSkuStock"> <insert id="insert" parameterType="com.macro.mall.model.PmsSkuStock">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_sku_stock (id, product_id, sku_code, insert into pms_sku_stock (product_id, sku_code, price,
price, stock, low_stock, stock, low_stock, sp1,
sp1, sp2, sp3, pic, sp2, sp3, pic, sale
sale) )
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, values (#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL},
#{price,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER}, #{sp1,jdbcType=VARCHAR},
#{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, #{sale,jdbcType=INTEGER}
#{sale,jdbcType=INTEGER}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsSkuStock"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsSkuStock">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into pms_sku_stock insert into pms_sku_stock
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test="productId != null"> <if test="productId != null">
product_id, product_id,
</if> </if>
...@@ -157,7 +156,6 @@ ...@@ -157,7 +156,6 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{id,jdbcType=BIGINT},
<if test="productId != null"> <if test="productId != null">
#{productId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT},
</if> </if>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment