<?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.diagbot.mapper.DisScaleMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.diagbot.entity.DisScale">
        <id column="id" property="id" />
        <result column="is_deleted" property="isDeleted" />
        <result column="gmt_create" property="gmtCreate" />
        <result column="gmt_modified" property="gmtModified" />
        <result column="creator" property="creator" />
        <result column="modifier" property="modifier" />
        <result column="dis_id" property="disId" />
        <result column="scale_id" property="scaleId" />
        <result column="order_no" property="orderNo" />
        <result column="remark" property="remark" />
    </resultMap>


    <select id="getDisScaleFac" resultType="com.diagbot.dto.DisScaleDTO">
        SELECT b.id,b.name,b.tag_type,a.order_no FROM `icss_dis_scale` a, icss_question_info b
        where a.scale_id = b.id and a.is_deleted = 'N' and b.is_deleted = 'N' and a.dis_id = #{disId}
        order by a.order_no
    </select>
</mapper>
