Jelajahi Sumber

【智价云】 违规清洗配置删除校验更新2

tangyuanwang 1 hari lalu
induk
melakukan
a2545badb7

+ 2 - 2
app/Models/Manager/WashConfig/LowPriceGoods.php

@@ -203,9 +203,9 @@ class LowPriceGoods extends Model
         DB::beginTransaction();
         try {
             $LowPriceGoodsCompanyModel = new LowPriceGoodsCompanyModel();
-            $company_id_log = $LowPriceGoodsCompanyModel->where('company_id', $LowProduct->id)->get();
+            $company_id_log = $LowPriceGoodsCompanyModel->where('lowprice_product_logid', $LowProduct->id)->get();
             if (!empty($company_id_log)) {
-                $LowPriceGoodsCompanyModel->where('company_id', $LowProduct->id)->delete();
+                $LowPriceGoodsCompanyModel->where('lowprice_product_logid', $LowProduct->id)->delete();
             }
             $LowProduct->delete();
             DB::commit();

+ 2 - 2
app/Models/Manager/WashConfig/ViolationProduct.php

@@ -199,9 +199,9 @@ class ViolationProduct extends Model
         DB::beginTransaction();
         try {
             $ViolationProductCompanyModel = new ViolationProductCompanyModel();
-            $company_id_log = $ViolationProductCompanyModel->where('company_id', $ViolationProduct->id)->get();
+            $company_id_log = $ViolationProductCompanyModel->where('violation_product_logid', $ViolationProduct->id)->get();
             if (!empty($company_id_log)) {
-                $ViolationProductCompanyModel->where('company_id', $ViolationProduct->id)->delete();
+                $ViolationProductCompanyModel->where('violation_product_logid', $ViolationProduct->id)->delete();
             }
             $ViolationProduct->delete();
             DB::commit();