<?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.huimv.management.dao.ThresholdManagementDao">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="com.huimv.management.entity.ThresholdManagementEntity" id="thresholdManagementMap">
        <result property="id" column="id"/>
        <result property="thresholdType" column="threshold_type"/>
        <result property="thresholdValue" column="threshold_value"/>
        <result property="deleted" column="deleted"/>
        <result property="gmtCreate" column="gmt_create"/>
        <result property="gmtModified" column="gmt_modified"/>
    </resultMap>

    <select id="page" resultType="com.huimv.management.entity.vo.ThresholdManagementVo">
        SELECT
          threshold.id,
          farm_id,
          farm.name farm_name,
          threshold_type,
          belong_to,
          threshold_value
        FROM mgt_threshold_management threshold
        JOIN mgt_farm farm ON threshold.farm_id = farm.id
        ${ew.customSqlSegment}
    </select>


</mapper>