<?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.lantone.daqe.mapper.RegularMappingMapper">


    <select id="getRegularMapping" resultType="com.lantone.daqe.dto.GetRegular">
        SELECT
        a.column_id,
        a.regular_id id,
        a.gmt_modified,
        b.`name`,
        b.val,
        b.description des
        FROM
        dc_regular_mapping a,
        dc_regular_info b
        where
        a.regular_id=b.id
        AND a.is_deleted='N'
        AND b.is_deleted='N'
        <if test="getRegularMappingVO.columnId != null and getRegularMappingVO.columnId != ''">
            AND a.column_id = #{getRegularMappingVO.columnId}
        </if>
    </select>
</mapper>