TransferPeriodLogDao.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.huimv.management.dao.TransferPeriodLogDao">
  4. <!-- 可根据自己的需求,是否要使用 -->
  5. <resultMap type="com.huimv.management.entity.TransferPeriodLogEntity" id="transferPeriodLogMap">
  6. <result property="id" column="id"/>
  7. <result property="earTag" column="ear_tag"/>
  8. <result property="oldPeriod" column="old_period"/>
  9. <result property="newPeriod" column="new_period"/>
  10. <result property="oldUnit" column="old_unit"/>
  11. <result property="newUnit" column="new_unit"/>
  12. <result property="gmtCreate" column="gmt_create"/>
  13. <result property="gmtModified" column="gmt_modified"/>
  14. <result property="operatorUsername" column="operator_username"/>
  15. </resultMap>
  16. <insert id="batchInsert">
  17. INSERT INTO mgt_transfer_period_log(ear_tag, old_period, new_period, old_unit, new_unit, gmt_create, gmt_modified, operator_username) VALUES
  18. <foreach collection="list" item="item" separator=",">
  19. (
  20. #{item.earTag},
  21. #{item.oldPeriod},
  22. #{item.newPeriod},
  23. #{item.oldUnit},
  24. #{item.newUnit},
  25. now(),
  26. now(),
  27. #{item.operatorUsername}
  28. )
  29. </foreach>
  30. </insert>
  31. </mapper>