Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
390132d9
Commit
390132d9
authored
Apr 17, 2018
by
zhh
Browse files
修复主键重名问题
parent
d74b7c2b
Changes
67
Hide whitespace changes
Inline
Side-by-side
mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderReturnReasonMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into oms_order_return_reason (
id,
name, sort,
status
)
values (
#{id,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}
)
insert into oms_order_return_reason (name, sort,
status
)
values (#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into oms_order_return_reason
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -125,7 +124,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderSettingMapper.xml
View file @
390132d9
...
...
@@ -102,23 +102,22 @@
</if>
</delete>
<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()
</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
)
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}
)
</insert>
<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()
</selectKey>
insert into oms_order_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"flashOrderOvertime != null"
>
flash_order_overtime,
</if>
...
...
@@ -136,7 +135,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"flashOrderOvertime != null"
>
#{flashOrderOvertime,jdbcType=INTEGER},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumMapper.xml
View file @
390132d9
...
...
@@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_album (id, name, cover_pic,
pic_count, sort, description
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR},
#{picCount,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}
)
insert into pms_album (name, cover_pic, pic_count,
sort, description)
values (#{name,jdbcType=VARCHAR}, #{coverPic,jdbcType=VARCHAR}, #{picCount,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_album
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -135,7 +132,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsAlbumPicMapper.xml
View file @
390132d9
...
...
@@ -98,21 +98,18 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_album_pic (id, album_id, pic
)
values (#{id,jdbcType=BIGINT}, #{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR}
)
insert into pms_album_pic (album_id, pic)
values (#{albumId,jdbcType=BIGINT}, #{pic,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_album_pic
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"albumId != null"
>
album_id,
</if>
...
...
@@ -121,7 +118,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"albumId != null"
>
#{albumId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsBrandMapper.xml
View file @
390132d9
...
...
@@ -130,25 +130,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_brand (
id,
name, first_letter,
sort,
factory_status, show_status,
product_count,
product_comment_count, logo,
big_pic,
brand_story)
values (
#{id,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER},
#{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER},
#{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR},
#{bigPic,jdbcType=VARCHAR},
#{brandStory,jdbcType=LONGVARCHAR})
insert into pms_brand (name, first_letter,
sort,
factory_status, show_status,
product_count,
product_comment_count, logo,
big_pic,
brand_story)
values (#{name,jdbcType=VARCHAR}, #{firstLetter,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER},
#{factoryStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER},
#{productCommentCount,jdbcType=INTEGER}, #{logo,jdbcType=VARCHAR},
#{bigPic,jdbcType=VARCHAR},
#{brandStory,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_brand
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -181,7 +180,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentMapper.xml
View file @
390132d9
...
...
@@ -134,29 +134,26 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_comment (id, product_id, member_nick_name,
product_name, star, member_ip,
create_time, show_status, product_attribute,
collect_couont, read_count, pics,
member_icon, replay_count, content
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR},
#{collectCouont,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR}, #{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
insert into pms_comment (product_id, member_nick_name, product_name,
star, member_ip, create_time,
show_status, product_attribute, collect_couont,
read_count, pics, member_icon,
replay_count, content)
values (#{productId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR},
#{star,jdbcType=INTEGER}, #{memberIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{showStatus,jdbcType=INTEGER}, #{productAttribute,jdbcType=VARCHAR}, #{collectCouont,jdbcType=INTEGER},
#{readCount,jdbcType=INTEGER}, #{pics,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR},
#{replayCount,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_comment
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -201,7 +198,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsCommentReplayMapper.xml
View file @
390132d9
...
...
@@ -102,23 +102,22 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_comment_replay (
id,
comment_id, member_nick_name,
member_icon,
content, create_time,
type
)
values (
#{id,jdbcType=BIGINT},
#{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{type,jdbcType=INTEGER}
)
insert into pms_comment_replay (comment_id, member_nick_name,
member_icon,
content, create_time,
type
)
values (#{commentId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR},
#{memberIcon,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{type,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_comment_replay
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"commentId != null"
>
comment_id,
</if>
...
...
@@ -139,7 +138,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"commentId != null"
>
#{commentId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsFeightTemplateMapper.xml
View file @
390132d9
...
...
@@ -103,23 +103,22 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_feight_template (
id,
name, charge_type,
first_weight,
first_fee, continue_weight,
continme_fee,
dest)
values (
#{id,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER},
#{firstWeight,jdbcType=DECIMAL},
#{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL},
#{continmeFee,jdbcType=DECIMAL},
#{dest,jdbcType=VARCHAR})
insert into pms_feight_template (name, charge_type,
first_weight,
first_fee, continue_weight,
continme_fee,
dest)
values (#{name,jdbcType=VARCHAR}, #{chargeType,jdbcType=INTEGER},
#{firstWeight,jdbcType=DECIMAL},
#{firstFee,jdbcType=DECIMAL}, #{continueWeight,jdbcType=DECIMAL},
#{continmeFee,jdbcType=DECIMAL},
#{dest,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_feight_template
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -143,7 +142,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsMemberPriceMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_member_price (
id,
product_id, member_level_id,
member_price
)
values (
#{id,jdbcType=BIGINT},
#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT},
#{memberPrice,jdbcType=DECIMAL}
)
insert into pms_member_price (product_id, member_level_id,
member_price
)
values (#{productId,jdbcType=BIGINT}, #{memberLevelId,jdbcType=BIGINT},
#{memberPrice,jdbcType=DECIMAL}
)
</insert>
<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()
</selectKey>
insert into pms_member_price
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -125,7 +124,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeCategoryMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_attribute_category (
id,
name, attribute_count,
param_count
)
values (
#{id,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER},
#{paramCount,jdbcType=INTEGER}
)
insert into pms_product_attribute_category (name, attribute_count,
param_count
)
values (#{name,jdbcType=VARCHAR}, #{attributeCount,jdbcType=INTEGER},
#{paramCount,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_product_attribute_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -125,7 +124,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeMapper.xml
View file @
390132d9
...
...
@@ -108,27 +108,26 @@
</if>
</delete>
<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()
</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,
sort, filter_type, search_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},
#{sort,jdbcType=INTEGER}, #{filterType,jdbcType=INTEGER}, #{searchType,jdbcType=INTEGER},
#{relatedStatus,jdbcType=INTEGER}, #{handAddStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_product_attribute
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productAttributeCategoryId != null"
>
product_attribute_category_id,
</if>
...
...
@@ -164,7 +163,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productAttributeCategoryId != null"
>
#{productAttributeCategoryId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductAttributeValueMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<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()
</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)
values (
#{id,jdbcType=BIGINT},
#{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
values (#{pmsProductId,jdbcType=BIGINT}, #{pmsProductAttributeId,jdbcType=BIGINT},
#{value,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_attribute_value
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"pmsProductId != null"
>
pms_product_id,
</if>
...
...
@@ -125,7 +124,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"pmsProductId != null"
>
#{pmsProductId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryAttributeRelationMapper.xml
View file @
390132d9
...
...
@@ -98,21 +98,20 @@
</if>
</delete>
<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()
</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
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()
</selectKey>
insert into pms_product_category_attribute_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productCategoryId != null"
>
product_category_id,
</if>
...
...
@@ -121,7 +120,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productCategoryId != null"
>
#{productCategoryId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductCategoryMapper.xml
View file @
390132d9
...
...
@@ -131,27 +131,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_category (id, parent_id, name,
level, product_count, product_unit,
nav_status, show_status, sort,
icon, keywords, description
)
values (#{id,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR},
#{navStatus,jdbcType=INTEGER}, #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{icon,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
insert into pms_product_category (parent_id, name, level,
product_count, product_unit, nav_status,
show_status, sort, icon,
keywords, description)
values (#{parentId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER},
#{productCount,jdbcType=INTEGER}, #{productUnit,jdbcType=VARCHAR}, #{navStatus,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{keywords,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"parentId != null"
>
parent_id,
</if>
...
...
@@ -187,7 +184,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"parentId != null"
>
#{parentId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductFullReductionMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_full_reduction (
id,
product_id, full_price,
reduce_price
)
values (
#{id,jdbcType=INTEGER},
#{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL},
#{reducePrice,jdbcType=DECIMAL}
)
insert into pms_product_full_reduction (product_id, full_price,
reduce_price
)
values (#{productId,jdbcType=BIGINT}, #{fullPrice,jdbcType=DECIMAL},
#{reducePrice,jdbcType=DECIMAL}
)
</insert>
<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()
</selectKey>
insert into pms_product_full_reduction
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -125,7 +124,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=INTEGER},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductLadderMapper.xml
View file @
390132d9
...
...
@@ -100,21 +100,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_ladder (
id,
product_id, count,
discount,
price)
values (
#{id,jdbcType=BIGINT},
#{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER},
#{discount,jdbcType=DECIMAL},
#{price,jdbcType=DECIMAL})
insert into pms_product_ladder (product_id, count,
discount,
price)
values (#{productId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER},
#{discount,jdbcType=DECIMAL},
#{price,jdbcType=DECIMAL})
</insert>
<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()
</selectKey>
insert into pms_product_ladder
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -129,7 +128,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml
View file @
390132d9
...
...
@@ -167,49 +167,48 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product (
id,
brand_id, product_category_id,
feight_template_id,
product_attribute_category_id,
flash_promotion_id, name, pic
,
product_sn,
delete_status, publish_status,
new_status,
recommand_status, verify_status,
s
ort, sale,
price,
promotion_price,
gift_point, use_point_limit,
sub_title,
original_price, stock,
low_stock,
unit, weight,
preview_status,
service_ids, keywords,
note,
album_pics, detail_title,
flash_promotion_
price
, flash_promotion_
coun
t,
flash_
promotion_s
ort
, promotion_
start
_time,
promotion_
end_time
, promotion_
per_limit
,
promotion_type, description, detail_desc,
detail_html, detail_mobile_html
)
values (
#{id,jdbcType=BIGINT},
#{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
#{feightTemplateId,jdbcType=BIGINT},
#{productAttributeCategoryId,jdbcType=BIGINT},
#{
flashPromotionId
,jdbcType=
INTEGE
R}, #{
name
,jdbcType=VARCHAR}, #{p
ic
,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR},
#{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER},
#{newStatus,jdbcType=INTEGER},
#{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER},
#{s
ort
,jdbcType=INTEGER}, #{
sal
e,jdbcType=
INTEGER}, #{p
rice,jdbcType=DECIMAL},
#{promotionPrice,jdbcType=DECIMAL},
#{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER},
#{subTitle,jdbcType=VARCHAR},
#{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER},
#{lowStock,jdbcType=INTEGER},
#{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL},
#{previewStatus,jdbcType=INTEGER},
#{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
#{note,jdbcType=VARCHAR},
#{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR},
#{flashPromotion
Price
,jdbcType=
DECIMAL
}, #{flashPromotion
Coun
t,jdbcType=INTEGER},
#{
flashP
romotionS
ort
,jdbcType=
INTEGER
}, #{promotion
Start
Time,jdbcType=TIMESTAMP},
#{promotion
EndTime
,jdbcType=
TIMESTAMP
}, #{promotion
PerLimit
,jdbcType=INTEGER},
#{
promotionType,jdbcType=INTEGER}, #{description
,jdbcType=LONGVARCHAR}, #{detail
Desc
,jdbcType=LONGVARCHAR}
,
#{detailHtml,jdbcType=LONGVARCHAR}, #{detailMobileHtml,jdbcType=LONGVARCHAR}
)
insert into pms_product (brand_id, product_category_id,
feight_template_id,
product_attribute_category_id,
flash_promotion_id,
name, pic, product_sn
,
delete_status, publish_status,
new_status,
recommand_status, verify_status,
sort,
s
ale, price, promotion_
price,
gift_point, use_point_limit,
sub_title,
original_price, stock,
low_stock,
unit, weight,
preview_status,
service_ids, keywords,
note,
album_pics, detail_title,
flash_promotion_price,
flash_promotion_
count
, flash_promotion_
sor
t,
promotion_s
tart_time
, promotion_
end
_time,
promotion_
per_limit
, promotion_
type, description
,
detail_desc, detail_html, detail_mobile_html
)
values (#{brandId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT},
#{feightTemplateId,jdbcType=BIGINT},
#{productAttributeCategoryId,jdbcType=BIGINT},
#{flashPromotionId,jdbcType=INTEGER},
#{
name
,jdbcType=
VARCHA
R}, #{
pic
,jdbcType=VARCHAR}, #{p
roductSn
,jdbcType=VARCHAR},
#{deleteStatus,jdbcType=INTEGER}, #{publishStatus,jdbcType=INTEGER},
#{newStatus,jdbcType=INTEGER},
#{recommandStatus,jdbcType=INTEGER}, #{verifyStatus,jdbcType=INTEGER},
#{sort,jdbcType=INTEGER},
#{s
ale
,jdbcType=INTEGER}, #{
pric
e,jdbcType=
DECIMAL}, #{promotionP
rice,jdbcType=DECIMAL},
#{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER},
#{subTitle,jdbcType=VARCHAR},
#{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER},
#{lowStock,jdbcType=INTEGER},
#{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL},
#{previewStatus,jdbcType=INTEGER},
#{serviceIds,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR},
#{note,jdbcType=VARCHAR},
#{albumPics,jdbcType=VARCHAR}, #{detailTitle,jdbcType=VARCHAR},
#{flashPromotionPrice,jdbcType=DECIMAL},
#{flashPromotion
Count
,jdbcType=
INTEGER
}, #{flashPromotion
Sor
t,jdbcType=INTEGER},
#{
p
romotionS
tartTime
,jdbcType=
TIMESTAMP
}, #{promotion
End
Time,jdbcType=TIMESTAMP},
#{promotion
PerLimit
,jdbcType=
INTEGER
}, #{promotion
Type
,jdbcType=INTEGER},
#{description,jdbcType=LONGVARCHAR},
#{
detailDesc,jdbcType=LONGVARCHAR}, #{detailHtml
,jdbcType=LONGVARCHAR}, #{detail
MobileHtml
,jdbcType=LONGVARCHAR}
)
</insert>
<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()
</selectKey>
insert into pms_product
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"brandId != null"
>
brand_id,
</if>
...
...
@@ -338,7 +337,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"brandId != null"
>
#{brandId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductOperateLogMapper.xml
View file @
390132d9
...
...
@@ -108,27 +108,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_operate_log (id, product_id, price_old,
price_new, sale_price_old, sale_price_new,
gift_point_old, gift_point_new, use_point_limit_old,
use_point_limit_new, operate_man, create_time
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL},
#{priceNew,jdbcType=DECIMAL}, #{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL},
#{giftPointOld,jdbcType=INTEGER}, #{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER},
#{usePointLimitNew,jdbcType=INTEGER}, #{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
insert into pms_product_operate_log (product_id, price_old, price_new,
sale_price_old, sale_price_new, gift_point_old,
gift_point_new, use_point_limit_old, use_point_limit_new,
operate_man, create_time)
values (#{productId,jdbcType=BIGINT}, #{priceOld,jdbcType=DECIMAL}, #{priceNew,jdbcType=DECIMAL},
#{salePriceOld,jdbcType=DECIMAL}, #{salePriceNew,jdbcType=DECIMAL}, #{giftPointOld,jdbcType=INTEGER},
#{giftPointNew,jdbcType=INTEGER}, #{usePointLimitOld,jdbcType=INTEGER}, #{usePointLimitNew,jdbcType=INTEGER},
#{operateMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<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()
</selectKey>
insert into pms_product_operate_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -164,7 +161,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductVertifyRecordMapper.xml
View file @
390132d9
...
...
@@ -101,23 +101,20 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_product_vertify_record (id, product_id, create_time,
vertify_man, status, detail
)
values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{vertifyMan,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR}
)
insert into pms_product_vertify_record (product_id, create_time, vertify_man,
status, detail)
values (#{productId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{vertifyMan,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{detail,jdbcType=VARCHAR})
</insert>
<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()
</selectKey>
insert into pms_product_vertify_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -135,7 +132,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsSkuStockMapper.xml
View file @
390132d9
...
...
@@ -106,25 +106,24 @@
</if>
</delete>
<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()
</selectKey>
insert into pms_sku_stock (
id,
product_id, sku_code,
price,
stock, low_stock,
sp1,
sp2, sp3, pic,
sale
)
values (
#{id,jdbcType=BIGINT},
#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR},
#{price,jdbcType=DECIMAL},
#{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER},
#{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
#{sale,jdbcType=INTEGER}
)
insert into pms_sku_stock (product_id, sku_code,
price,
stock, low_stock,
sp1,
sp2, sp3, pic,
sale
)
values (#{productId,jdbcType=BIGINT}, #{skuCode,jdbcType=VARCHAR},
#{price,jdbcType=DECIMAL},
#{stock,jdbcType=INTEGER}, #{lowStock,jdbcType=INTEGER},
#{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR},
#{sale,jdbcType=INTEGER}
)
</insert>
<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()
</selectKey>
insert into pms_sku_stock
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"productId != null"
>
product_id,
</if>
...
...
@@ -157,7 +156,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment