소스 검색

Merge branch 'wugg-dev' of wugg/phpstock into version1.5

wugg 2 년 전
부모
커밋
ae906be727
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      app/admin/controller/Goodup.php

+ 15 - 0
app/admin/controller/Goodup.php

@@ -522,6 +522,11 @@ class Goodup extends Base
         if($data==false){
             return error_show(1004,"未找到商品数据");
         }
+        $data = Db::name("good_platform")->where(["spuCode"=>$supcode,"is_del"=>0])->where("exam_status","<>",8)
+            ->find();
+        if($data!=false){
+            return error_show(1004,"存在未下线商品数据");
+        }
         $good_name= isset($this->post['good_name'])&&$this->post['good_name']!="" ? trim($this->post['good_name']):"";
         if($good_name==""){
             return error_show(1004,"商品名称不能为空");
@@ -774,6 +779,11 @@ class Goodup extends Base
         if($datas==false){
             return error_show(1004,"未找到商品数据");
         }
+        $is_down = Db::name("good_platform")->where(["spuCode"=>$supcode,"is_del"=>0])->where("exam_status","<>",8)
+            ->find();
+        if($is_down!=false){
+            return error_show(1004,"存在未下线商品数据");
+        }
         $cert_fee = isset($this->post['cert_fee'])&&$this->post['cert_fee']!==""? floatval($this->post['cert_fee']):"0";
         $packing_fee = isset($this->post['packing_fee'])&&$this->post['packing_fee']!==""? floatval($this->post['packing_fee']):"0";
         $cost_fee = isset($this->post['cost_fee'])&&$this->post['cost_fee']!==""? floatval($this->post['cost_fee']):"0";
@@ -1758,6 +1768,11 @@ class Goodup extends Base
         if($data==false){
             return error_show(1004,"未找到商品数据");
         }
+        $is_down = Db::name("good_platform")->where(["spuCode"=>$supcode,"is_del"=>0])->where("exam_status","<>",8)
+            ->find();
+        if($is_down!=false){
+            return error_show(1004,"存在未下线商品数据");
+        }
         if ($data['status'] != 6 && $data['status'] != 7 && $data['status'] != 8) {
             return error_show(1004,"商品状态有误");
         }