98 lines
4.1 KiB
XML
98 lines
4.1 KiB
XML
<?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.ruoyi.system.mapper.HuayangI18nMapper">
|
|
|
|
<resultMap type="com.ruoyi.system.domain.HuayangI18n" id="HuayangI18nResult">
|
|
<result property="i18nId" column="i18n_id"/>
|
|
<result property="langCode" column="lang_code"/>
|
|
<result property="i18nKey" column="i18n_key"/>
|
|
<result property="i18nValue" column="i18n_value"/>
|
|
<result property="pageModule" column="page_module"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectHuayangI18nVo">
|
|
SELECT i18n_id, lang_code, i18n_key, i18n_value, page_module, create_by, create_time, update_by, update_time
|
|
FROM huayang_i18n
|
|
</sql>
|
|
|
|
<select id="selectHuayangI18nList" parameterType="com.ruoyi.system.domain.HuayangI18n" resultMap="HuayangI18nResult">
|
|
<include refid="selectHuayangI18nVo"/>
|
|
<where>
|
|
<if test="langCode != null and langCode != ''">
|
|
AND lang_code = #{langCode}
|
|
</if>
|
|
<if test="i18nKey != null and i18nKey != ''">
|
|
AND i18n_key LIKE CONCAT('%', #{i18nKey}, '%')
|
|
</if>
|
|
<if test="pageModule != null and pageModule != ''">
|
|
AND page_module = #{pageModule}
|
|
</if>
|
|
</where>
|
|
ORDER BY page_module ASC, i18n_key ASC
|
|
</select>
|
|
|
|
<select id="selectTranslationByLang" parameterType="String" resultMap="HuayangI18nResult">
|
|
<include refid="selectHuayangI18nVo"/>
|
|
WHERE lang_code = #{langCode}
|
|
ORDER BY page_module ASC, i18n_key ASC
|
|
</select>
|
|
|
|
<select id="selectHuayangI18nByKey" resultMap="HuayangI18nResult">
|
|
<include refid="selectHuayangI18nVo"/>
|
|
WHERE lang_code = #{langCode} AND i18n_key = #{i18nKey}
|
|
</select>
|
|
|
|
<select id="selectHuayangI18nByLangAndKeyList" resultMap="HuayangI18nResult">
|
|
<include refid="selectHuayangI18nVo"/>
|
|
WHERE lang_code = #{langCode}
|
|
AND i18n_key IN
|
|
<foreach item="k" collection="keyList" open="(" separator="," close=")">
|
|
#{k}
|
|
</foreach>
|
|
</select>
|
|
|
|
<insert id="insertHuayangI18n" parameterType="com.ruoyi.system.domain.HuayangI18n" useGeneratedKeys="true" keyProperty="i18nId">
|
|
INSERT INTO huayang_i18n
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="langCode != null and langCode != ''">lang_code,</if>
|
|
<if test="i18nKey != null and i18nKey != ''">i18n_key,</if>
|
|
<if test="i18nValue != null">i18n_value,</if>
|
|
<if test="pageModule != null">page_module,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="langCode != null and langCode != ''">#{langCode},</if>
|
|
<if test="i18nKey != null and i18nKey != ''">#{i18nKey},</if>
|
|
<if test="i18nValue != null">#{i18nValue},</if>
|
|
<if test="pageModule != null">#{pageModule},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateHuayangI18n" parameterType="com.ruoyi.system.domain.HuayangI18n">
|
|
UPDATE huayang_i18n
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="i18nValue != null">i18n_value = #{i18nValue},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
</trim>
|
|
WHERE i18n_id = #{i18nId}
|
|
</update>
|
|
|
|
<delete id="deleteHuayangI18nById" parameterType="Long">
|
|
DELETE FROM huayang_i18n WHERE i18n_id = #{i18nId}
|
|
</delete>
|
|
|
|
<delete id="deleteHuayangI18nByIds" parameterType="Long">
|
|
DELETE FROM huayang_i18n WHERE i18n_id IN
|
|
<foreach item="i18nId" collection="array" open="(" separator="," close=")">
|
|
#{i18nId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |