2023-05-10 17:17:26 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.qiaoba.module.system.mapper.SysUserPostMapper">
|
|
|
|
|
|
|
|
|
|
<select id="selectPostIdsByUserId" resultType="string">
|
|
|
|
|
select post_id from sys_user_post where user_id = #{userId}
|
|
|
|
|
</select>
|
2023-05-16 17:28:43 +08:00
|
|
|
|
|
|
|
|
<select id="selectUsedPostNameByIds" resultType="string">
|
|
|
|
|
select DISTINCT t1.post_name
|
|
|
|
|
from sys_post t1
|
|
|
|
|
LEFT JOIN sys_user_post t2
|
|
|
|
|
on t1.post_id = t2.post_id
|
|
|
|
|
where t2.post_id in
|
|
|
|
|
<foreach collection="list" item="postId" open="(" separator="," close=")">
|
|
|
|
|
#{postId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</select>
|
|
|
|
|
|
2023-05-18 17:29:02 +08:00
|
|
|
<delete id="deleteByUserIds">
|
|
|
|
|
delete from sys_user_post where user_id in
|
|
|
|
|
<foreach collection="list" item="userId" open="(" separator="," close=")">
|
|
|
|
|
#{userId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
2023-05-10 17:17:26 +08:00
|
|
|
</mapper>
|