mybatis 批量更新(根据list条件,更新表字段)

void updatebatchInspectionCode(List allocationCodelist,String batchInspectionCode);

Mapper接口的写法,一个list集合,一个表字段名对应的实体类属性字段


   update stockout_parts_goods_allocation
   set batch_inspection_code = #{batchInspectionCode,jdbcType=VARCHAR}
   where allocation_code in
    
        #{allocationCode,jdbcType=VARCHAR}
    
  

 

你可能感兴趣的:(mybatis)