Explorar o código

Merge branch '20250522_diywebfr'

15313670163 hai 2 días
pai
achega
b1a095c09e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/JsonRpc/PublicRpcService.php

+ 2 - 2
app/JsonRpc/PublicRpcService.php

@@ -1340,7 +1340,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         $data['sector_code'] = json_encode($sector_code);
         Db::beginTransaction();
         try {
-            $com_sector = SectorComponent::where('sector_id', $data['sector_id'])->pluck('component_id');
+            $com_sector = SectorComponent::where('sector_id', $sector['sector_id'])->pluck('component_id');
             if(empty($com_sector)){
                 Db::rollBack();
                 return Result::error('通栏解除组件关联失败!');
@@ -1350,7 +1350,7 @@ class PublicRpcService implements PublicRpcServiceInterface
             //         Db::rollBack();
             //         return Result::error('通栏解除组件关联失败!');
             // }
-            $del_SectorComponent = SectorComponent::where('sector_id', $data['sector_id'])->delete();
+            $del_SectorComponent = SectorComponent::where('sector_id', $sector['sector_id'])->delete();
             if(empty($del_SectorComponent)){
                 Db::rollBack();
                 return Result::error('通栏解除组件关联失败!');