【7.6.0】【dict】更新字典常量位置的划分

pull/57/head
fengshuonan 2023-06-27 21:31:48 +08:00
parent dbf5651621
commit 2dd81814e7
3 changed files with 18 additions and 12 deletions

View File

@ -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";
}

View File

@ -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);
}

View File

@ -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";
}