liurunyu
2024-12-11 b81e59b6ef96ac100109f7662365ff3bec805a2d
pipIrr-platform/pipIrr-global/src/main/resources/mapper/OpeTrackMapper.xml
@@ -99,4 +99,24 @@
      locate_time = #{locateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <!--批量添加巡检轨迹-->
  <insert id="insertTracks">
    INSERT INTO ope_track (id, inspect_id, lng, lat, locate_time)
    VALUES
    <foreach collection="list" item="item" index="index" separator=",">
      (#{item.id}, #{item.inspectId}, #{item.lng}, #{item.lat}, #{item.locateTime})
    </foreach>
  </insert>
    <!--根据巡检id查询轨迹-->
<!--  <select id="selectByInspectId" resultMap="BaseResultMap">-->
  <select id="selectByInspectId" resultType="com.dy.pipIrrGlobal.pojoOp.OpeTrack">
    SELECT
      id,
      inspect_id AS inspectId,
      lng,
      lat,
      locate_time AS locateTime
    FROM ope_track WHERE inspect_id = #{inspectId}
  </select>
</mapper>