mybatis 创建临时表
<insert id="dropTempTable">
DROP TEMPORARY TABLE IF EXISTS temp_table${uuid};
</insert>
<insert id="createTempTable">
CREATE TEMPORARY TABLE IF NOT EXISTS temp_table${uuid} (
id VARCHAR(50) PRIMARY KEY
);
</insert>
<!-- 插入数据到临时表 -->
<insert id="insertTempTableData">
INSERT INTO temp_table${uuid} (id)
VALUES
<foreach collection="orgIdList" item="id" separator=",">
(#{id})
</foreach>
</insert>