mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
1、新增菜单翻译接口、获取菜单接口新增菜单名国际化能力;2、新增字典数据标签翻译接口、字典获取接口修改为一次性返回所有语言数据、新增字典数据国际化版本查询/更新接口、新增字典数据国际化缓存;
This commit is contained in:
@@ -98,4 +98,11 @@ spring:
|
||||
repositories:
|
||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
||||
|
||||
trans:
|
||||
config:
|
||||
appId: 20251110002494620
|
||||
securityKey: _CUXY5Hk4WLBnYRQBcWw
|
||||
apiHost: https://fanyi-api.baidu.com/api/trans/vip/translate
|
||||
|
||||
|
||||
debug: false
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?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.cf.imes.module.system.dal.mysql.dict.DictDataI18nMapper">
|
||||
<select id="getLocaleDictData" resultType="com.cf.imes.module.system.dal.dataobject.dict.DictDataDO">
|
||||
select
|
||||
d.dict_type,
|
||||
i.label,
|
||||
d.value,
|
||||
d.color_type,
|
||||
d.css_class
|
||||
from system_dict_data d
|
||||
left join system_dict_data_i18n i
|
||||
on d.id = i.dict_data_id and i.locale = #{locale}
|
||||
where d.deleted = false
|
||||
and d.status = '${@com.cf.imes.framework.common.enums.CommonStatusEnum@ENABLE.status}'
|
||||
<if test="ids != null and !ids.isEmpty()">
|
||||
and d.id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?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.cf.imes.module.system.dal.mysql.dict.DictDataI18nVersionMapper">
|
||||
|
||||
<update id="updateVersion">
|
||||
update system_dict_data_i18n_version set version = version + 1;
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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.cf.imes.module.system.dal.mysql.permission.MenuMapper">
|
||||
<select id="selectListIn" resultType="com.cf.imes.module.system.dal.dataobject.permission.MenuDO">
|
||||
SELECT
|
||||
m.id,
|
||||
<if test="language != null">
|
||||
i.menu_name AS name,
|
||||
</if>
|
||||
<if test="language == null">
|
||||
m.name,
|
||||
</if>
|
||||
m.permission,
|
||||
m.type,
|
||||
m.sort,
|
||||
m.parent_id AS parentId,
|
||||
m.path,
|
||||
m.icon,
|
||||
m.component,
|
||||
m.component_name AS componentName,
|
||||
m.status,
|
||||
m.visible,
|
||||
m.keep_alive AS keepAlive,
|
||||
m.always_show AS alwaysShow,
|
||||
m.description,
|
||||
m.source_type AS sourceType
|
||||
FROM system_menu m
|
||||
<if test="language != null">
|
||||
LEFT JOIN system_menu_i18n i
|
||||
ON m.id = i.menu_id
|
||||
AND i.locale = #{language}
|
||||
</if>
|
||||
WHERE 1=1
|
||||
|
||||
<if test="ids != null and !ids.isEmpty()">
|
||||
AND m.id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="isManage">
|
||||
AND m.source_type != '${@com.cf.imes.module.system.enums.permission.MenuSourceTypeEnum@PRODUCTION.type}'
|
||||
</if>
|
||||
<if test="!isManage">
|
||||
AND (
|
||||
m.source_type IS NULL
|
||||
OR m.source_type != '${@com.cf.imes.module.system.enums.permission.MenuSourceTypeEnum@MANAGEMENT.type}'
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user