疯狂的狮子li
2021-04-14 48d61a3cdf4c0f119456f86d51cd770caf8645e1
ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml
@@ -9,24 +9,4 @@
        <result property="postId" column="post_id"/>
    </resultMap>
    <delete id="deleteUserPostByUserId" parameterType="Long">
        delete
        from sys_user_post
        where user_id = #{userId}
    </delete>
    <delete id="deleteUserPost" parameterType="Long">
        delete from sys_user_post where user_id in
        <foreach collection="array" item="userId" open="(" separator="," close=")">
            #{userId}
        </foreach>
    </delete>
    <insert id="batchUserPost">
        insert into sys_user_post(user_id, post_id) values
        <foreach item="item" index="index" collection="list" separator=",">
            (#{item.userId},#{item.postId})
        </foreach>
    </insert>
</mapper>