diff --git a/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/constants/I18nConstants.java b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/constants/I18nConstants.java new file mode 100644 index 000000000..71f15523a --- /dev/null +++ b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/constants/I18nConstants.java @@ -0,0 +1,16 @@ +package cn.stylefeng.roses.kernel.i18n.modular.constants; + +/** + * 多语言模块的常量 + * + * @author fengshuonan + * @since 2023/6/27 21:31 + */ +public interface I18nConstants { + + /** + * 多语言字典类型编码 + */ + String LANGUAGES_DICT_TYPE_CODE = "languages"; + +} diff --git a/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/controller/UserTranslationController.java b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/controller/UserTranslationController.java index eaa98f3fe..bcc69bbd6 100644 --- a/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/controller/UserTranslationController.java +++ b/kernel-d-i18n/i18n-business/src/main/java/cn/stylefeng/roses/kernel/i18n/modular/controller/UserTranslationController.java @@ -28,9 +28,9 @@ import cn.stylefeng.roses.kernel.auth.api.SessionManagerApi; import cn.stylefeng.roses.kernel.auth.api.context.LoginContext; import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser; import cn.stylefeng.roses.kernel.dict.api.DictApi; -import cn.stylefeng.roses.kernel.dict.api.constants.DictConstants; import cn.stylefeng.roses.kernel.i18n.api.context.TranslationContext; import cn.stylefeng.roses.kernel.i18n.api.pojo.request.TranslationRequest; +import cn.stylefeng.roses.kernel.i18n.modular.constants.I18nConstants; import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum; import cn.stylefeng.roses.kernel.rule.pojo.dict.SimpleDict; import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; @@ -70,7 +70,7 @@ public class UserTranslationController { */ @GetResource(name = "获取所有的多语言类型编码", path = "/i18n/getAllLanguages", requiredPermission = false) public ResponseData> getAllLanguages() { - List dictDetailsByDictTypeCode = dictApi.getDictDetailsByDictTypeCode(DictConstants.LANGUAGES_DICT_TYPE_CODE); + List dictDetailsByDictTypeCode = dictApi.getDictDetailsByDictTypeCode(I18nConstants.LANGUAGES_DICT_TYPE_CODE); return new SuccessResponseData<>(dictDetailsByDictTypeCode); } diff --git a/kernel-s-dict/dict-api/src/main/java/cn/stylefeng/roses/kernel/dict/api/constants/DictConstants.java b/kernel-s-dict/dict-api/src/main/java/cn/stylefeng/roses/kernel/dict/api/constants/DictConstants.java index a3cd4e934..5238f869e 100644 --- a/kernel-s-dict/dict-api/src/main/java/cn/stylefeng/roses/kernel/dict/api/constants/DictConstants.java +++ b/kernel-s-dict/dict-api/src/main/java/cn/stylefeng/roses/kernel/dict/api/constants/DictConstants.java @@ -42,19 +42,9 @@ public interface DictConstants { */ String DICT_EXCEPTION_STEP_CODE = "13"; - /** - * 默认字典根节点的id - */ - Long DEFAULT_DICT_PARENT_ID = -1L; - /** * 系统配置分组code */ String CONFIG_GROUP_DICT_TYPE_CODE = "config_group"; - /** - * 多语言 - */ - String LANGUAGES_DICT_TYPE_CODE = "languages"; - }