cqp пре 1 месец
родитељ
комит
59e8bda4a1
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      app/Service/EmployeeService.php

+ 2 - 3
app/Service/EmployeeService.php

@@ -1771,7 +1771,7 @@ class EmployeeService extends Service
 
     public function departSetDaHuangFengID($data,$user){
         if(empty($data['top_depart_id'])) return [false, '请选择门店'];
-        if(empty($data['clueSourceId'])) return [false, '请填写大黄蜂clueSourceId'];
+        if(! isset($data['clueSourceId'])) return [false, 'clueSourceId不存在'];
 
         $dhf_map = DepartWithDHF::where('del_time',0)
             ->whereIn('clueSourceId',$data['clueSourceId'])
@@ -1798,7 +1798,6 @@ class EmployeeService extends Service
             }
         }
         if(! empty($msg)) return [false, rtrim($msg,',')];
-        if(empty($insert)) return [false, '暂无需要写入的数据'];
 
         //删除
         DepartWithDHF::where('del_time',0)
@@ -1806,7 +1805,7 @@ class EmployeeService extends Service
             ->update(['del_time' => $time]);
 
         //写入
-        DepartWithDHF::insert($insert);
+        if(! empty($insert)) DepartWithDHF::insert($insert);
 
         return [true, ''];
     }