Created
October 28, 2019 11:56
-
-
Save codethereforam/94c949404a3b0aac5427a09735cc6f0d to your computer and use it in GitHub Desktop.
Mybatis查询是否存在
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Integer exist(Map<String, Object> paramMap); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="exist" parameterType="Map" resultType="Integer"> | |
select 1 from foo_table | |
<include refid="conditions"/> | |
limit 1 | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean exist(Map<String, Object> paramMap) { | |
return FooMapper.exist(paramMap) != null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment