|
@@ -491,6 +491,25 @@ class MobileController extends UserApi
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 判断数据有无
|
|
|
+ $mobile_ids = [];
|
|
|
+ foreach ($esData['data'] as $dv){
|
|
|
+ $mobile_ids[] = $dv['id'];
|
|
|
+ }
|
|
|
+ $mobile_db_ids=Mobile::whereIn('id',$mobile_ids)->column('id');
|
|
|
+ // es 需要删除的id
|
|
|
+ $mobile_ids_es_del = array_diff($mobile_ids,$mobile_db_ids);
|
|
|
+ if($mobile_ids_es_del){
|
|
|
+ EsMobileService::delMobiles($mobile_ids_es_del);
|
|
|
+ user_log("EsMobileService_indexList_delByMobile", $mobile_ids_es_del);
|
|
|
+ //foreach ($esData['data'] as $idk => $idv){
|
|
|
+ // if(in_array($idv['id'],$mobile_ids_es_del)){
|
|
|
+ // unset($esData['data'][$idk]);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
$this->success('',$esData);
|
|
|
}
|
|
|
/**
|