CliTqStationMapper.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.climate.data.mapper.CliTqStationMapper">
  4. <!-- 插入数据 -->
  5. <insert id="insertGeom">
  6. INSERT INTO "cli_tq_station" (
  7. "id",
  8. "station_id",
  9. "station_name",
  10. "province",
  11. "city",
  12. "cnty",
  13. "type"
  14. ) VALUES (
  15. #{id},
  16. #{stationId},
  17. #{stationName},
  18. #{province},
  19. #{city},
  20. #{cnty},
  21. #{adminCode},
  22. #{type}
  23. )
  24. </insert>
  25. <!-- 批量插入数据 -->
  26. <insert id="insertBatch">
  27. INSERT INTO cli_tq_station (
  28. id,
  29. station_id,
  30. station_name,
  31. province,
  32. city,
  33. cnty,
  34. admin_code,
  35. type
  36. ) VALUES
  37. <foreach collection="list" item="item" >
  38. (
  39. #{item.id},
  40. #{item.stationId},
  41. #{item.stationName},
  42. #{item.province},
  43. #{item.city},
  44. #{item.cnty},
  45. #{item.adminCode},
  46. #{item.type}
  47. )
  48. </foreach>
  49. </insert>
  50. </mapper>