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/UmsMemberProductCategoryRelationMapper.xml
View file @
390132d9
...
...
@@ -98,21 +98,18 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberProductCategoryRelation"
>
<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 ums_member_product_category_relation (id, member_id, product_category_id
)
values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT}
)
insert into ums_member_product_category_relation (member_id, product_category_id)
values (#{memberId,jdbcType=BIGINT}, #{productCategoryId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberProductCategoryRelation"
>
<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 ums_member_product_category_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"memberId != null"
>
member_id,
</if>
...
...
@@ -121,7 +118,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"memberId != null"
>
#{memberId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberReceiveAddressMapper.xml
View file @
390132d9
...
...
@@ -102,23 +102,22 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberReceiveAddress"
>
<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 ums_member_receive_address (
id,
member_id, name,
phone_number,
address, post_code,
default_status
)
values (
#{id,jdbcType=BIGINT},
#{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR},
#{defaultStatus,jdbcType=INTEGER}
)
insert into ums_member_receive_address (member_id, name,
phone_number,
address, post_code,
default_status
)
values (#{memberId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{postCode,jdbcType=VARCHAR},
#{defaultStatus,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberReceiveAddress"
>
<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 ums_member_receive_address
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"memberId != null"
>
member_id,
</if>
...
...
@@ -139,7 +138,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"memberId != null"
>
#{memberId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml
View file @
390132d9
...
...
@@ -103,23 +103,22 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberRuleSetting"
>
<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 ums_member_rule_setting (
id,
continue_sign_day, continue_sign_point,
insert into ums_member_rule_setting (continue_sign_day, continue_sign_point,
consume_per_point, low_order_amount, max_point_per_order,
type)
values (
#{id,jdbcType=BIGINT},
#{continueSignDay,jdbcType=INTEGER}, #{continueSignPoint,jdbcType=INTEGER},
values (#{continueSignDay,jdbcType=INTEGER}, #{continueSignPoint,jdbcType=INTEGER},
#{consumePerPoint,jdbcType=DECIMAL}, #{lowOrderAmount,jdbcType=DECIMAL}, #{maxPointPerOrder,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberRuleSetting"
>
<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 ums_member_rule_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"continueSignDay != null"
>
continue_sign_day,
</if>
...
...
@@ -140,7 +139,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"continueSignDay != null"
>
#{continueSignDay,jdbcType=INTEGER},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml
View file @
390132d9
...
...
@@ -113,29 +113,28 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberStatisticsInfo"
>
<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 ums_member_statistics_info (
id,
member_id, consume_amount,
order_count,
coupon_count, comment_count,
return_order
_count,
login
_count,
attend
_count,
fans_count,
collect_product_count, collect_subject_count,
insert into ums_member_statistics_info (member_id, consume_amount,
order_count,
coupon_count, comment_count,
return_order_count,
login
_count,
attend
_count,
fans
_count,
collect_product_count, collect_subject_count,
collect_topic_count, collect_comment_count,
invite_friend_count, recent_order_time)
values (
#{id,jdbcType=BIGINT},
#{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL},
#{orderCount,jdbcType=INTEGER},
#{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER},
#{returnOrderCount,jdbcType=INTEGER},
#{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER},
#{fansCount,jdbcType=INTEGER},
#{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER},
values (#{memberId,jdbcType=BIGINT}, #{consumeAmount,jdbcType=DECIMAL},
#{orderCount,jdbcType=INTEGER},
#{couponCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER},
#{returnOrderCount,jdbcType=INTEGER},
#{loginCount,jdbcType=INTEGER}, #{attendCount,jdbcType=INTEGER},
#{fansCount,jdbcType=INTEGER},
#{collectProductCount,jdbcType=INTEGER}, #{collectSubjectCount,jdbcType=INTEGER},
#{collectTopicCount,jdbcType=INTEGER}, #{collectCommentCount,jdbcType=INTEGER},
#{inviteFriendCount,jdbcType=INTEGER}, #{recentOrderTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberStatisticsInfo"
>
<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 ums_member_statistics_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"memberId != null"
>
member_id,
</if>
...
...
@@ -183,7 +182,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"memberId != null"
>
#{memberId,jdbcType=BIGINT},
</if>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml
View file @
390132d9
...
...
@@ -99,21 +99,20 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberTag"
>
<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 ums_member_tag (
id,
name, finish_order_count,
finish_order_amount
)
values (
#{id,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER},
#{finishOrderAmount,jdbcType=DECIMAL}
)
insert into ums_member_tag (name, finish_order_count,
finish_order_amount
)
values (#{name,jdbcType=VARCHAR}, #{finishOrderCount,jdbcType=INTEGER},
#{finishOrderAmount,jdbcType=DECIMAL}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberTag"
>
<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 ums_member_tag
<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/UmsMemberTaskMapper.xml
View file @
390132d9
...
...
@@ -100,21 +100,20 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.UmsMemberTask"
>
<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 ums_member_task (
id,
name, growth,
intergration,
type)
values (#{
id
,jdbcType=
BIGINT}, #{name,jdbcType=VARCHAR}, #{growth
,jdbcType=INTEGER},
#{intergration,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
insert into ums_member_task (name, growth,
intergration,
type)
values (#{
name
,jdbcType=
VARCHAR}, #{growth,jdbcType=INTEGER}, #{intergration
,jdbcType=INTEGER},
#{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.UmsMemberTask"
>
<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 ums_member_task
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
id,
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -129,7 +128,6 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{id,jdbcType=BIGINT},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
mall-mbg/src/main/resources/generatorConfig.xml
View file @
390132d9
...
...
@@ -34,7 +34,7 @@
targetProject=
"mall-mbg\src\main\java"
/>
<table
tableName=
"%"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
/>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
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