Commit 38c71722 LN

BUG修改

1 个父辈 7d620292
...@@ -326,14 +326,18 @@ public class LanguageMsgService { ...@@ -326,14 +326,18 @@ public class LanguageMsgService {
List<String> allLanList=getAllLanList(); List<String> allLanList=getAllLanList();
for (String lanType : for (String lanType :
allLanList) { allLanList) {
String oldValue = oldMsg.getContent(lanType); String oldValue = oldMsg.getContent(lanType);
if (isNeedUpdate || ObjectUtil.isEmpty(oldValue)) { String newValue=msg.getContent(lanType);
oldMsg.setContent(lanType, msg.getContent(lanType)); if(ObjectUtil.isNotEmpty(newValue)){
isUpdate = true; if (isNeedUpdate || ObjectUtil.isEmpty(oldValue)) {
//内容默认更改为中文 oldMsg.setContent(lanType, newValue);
if (lanType.equals(MessageUtils.ZH_CN)) { isUpdate = true;
if (!oldMsg.getMsg().equals(oldValue)) { //内容默认更改为中文
oldMsg.setMsg(oldValue); if (lanType.equals(MessageUtils.ZH_CN)) {
if (!oldMsg.getMsg().equals(newValue)) {
oldMsg.setMsg(newValue);
}
} }
} }
} }
......
...@@ -125,6 +125,9 @@ public class MessageUtils { ...@@ -125,6 +125,9 @@ public class MessageUtils {
} }
private static String getMessage(String msgKey, String lanType, String defaultMsg) { private static String getMessage(String msgKey, String lanType, String defaultMsg) {
if(ObjectUtil.isEmpty(msgKey)){
return defaultMsg;
}
if (msgMap != null&&msgMap.containsKey(smfcore)) { if (msgMap != null&&msgMap.containsKey(smfcore)) {
LanguageMsg msg = msgMap.get(smfcore).get(msgKey); LanguageMsg msg = msgMap.get(smfcore).get(msgKey);
if (msg != null) { if (msg != null) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!