mirror of https://gitee.com/stylefeng/roses
【7.6.0】【dict】更新字典常量位置的划分
parent
dbf5651621
commit
2dd81814e7
|
@ -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";
|
||||
|
||||
}
|
|
@ -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<List<SimpleDict>> getAllLanguages() {
|
||||
List<SimpleDict> dictDetailsByDictTypeCode = dictApi.getDictDetailsByDictTypeCode(DictConstants.LANGUAGES_DICT_TYPE_CODE);
|
||||
List<SimpleDict> dictDetailsByDictTypeCode = dictApi.getDictDetailsByDictTypeCode(I18nConstants.LANGUAGES_DICT_TYPE_CODE);
|
||||
return new SuccessResponseData<>(dictDetailsByDictTypeCode);
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue