<?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="io.renren.modules.sys.dao.algs.AlgorithmParameterMapper">
    <resultMap id="BaseResultMap" type="io.renren.modules.sys.entity.algs.AlgorithmParameter">
        <id column="algorithm_parameter_id" jdbcType="BIGINT" property="algorithmParameterId" />
        <result column="algorithm_parameter_name" jdbcType="VARCHAR" property="algorithmParameterName" />
        <result column="algorithm_id" jdbcType="BIGINT" property="algorithmId" />
        <result column="algorithm_parameter_type" jdbcType="VARCHAR" property="algorithmParameterType" />
    </resultMap>

    <sql id="Base_Column_List">
        algorithm_parameter_id,algorithm_parameter_name,algorithm_id,algorithm_parameter_type
    </sql>
    <select id="selectByAlgId" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from algorithm_parameter
        where algorithm_id = #{algorithmId,jdbcType=BIGINT}
    </select>
    <insert id="insert" parameterType="io.renren.modules.sys.entity.algs.AlgorithmParameter">
        insert into algorithm_parameter(algorithm_parameter_name,algorithm_id,algorithm_parameter_type)
        values (#{algorithmParameterName,jdbcType=VARCHAR},#{algorithmId,jdbcType=BIGINT},#{algorithmParameterType,jdbcType=VARCHAR})
    </insert>
</mapper>