lyhzzz 2 anni fa
parent
commit
a81fa0783d

+ 6 - 3
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -422,10 +422,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         for (SceneVo record : sceneList.getRecords()) {
             record.setUserName(username);
             SceneCooperation sceneCooperationEntity = sceneCooperationService.getByNum(record.getNum());
-            if(sceneCooperationEntity != null){
-                record.setCooperationUserId(String.valueOf(sceneCooperationEntity.getUserId()));
+            if(sceneCooperationEntity != null && sceneCooperationEntity.getUserId()!= null){
+
                 User user1 = userService.getById(sceneCooperationEntity.getUserId());
-                record.setCooperationUserName(user1.getUserName());
+                if(user1 != null){
+                    record.setCooperationUserId(String.valueOf(sceneCooperationEntity.getUserId()));
+                    record.setCooperationUserName(user1.getUserName());
+                }
             }
         }
         return PageInfo.PageInfo(sceneList);