lyhzzz 3 年之前
父節點
當前提交
45f3c8eca5
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusVoidServiceImpl.java

+ 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();