<?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.ho.user.mapper.IdControlMapper">
  <sql id="Base_Column_List">
    id, type ,current_val
  </sql>

  <insert id="insert">
      INSERT INTO `id_control`( `type`, `current_val`)
       VALUES (#{type}, #{currentVal});
  </insert>

  <update id="updateCurrentVal">
    UPDATE id_control
    SET current_val = #{currentVal}
    WHERE type =#{type}
  </update>

  <select id="selectCurrentVal" resultType="com.ho.user.entity.IdControl">
        select <include refid="Base_Column_List"/>
        from id_control
        where type =#{type}
  </select>


</mapper>