/** * 删除 * @param $id * @return bool */ public function delete($id) { $config = $this->di->get('appConfig')->amap->lbs_cloud; $key = $config->key; $signKey = $config->sign_key; $tableId = $config->table_id; $syncLogTableName = 'beauty_parlor_amap_sync_log'; $lbsColud = new LBSCloud($key, $signKey, $tableId, $syncLogTableName); // 获取已经同步的数据 $aMapData = BeautyParlorAmap::findFirst("source_id={$id}"); if ($aMapData) { $result = $lbsColud->delete($id, $aMapData->amap_data_id); if ($result) { $aMapData->delete(); } } return false; }