public bool MultiUpdate(string mapId, List <MapReleationInputDto> listInput, string user) { try { _IMapReleationRepository.Delete(x => x.MapID == mapId); if (listInput != null) { foreach (var input in listInput) { MapReleationDto dto = Insert(input); } } List <string> layers = listInput.Select(t => t.DataConfigID).ToList(); UpdateMap(mapId, layers); _IOperateLogAppService.WriteOperateLog(mapId, user, 1002, 1102, 1201, 1441, null); return(true); } catch (Exception ex) { _IOperateLogAppService.WriteOperateLog(mapId, user, 1002, 1102, 1202, 1442, null); return(false); } }
/// <summary> /// 删除数据 /// </summary> public bool Delete(string id, string user) { try { #region [删除标签关系数据] _ITagReleationRepository.Delete(x => x.MapID == id); #endregion #region [删除地图关系表] _IMapReleationRepository.Delete(x => x.MapID == id); #endregion #region [删除GeoServer地图] DeleteMap(id); #endregion #region [删除地图元数据] _IMapMetaDataRepository.Delete(x => x.MapID == id); #endregion _IMapRepository.Delete(id); _IOperateLogAppService.WriteOperateLog(id, user, 1002, 1105, 1201, 1421, null); return(true); } catch (Exception ex) { _IOperateLogAppService.WriteOperateLog(id, user, 1002, 1105, 1202, 1422, null); return(false); } }