cqpCow 10 月之前
父节点
当前提交
802a6a61d3
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      app/Service/DeleteService.php

+ 7 - 6
app/Service/DeleteService.php

@@ -213,13 +213,14 @@ class DeleteService extends Service
 
     public function fpConstructionMan($data,$user){
         $time = time();
-        if(! empty($data['man'])){
-            //负责人清除
-            ConstructionInfo::where('del_time',0)
-                ->where('construction_id',$data['id'])
-                ->where('type', CustomerInfo::type_three)
-                ->update(['del_time' => $time]);
 
+        //负责人清除
+        ConstructionInfo::where('del_time',0)
+            ->where('construction_id',$data['id'])
+            ->where('type', ConstructionInfo::type_three)
+            ->update(['del_time' => $time]);
+
+        if(! empty($data['man'])){
             $insert = [];
             foreach ($data['man'] as $value){
                 $insert[] = [