Files
emsback/ems-system/src/main/resources/mapper/ems/EmsSiteMonitorPointMatchMapper.xml

41 lines
1.7 KiB
XML
Raw Normal View History

2026-02-12 21:07:41 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xzzn.ems.mapper.EmsSiteMonitorPointMatchMapper">
<resultMap id="EmsSiteMonitorPointMatchResult" type="com.xzzn.ems.domain.EmsSiteMonitorPointMatch">
<result property="id" column="id"/>
<result property="siteId" column="site_id"/>
<result property="fieldCode" column="field_code"/>
<result property="dataPoint" column="data_point"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<select id="selectBySiteId" resultMap="EmsSiteMonitorPointMatchResult">
select id, site_id, field_code, data_point, create_by, create_time, update_by, update_time, remark
from ems_site_monitor_point_match
where site_id = #{siteId}
order by id asc
</select>
<delete id="deleteBySiteId">
delete from ems_site_monitor_point_match
where site_id = #{siteId}
</delete>
<insert id="insertBatch">
insert into ems_site_monitor_point_match
(site_id, field_code, data_point, create_by, create_time, update_by, update_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.siteId}, #{item.fieldCode}, #{item.dataPoint}, #{item.createBy}, now(), #{item.updateBy}, now())
</foreach>
</insert>
</mapper>