<?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.admin.mapper.BasePigpenMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.huimv.admin.entity.BasePigpen">
        <id column="id" property="id" />
        <result column="build_name" property="buildName" />
        <result column="parent_id" property="parentId" />
        <result column="f_type" property="fType" />
        <result column="farm_id" property="farmId" />
        <result column="sort" property="sort" />
        <result column="other1" property="other1" />
        <result column="other2" property="other2" />
        <result column="other3" property="other3" />
    </resultMap>
    <select id="getMaxBuildNum" resultType="java.lang.Integer">
        SELECT COALESCE(MAX(other1),0) FROM `base_pigpen` WHERE parent_id = #{parentId}
    </select>

</mapper>
