<?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.business.mapper.TranslateNameMapper">

    <sql id="Base_Column_List">
        id,`name`,name_en
    </sql>

    <select id="getDictNation" resultType="com.ho.business.entity.TranslateName">
        select <include refid="Base_Column_List"/> from translate_name
    </select>

    <select id="selectNameEN" resultType="com.ho.business.entity.TranslateName">
        select <include refid="Base_Column_List"/> from translate_name where name = #{name} limit 1
    </select>

    <update id="updateNameEnById">
        update translate_name set name_en=#{nameEn} where id = #{id}
    </update>

    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.business.entity.TranslateName"
            useGeneratedKeys="true">
        insert into translate_name
            ( id, name, name_en)
        values ( #{vo.id,jdbcType=INTEGER}, #{vo.name,jdbcType=VARCHAR}, #{vo.nameEn,jdbcType=VARCHAR})
    </insert>

</mapper>
