<?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.fizz.business.mapper.SegmentTotalMapper">

    <!-- 根据入库钢卷号查询最新一段的 total_values_json -->
    <select id="selectLatestTotalValuesJsonByCoilId"
            parameterType="java.lang.String"
            resultType="java.lang.String">
        SELECT
            total_values_json
        FROM cpl_segment_total
        WHERE en_coil_id = #{coilId}
        ORDER BY seg_no DESC
            LIMIT 1
    </select>

</mapper>

