WXF 3 yıl önce
ebeveyn
işleme
af142351d3

+ 4 - 4
simulation-resource-server/src/main/java/com/css/simulation/resource/system/service/UserService.java

@@ -41,10 +41,10 @@ public class UserService {
     public UserVO getCurrentUserInfo() {
         String userId = AuthUtil.getCurrentUserId();
         UserVO userVO = userMapper.getUserInfo(userId);
-        Map<String, String> useTypeDictMap = dictService.getDictMapByType(DictConstants.USE_TYPE);
-        userVO.setUseTypeName(useTypeDictMap.get(userVO.getUseType()));
-        Map<String, String> roleCodeDictMap = dictService.getDictMapByType(DictConstants.ROLE_CODE);
-        userVO.setRoleCodeName(roleCodeDictMap.get(userVO.getRoleCode()));
+        //字典翻译
+        Map<String, Map<String, String>> dictMaps = dictService.getDictMapsByTypes(DictConstants.USE_TYPE + "," + DictConstants.ROLE_CODE);
+        userVO.setUseTypeName(dictMaps.get(DictConstants.USE_TYPE).get(userVO.getUseType()));
+        userVO.setRoleCodeName(dictMaps.get(DictConstants.ROLE_CODE).get(userVO.getRoleCode()));
         return userVO;
     }