|
@@ -132,10 +132,6 @@ public class DictAspect {
|
|
}
|
|
}
|
|
((IPage) ((Result) result).getResult()).setRecords(items);
|
|
((IPage) ((Result) result).getResult()).setRecords(items);
|
|
}else if(((Result) result).getResult() instanceof PageInfo){
|
|
}else if(((Result) result).getResult() instanceof PageInfo){
|
|
- //返回类型为 pageInfo list
|
|
|
|
- /* if (((Result) result).getResult() instanceof List) {
|
|
|
|
- return;
|
|
|
|
- }*/
|
|
|
|
List<JSONObject> items = new ArrayList<>();
|
|
List<JSONObject> items = new ArrayList<>();
|
|
for (Object record : ((Result<PageInfo>) result).getResult().getList()){
|
|
for (Object record : ((Result<PageInfo>) result).getResult().getList()){
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
@@ -153,9 +149,17 @@ public class DictAspect {
|
|
String code = field.getAnnotation(Dict.class).dicCode();
|
|
String code = field.getAnnotation(Dict.class).dicCode();
|
|
String text = field.getAnnotation(Dict.class).dicText();
|
|
String text = field.getAnnotation(Dict.class).dicText();
|
|
String table = field.getAnnotation(Dict.class).dictTable();
|
|
String table = field.getAnnotation(Dict.class).dictTable();
|
|
|
|
+ String extendsKey = field.getAnnotation(Dict.class).extendsKey();
|
|
|
|
+ if("".equals(extendsKey.trim())){
|
|
|
|
+ extendsKey = null;
|
|
|
|
+ }
|
|
|
|
+ String extendsValue = field.getAnnotation(Dict.class).extendsValue();
|
|
|
|
+ if("".equals(extendsValue.trim())){
|
|
|
|
+ extendsValue = null;
|
|
|
|
+ }
|
|
String key = String.valueOf(item.get(field.getName()));
|
|
String key = String.valueOf(item.get(field.getName()));
|
|
//翻译字典值对应的txt
|
|
//翻译字典值对应的txt
|
|
- String textValue = translateDictValue(code, text, table, key,null,null);
|
|
|
|
|
|
+ String textValue = translateDictValue(code, text, table, key,extendsKey,extendsValue);
|
|
log.debug(" 字典Val : "+ textValue);
|
|
log.debug(" 字典Val : "+ textValue);
|
|
log.debug(" __翻译字典字段__ "+field.getName() + CommonConstant.DICT_TEXT_SUFFIX+": "+ textValue);
|
|
log.debug(" __翻译字典字段__ "+field.getName() + CommonConstant.DICT_TEXT_SUFFIX+": "+ textValue);
|
|
item.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue);
|
|
item.put(field.getName() + CommonConstant.DICT_TEXT_SUFFIX, textValue);
|