fix: 翻译判断数据字段不为空的时候查表
This commit is contained in:
+5
-2
@@ -258,10 +258,13 @@ public class TranslationAspect {
|
|||||||
if (k.trim().length() == 0) {
|
if (k.trim().length() == 0) {
|
||||||
continue; //跳过循环
|
continue; //跳过循环
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(table)) {
|
if (!StringUtils.isEmpty(table) && StrUtil.isNotBlank(text)) {
|
||||||
tmpValue = commonAPI.queryTableDictTextByKey(table, text, code, k.trim());
|
tmpValue = commonAPI.queryTableDictTextByKey(table, text, code, k.trim());
|
||||||
} else {
|
} else {
|
||||||
List<SysDictItemCore> listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemValue(), k.trim())).collect(Collectors.toList());
|
List<SysDictItemCore> listNew = listDict.stream()
|
||||||
|
.filter(o -> Objects.equals(o.getDictCode(), code) &&
|
||||||
|
Objects.equals(o.getItemValue(), k.trim()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(listNew)) {
|
if (!CollectionUtils.isEmpty(listNew)) {
|
||||||
tmpValue = listNew.get(0).getItemText();
|
tmpValue = listNew.get(0).getItemText();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user