# AutoMonitorUnitInfoMapper.java

    package com.mycim.server.automonitor.dao.mapper;

    import com.mycim.framework.jdbc.mapper.RowMapper;
    import com.mycim.valueobject.automonitor.entity.AutoMonitorUnitInfo;

    import java.sql.ResultSet;
    import java.sql.SQLException;

    /**
     * @author yangkeren
     * @date 2022/3/11
     **/
    public class AutoMonitorUnitInfoMapper implements RowMapper<AutoMonitorUnitInfo> {

        AutoMonitorUnitInfo unitInfo;

        @Override
        public AutoMonitorUnitInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
            unitInfo = new AutoMonitorUnitInfo();
            unitInfo.setUnitId(rs.getString("UNIT_ID"));
            unitInfo.setUnitRrn(rs.getLong("UNIT_RRN"));
            unitInfo.setLotId(rs.getString("LOT_ID"));
            unitInfo.setLotRrn(rs.getLong("LOT_RRN"));
            unitInfo.setCarrierRrn(rs.getLong("CARRIER_RRN"));
            unitInfo.setCarrierId(rs.getString("CARRIER_ID"));
            unitInfo.setPosition(rs.getInt("POSITION"));
            unitInfo.setMonitorCarrierId(rs.getString("MONITOR_CARRIER_ID"));
            unitInfo.setMonitorCarrierRrn(rs.getLong("MONITOR_CARRIER_RRN"));
            unitInfo.setMonitorCarrierPosition(rs.getInt("MONITOR_CARRIER_POSITION"));
            return unitInfo;
        }

    }