Simon 1 年間 前
コミット
1de0ee2739

+ 3 - 9
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserProfileServiceImpl.java

@@ -66,16 +66,10 @@ public class TUserProfileServiceImpl implements ITUserProfileService {
     @Override
     public List<TUserProfile> selectTUserProfileList(TUserProfile tUserProfile) {
         List<TUserProfile> tUserProfileList = tUserProfileMapper.selectTUserProfileList(tUserProfile);
-        List<TUserProfile> userProfiles = new ArrayList<>();
-        if (tUserProfileList != null && !tUserProfileList.isEmpty()) {
-            userProfiles = tUserProfileList.stream().map(
-                    mapper -> {
-                        mapper.setTEmergentPeopleList(tEmergentPeopleMapper.selectTEmergentPeopleByProfileId(mapper.getId()));
-                        return mapper;
-                    }
-            ).collect(Collectors.toList());
+        for (TUserProfile list : tUserProfileList) {
+            list.setTEmergentPeopleList(tEmergentPeopleMapper.selectTEmergentPeopleByProfileId(list.getId()));
         }
-        return userProfiles;
+        return tUserProfileList;
     }
 
     /**