<?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.apiservice.dao.YearPigHistoryImgDao">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="com.huimv.apiservice.entity.YearPigHistoryImgEntity" id="yearPigHistoryImgMap">
        <result property="id" column="id"/>
        <result property="eartag" column="eartag"/>
        <result property="img" column="img"/>
        <result property="deleted" column="deleted"/>
        <result property="gmtCreate" column="gmt_create"/>
        <result property="gmtModified" column="gmt_modified"/>
    </resultMap>


    <select id="getLatestImgByPigEarTagNo" parameterType="string" resultType="java.lang.String">
        SELECT img FROM mgt_year_pig_history_img WHERE eartag = #{pigEarTagNo} ORDER BY id DESC limit 10;
    </select>




</mapper>