mybatis 批量操作

void batchSave(@Param("relationList") List relationList);
    
void batchDelete(@Param("id")List ids); 
 
  
    delete from doc_relation
    where id in
      
        #{list,jdbcType=BIGINT} 
      
   

 

     insert into doc_relation (id, hospital_id, tablea_id, 
      tablea_col_id, tablea_col_index, tableb_id, 
      tableb_col_id, tableb_col_index)
    values 
   
    (#{list.id,jdbcType=BIGINT}, #{list.hospitalId,jdbcType=BIGINT}, #{list.tableaId,jdbcType=BIGINT}, 
      #{list.tableaColId,jdbcType=BIGINT}, #{list.tableaColIndex,jdbcType=VARCHAR}, #{list.tablebId,jdbcType=BIGINT}, 
      #{list.tablebColId,jdbcType=BIGINT}, #{list.tablebColIndex,jdbcType=VARCHAR})
    
  

你可能感兴趣的:(mybatis 批量操作)