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
310696e2
"vscode:/vscode.git/clone" did not exist on "544e539a8dd065f560ecf5b6662f6550bac95f29"
Commit
310696e2
authored
Jun 19, 2019
by
macro
Browse files
修复mybatis generator重复生成mapper.xml内容的问题
parent
79000a1e
Changes
149
Hide whitespace changes
Inline
Side-by-side
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberRuleSettingMapper.xml
View file @
310696e2
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberRuleSettingExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberRuleSettingExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_member_rule_setting
select count(*) from ums_member_rule_setting
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberStatisticsInfoMapper.xml
View file @
310696e2
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberStatisticsInfoExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberStatisticsInfoExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_member_statistics_info
select count(*) from ums_member_statistics_info
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTagMapper.xml
View file @
310696e2
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberTagExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberTagExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_member_tag
select count(*) from ums_member_tag
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsMemberTaskMapper.xml
View file @
310696e2
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberTaskExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsMemberTaskExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_member_task
select count(*) from ums_member_task
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsPermissionMapper.xml
View file @
310696e2
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsPermissionExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsPermissionExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_permission
select count(*) from ums_permission
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRoleMapper.xml
View file @
310696e2
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsRoleExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsRoleExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_role
select count(*) from ums_role
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/UmsRolePermissionRelationMapper.xml
View file @
310696e2
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsRolePermissionRelationExample"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.UmsRolePermissionRelationExample"
resultType=
"java.lang.
Long
"
>
select count(*) from ums_role_permission_relation
select count(*) from ums_role_permission_relation
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
...
...
mall-mbg/src/main/resources/generatorConfig.xml
View file @
310696e2
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
<plugin
type=
"org.mybatis.generator.plugins.SerializablePlugin"
/>
<plugin
type=
"org.mybatis.generator.plugins.SerializablePlugin"
/>
<!-- 为生成的Java模型创建一个toString方法 -->
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin
type=
"org.mybatis.generator.plugins.ToStringPlugin"
/>
<plugin
type=
"org.mybatis.generator.plugins.ToStringPlugin"
/>
<!--生成mapper.xml时覆盖原文件-->
<plugin
type=
"org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin"
/>
<commentGenerator
type=
"com.macro.mall.CommentGenerator"
>
<commentGenerator
type=
"com.macro.mall.CommentGenerator"
>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property
name=
"suppressAllComments"
value=
"true"
/>
<property
name=
"suppressAllComments"
value=
"true"
/>
...
...
mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java
View file @
310696e2
...
@@ -47,7 +47,7 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService {
...
@@ -47,7 +47,7 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService {
//判断用户领取的优惠券数量是否超过限制
//判断用户领取的优惠券数量是否超过限制
SmsCouponHistoryExample
couponHistoryExample
=
new
SmsCouponHistoryExample
();
SmsCouponHistoryExample
couponHistoryExample
=
new
SmsCouponHistoryExample
();
couponHistoryExample
.
createCriteria
().
andCouponIdEqualTo
(
couponId
).
andMemberIdEqualTo
(
currentMember
.
getId
());
couponHistoryExample
.
createCriteria
().
andCouponIdEqualTo
(
couponId
).
andMemberIdEqualTo
(
currentMember
.
getId
());
int
count
=
couponHistoryMapper
.
countByExample
(
couponHistoryExample
);
long
count
=
couponHistoryMapper
.
countByExample
(
couponHistoryExample
);
if
(
count
>=
coupon
.
getPerLimit
()){
if
(
count
>=
coupon
.
getPerLimit
()){
return
CommonResult
.
failed
(
"您已经领取过该优惠券"
);
return
CommonResult
.
failed
(
"您已经领取过该优惠券"
);
}
}
...
...
Prev
1
…
4
5
6
7
8
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