battery-business/src/main/resources/mapper/battery/TTestMapper.xml
@@ -657,6 +657,7 @@ 'capture_slot_utc', #{captureSlotMillis}))) </select> <sql id="dataId"><choose><when test="dataType == 'REALTIME'">record_id</when><when test="dataType == 'STEP'">step_record_id</when><otherwise>cycle_record_id</otherwise></choose></sql> <!-- 三类数据表按 dataType 动态取表名,resultMap 映射全列:显式列名需随每次迁移同步,故保留 SELECT *。 --> <select id="selectDataRecord" resultType="map"> select * from <include refid="dataTable"/> where test_id=#{testId} and <include refid="dataId"/>=#{recordId} for update </select>