2024-09-28 20:34:13 +08:00
|
|
|
<?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="cn.bunny.services.mapper.I18nMapper">
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.i18n.I18n">
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
<result column="key_name" property="keyName"/>
|
|
|
|
<result column="translation" property="translation"/>
|
|
|
|
<result column="type_id" property="typeId"/>
|
|
|
|
<result column="create_user" property="createUser"/>
|
|
|
|
<result column="update_user" property="updateUser"/>
|
|
|
|
<result column="update_time" property="updateTime"/>
|
|
|
|
<result column="create_time" property="createTime"/>
|
|
|
|
<result column="is_deleted" property="isDeleted"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
id, key_name, translation, type_id, create_user, update_user, update_time, create_time, is_deleted
|
|
|
|
</sql>
|
|
|
|
|
2024-09-29 23:46:44 +08:00
|
|
|
<!-- 物理删除多语言 -->
|
|
|
|
<delete id="deleteBatchIdsWithPhysics">
|
|
|
|
delete
|
|
|
|
from sys_i18n
|
|
|
|
where id in
|
|
|
|
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
|
2024-09-29 16:51:50 +08:00
|
|
|
<!-- 多语言和多语言类型 -->
|
|
|
|
<select id="selectListWithI18nType" resultType="cn.bunny.dao.entity.i18n.I18nWithI18nType">
|
|
|
|
select i18n.*, i18n_type.type_name
|
|
|
|
from sys_i18n i18n,
|
|
|
|
sys_i18n_type i18n_type
|
|
|
|
where i18n.type_id = i18n_type.id
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 分页查询多语言内容 -->
|
|
|
|
<select id="selectListByPage" resultType="cn.bunny.dao.entity.i18n.I18n">
|
|
|
|
select *
|
|
|
|
from sys_i18n
|
|
|
|
<if test="dto.keyName != null and dto.keyName != ''">
|
|
|
|
key_name like CONCAT('%',#{dto.keyName},'%')
|
|
|
|
</if>
|
|
|
|
<if test="dto.translation != null and dto.translation != ''">
|
|
|
|
translation like CONCAT('%',#{dto.translation},'%')
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
2024-09-28 20:34:13 +08:00
|
|
|
</mapper>
|