|
|
|
@ -2,11 +2,14 @@ package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.*;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.dto.SysMenuDTO;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.SerializeTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ModelEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.model.platform.CommonTreeModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.*;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
@ -14,12 +17,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import static cn.estsh.i3plus.platform.common.util.CommonConstWords.RESOURCE_PREFIX_MENU;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description :
|
|
|
|
|
* @Reference :
|
|
|
|
@ -747,6 +749,27 @@ public class CoreMemTreeService implements ICoreMemTreeService {
|
|
|
|
|
return sysMenuDTOList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<SysOrganize> setLanguageSysMenuName(String languageCode, List<SysOrganize> menuList) {
|
|
|
|
|
languageCode = StringUtils.isNotBlank(languageCode) ? languageCode : CommonConstWords.DEFAULT_LANGUAGE;
|
|
|
|
|
Map<String, String> localeResourceMap = SysMenuService.MEM_CACHE_LANGAGE.get(languageCode);
|
|
|
|
|
|
|
|
|
|
if (menuList != null && localeResourceMap != null) {
|
|
|
|
|
List<SysOrganize> resultList = (List<SysOrganize>) SerializeTool.copyObject(menuList);
|
|
|
|
|
|
|
|
|
|
for (SysOrganize menu : resultList) {
|
|
|
|
|
if (menu != null) {
|
|
|
|
|
if (StringUtils.isNotBlank(menu.getName())) {
|
|
|
|
|
String menuName = localeResourceMap.get(RESOURCE_PREFIX_MENU + menu.getName());
|
|
|
|
|
menu.setName(StringUtils.isNotBlank(menuName) ? menuName : menu.getName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return resultList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return menuList;
|
|
|
|
|
}
|
|
|
|
|
/********************************************* End SysMenu Tree *********************************************/
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|