public void UpdateHousesLngLat(List <DBHouse> houses) { LogHelper.RunActionTaskNotThrowEx(() => { foreach (var house in houses) { _newHouseDapper.UpdateLngLat(house); } }); }
public void UpdateHousesLngLat(List <HousesLatLng> houses) { LogHelper.RunActionTaskNotThrowEx(() => { foreach (var house in houses) { _houseDapper.UpdateLngLat(house); _houseMongoMapper.UpdateHousesLngLat(house); } }); }
public void UpdateLngLat(string houseId, string lng, string lat) { if (string.IsNullOrEmpty(lat) || string.IsNullOrEmpty(lng)) { throw new Exception("lat and lng not empty."); } var house = FindById(houseId); if (house == null) { throw new Exception($"{houseId} not found."); } house.Latitude = lat; house.Longitude = lng; _newHouseDapper.UpdateLngLat(house); var redisKey = RedisKey.HouseDetail; _redisTool.WriteObject(redisKey.Key + houseId, house, redisKey.DBName, (int)redisKey.ExpireTime.TotalMinutes); }