mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-30 21:36:08 +08:00
update 优化 框架整体提高查询性能
This commit is contained in:
@@ -7,20 +7,12 @@
|
||||
<resultMap type="org.dromara.system.domain.vo.SysPostVo" id="SysPostResult">
|
||||
</resultMap>
|
||||
|
||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
||||
select p.post_id
|
||||
<select id="selectPostsByUserId" parameterType="Long" resultMap="SysPostResult">
|
||||
select p.post_id, p.post_name, p.post_code
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
||||
select p.post_id, p.post_name, p.post_code
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user