lyhzzz 3 years ago
parent
commit
45f3c8eca5

+ 4 - 0
src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusVoidServiceImpl.java

@@ -47,6 +47,10 @@ public class ScenePlusVoidServiceImpl extends ServiceImpl<IScenePlusVoidMapper,
         if(plusId == null || type == null){
             throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
         }
+        ScenePlus scenePlus = scenePlusService.getById(plusId);
+        if(scenePlus == null){
+            throw new BusinessException(-1,"场景不存在");
+        }
         if(type == 0){
             User user = userService.getByToken(token);
             ScenePlusVoid plusVoid = new ScenePlusVoid();