<?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.unis.crk.hardware.mapper.DevicecodeMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.unis.crk.hardware.entity.Devicecode">
        <id column="DCID" property="dcid" />
        <result column="HIID" property="hiid" />
        <result column="DEVICECODE" property="devicecode" />
    </resultMap>

    <select id="getPage" resultType="java.util.Map">

        SELECT
        d.*,
        h.Name
        FROM
        devicecode d
        LEFT JOIN hardware h ON h.HIID = d.HIID
        where 1=1
        <if test="ew.sqlSegment != null and  ew.sqlSegment != ''">
            and  ${ew.sqlSegment}
        </if>

    </select>
</mapper>
