wugg 3 years ago
parent
commit
da4e18fbea
1 changed files with 5 additions and 5 deletions
  1. 5 5
      application/Admin/controller/Stock2.php

+ 5 - 5
application/Admin/controller/Stock2.php

@@ -120,7 +120,7 @@ class Stock2 extends Base
         if($id==""){
             return error_show(1004,"参数id 不能为空");
         }
-        $video_sn = db::name("video")->where(["id"=>$id])->find();
+        $video_sn = db::name("video")->where(["id"=>$id,"is_del"=>0])->find();
         if(empty($video_sn)){
             return error_show(1005,"未找到视频编号");
         }
@@ -149,7 +149,7 @@ class Stock2 extends Base
 
             return error_show(1001,'参数ID 不能为空');
         }
-        $act = Db::name("video")->where(["id"=>$id])->find();
+        $act = Db::name("video")->where(["id"=>$id,"is_del"=>0])->find();
         if(empty($act)){
             return error_show(1001,"未找到视频");
         }
@@ -198,12 +198,12 @@ class Stock2 extends Base
         if($id==""){
             return error_show(1005,"参数id不能为空");
         }
-        $in = Db::name("video")->where(["id"=>$id])->find();
+        $in = Db::name("video")->where(["id"=>$id,"is_del"=>0])->find();
         //var_dump($in);
         if(empty($in)){
             return error_show(1004,"视频不存在");
         }
-        $weight = isset($this->post['weight'])&&$this->post['weight']!==""?trim($this->post['weight']):$in["weight "];
+        $weight = isset($this->post['weight'])&&$this->post['weight']!==""?$this->post['weight']:$in["weight"];
 
 
         $video_name = isset($this->post['video_name']) ? trim($this->post['video_name']) : "";
@@ -249,7 +249,7 @@ class Stock2 extends Base
         if($id==""){
             return error_show(1005,"参数id不能为空");
         }
-        $list = Db::name("video")->where(["id"=>$id])->find();
+        $list = Db::name("video")->where(["id"=>$id,"is_del"=>0])->find();
         if(empty($list)){
             return error_show(1004,"未找到数据");
         }