/** * 創建臨時表 */ @Update({"drop temporary table if exists ${tableName};", "create temporary table ${tableName} select doctor_id from crm_speaker where 1=2 "}) void createTemoraryTable(@Param("tableName") String tableName); /** * 保存數據到臨時表里面以便校驗數據重復 */ @Insert("<script>" + "insert into ${tableName} (doctor_id) values\n" + " <foreach collection=\"list\" item=\"doct\" index=\"index\" separator=\",\">\n" + " (" + " #{doct.doctorId,jdbcType=VARCHAR}\n" + " )\n" + " </foreach>\n" + "</script>") void insertBatchCheckDatas(@Param("list") List<SpeakerDO> dOs, @Param("tableName") String tableName); /** * 刪除臨時表 */ @Update({"drop temporary table if exists ${tableName}"}) void dropTemporaryTable(@Param("tableName") String tableName);