美文网首页
mybatis 批量增删改查操作的几种操作以及创建数据库索引

mybatis 批量增删改查操作的几种操作以及创建数据库索引

作者: Label_76be | 来源:发表于2018-07-11 16:32 被阅读0次

1、批量插入操作


     mapper.java层定义:

     int batchInsert(List stockList);


mapper.xml层的sql语句:

insert into t_stock (status, asset_classify_id,asset_id,asset_item_id, name,num, batch_num, tag_id,rfid, epc, barcode,qr_code, erp, unit,pic_url, specification, model,material, color,length,width, height, weight,density, volume, price01,price02,warehouse_id, storage_zone_id,storage_location_id,storage_location_tag_id,remark, attr01, attr02,attr03, create_date,last_update,creater, client_id)values (#{item.status,jdbcType=VARCHAR},#{item.assetClassifyId,jdbcType=BIGINT},#{item.assetId,jdbcType=BIGINT}, #{item.assetItemId,jdbcType=BIGINT},#{item.name,jdbcType=VARCHAR},#{item.num,jdbcType=VARCHAR},#{item.batchNum,jdbcType=VARCHAR}, #{item.tagId,jdbcType=VARCHAR},#{item.rfid,jdbcType=VARCHAR}, #{item.epc,jdbcType=VARCHAR},#{item.barcode,jdbcType=VARCHAR},#{item.qrCode,jdbcType=VARCHAR},#{item.erp,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR},#{item.picUrl,jdbcType=VARCHAR},#{item.specification,jdbcType=VARCHAR},#{item.model,jdbcType=VARCHAR},#{item.material,jdbcType=VARCHAR},#{item.color,jdbcType=VARCHAR}, #{item.length,jdbcType=DECIMAL},#{item.width,jdbcType=DECIMAL}, #{item.height,jdbcType=DECIMAL},#{item.weight,jdbcType=DECIMAL},#{item.density,jdbcType=DECIMAL},#{item.volume,jdbcType=DECIMAL}, #{item.price01,jdbcType=DECIMAL},#{item.price02,jdbcType=DECIMAL},#{item.warehouseId,jdbcType=BIGINT},#{item.storageZoneId,jdbcType=BIGINT},#{item.storageLocationId,jdbcType=BIGINT},#{item.storageLocationTagId,jdbcType=BIGINT},#{item.remark,jdbcType=VARCHAR}, #{item.attr01,jdbcType=VARCHAR},#{item.attr02,jdbcType=VARCHAR},#{item.attr03,jdbcType=VARCHAR},#{item.createDate,jdbcType=TIMESTAMP},#{item.lastUpdate,jdbcType=TIMESTAMP},#{item.creater,jdbcType=BIGINT}, #{item.clientId,jdbcType=BIGINT})

相关文章

  • mybatis 批量增删改查操作的几种操作以及创建数据库索引

    1、批量插入操作 mapper.java层定义: int batchInsert(List stockLi...

  • 利用JTS构建R树索引

    空间索引(Spatial Indexing) 回忆下数据库最基本的操作:增删改查以及稍复杂些的比如连接操作,基本都...

  • nodejs+mongodb

    nodejs操作 mongodb数据库增删改查 创建node增删改查执行文件

  • Nodejs+Mongodb

    nodejs操作 mongodb数据库增删改查 创建node增删改查执行文件 有闪电

  • MySQL数据库高级操作一

    前言 MySQL增删改查基本操作后,为了优化数据库还可使用视图、事务、索引等数据库操作。 1、视图——SQL语句查...

  • mysql数据库的基本操作

    一、基本增删改查二、创建索引的几种方式三、单表查询四、连表查询 一、基本增删改查 1.数据库的增删改查 show ...

  • 2018-01-11 JDBC连接数据库代码

    1.JDBC操作mysql数据库-增删改查 2.JDBC操作Oracle数据库-增删改查

  • Python

    Python 创建文件 Python 对数据库进行操作--增删改查 Python 对csv进行操作 Python ...

  • SQL查询结构总结

    SQL 增删改查 对数据库有修改的操作是:增删改 增 insert into 表名 values(); 删 del...

  • MySQL基本语句

    库操作 [查] - 查看所有数据库 [增] - 创建新数据库 [查] - 查看创建数据库的SQL的语句 [用] -...

网友评论

      本文标题:mybatis 批量增删改查操作的几种操作以及创建数据库索引

      本文链接:https://www.haomeiwen.com/subject/gaqpqftx.html