|
|
@@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
|
+import com.fdkankan.common.constant.ErrorCode;
|
|
|
+import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.DateExtUtil;
|
|
|
import com.fdkankan.deploy.bean.SceneDeployBean;
|
|
|
import com.fdkankan.deploy.entity.Scene;
|
|
|
@@ -361,4 +363,13 @@ public class SceneServiceImpl extends ServiceImpl<SceneMapper, Scene> implements
|
|
|
}
|
|
|
return ResultData.ok(one.getStatus());
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void delete(String num) {
|
|
|
+ Scene scene = lambdaQuery().eq(Scene::getNum, num).one();
|
|
|
+ if(scene == null){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_5005.code(), "场景不存在或者已被删除");
|
|
|
+ }
|
|
|
+ this.removeById(scene.getId());
|
|
|
+ }
|
|
|
}
|