<?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.huatek.busi.mapper.BusiParamTempletMapper">

    <sql id="Base_Column_List">
            id as id,
            weight_level as weightLevel,
            name as name,
            description as description,
            pname as pname,
            value as value,
            calculated_value as calculatedValue,
            ab_value_flag as abValueFlag,
            a_value as aValue,
            b_value as bValue,
            warning_value as warningValue,
            model as model,
            param_type as paramType,
            unit as unit,
            create_time as createTime,
            create_user as createUser,
            sort_num as sortNum
    </sql>

	<select id="findBusiParams" parameterType="java.lang.String" resultType="com.huatek.busi.entity.BusiParamTemplet">
		SELECT
        <include refid="Base_Column_List"/>
        FROM
        busi_param_templet t
        WHERE t.param_type = #{paramType}
        ORDER BY t.weight_level ASC , t.sort_num ASC, t.id ASC
	</select>
</mapper>