/// <summary> /// 编辑户型定价 /// </summary> /// <param name="houseTypePrices">户型定价集(户型定价Id|单价)</param> /// <param name="operatorId">操作人</param> /// <param name="operator">操作人</param> public void UpdateHouseTypePrice(Dictionary <Guid, decimal> houseTypePrices, Guid operatorId, string @operator) { houseTypePrices = houseTypePrices ?? new Dictionary <Guid, decimal>(); houseTypePrices.ForEach(houseType => { HouseTypePrice houseTypePrice = this._unitOfWork.Resolve <HouseTypePrice>(houseType.Key); //TODO 是否校验 houseTypePrice.UpdateUnitPrice(houseType.Value, operatorId, @operator); this._unitOfWork.RegisterSave(houseTypePrice); }); this._unitOfWork.UnitedCommit(); }
/// <summary> /// 户型定价映射 /// </summary> /// <param name="houseTypePrice">户型定价领域模型</param> /// <returns>户型定价数据传输对象</returns> public static HouseTypePriceInfo ToDTO(this HouseTypePrice houseTypePrice) { HouseTypePriceInfo houseTypePriceInfo = Transform <HouseTypePrice, HouseTypePriceInfo> .Map(houseTypePrice); return(houseTypePriceInfo); }