<?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.casic.missiles.modular.system.dao.DeviceConcentratorMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.casic.missiles.modular.system.model.DeviceConcentrator">
        <id column="DEVICE_ID" property="deviceId" />
        <result column="CONCEN_ID" property="concenId" />
        <result column="STATUS" property="status" />
        <result column="ACTIVE" property="active" />
        <result column="TS" property="ts" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        DEVICE_ID AS "deviceId", CONCEN_ID AS "concenId", STATUS AS status, ACTIVE AS active, TS AS ts
    </sql>

    <update id="updateByDeviceId">
       UPDATE bus_device_concentrator SET CONCEN_ID = #{concId} WHERE DEVICE_ID = #{deviceId}
    </update>
</mapper>
