# ReticleFamilyInqDAOImpl.java

    package com.mycim.server.reticle.dao.impl;

    import com.mycim.framework.jdbc.JdbcTemplate;
    import com.mycim.server.reticle.dao.ReticleFamilyInqDAO;
    import com.mycim.valueobject.consts.DataBaseNames;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Repository;

    /**
     * @author finatice.yang
     * @date 2021/12/23
     **/
    @Repository
    public class ReticleFamilyInqDAOImpl implements ReticleFamilyInqDAO {

        @Autowired
        JdbcTemplate jdbcTemplate;

        @Override
        public String getReticleFamilyId(Long reticleFamilyRrn) {
            StringBuilder sql = new StringBuilder("SELECT RETICLE_FAMILY_ID FROM ");
            sql.append(DataBaseNames.RETICLE_FAMILY);
            sql.append(" WHERE SYS_RRN=?");
            return jdbcTemplate.queryForObjectWithNull(sql.toString(), String.class, reticleFamilyRrn);
        }

    }