/// <summary> /// 修改oem站点设置信息 /// </summary> /// <param name="oem"></param> public static void UpdateDistributionOEMSetting(Domain.OemSetting setting, Guid oemid, string operatorAccount) { var oem = OEMService.QueryOEMById(oemid); var repository = Factory.CreateDistributionOEMRepository(); using (var tran = new TransactionScope()) { if (oem.Setting.Id == Guid.Empty) { setting.Id = Guid.NewGuid(); repository.InsertSetting(setting, oemid); repository.InsertOEMLinks(setting.Id, setting.FooterLinks); repository.InsertOEMLinks(setting.Id, setting.HeaderLinks); } else { setting.Id = oem.Setting.Id; repository.UpdateSetting(setting); repository.InsertOEMLinks(setting.Id, setting.FooterLinks); repository.InsertOEMLinks(setting.Id, setting.HeaderLinks); } tran.Complete(); } saveUpdateLog("OEM站点设置信息", oem.Setting.ToString(), setting.ToString(), OperatorRole.User, oem.Setting.Id.ToString(), oem.OperatorAccount); }
public static void UpdateOemInfo(Domain.DistributionOEM oem, string operatorAccount) { var distibutionOEM = OEMService.QueryOEMById(oem.Id); if (distibutionOEM.DomainName != oem.DomainName && CheckExsistDomainName(oem.DomainName)) { throw new InvalidOperationException("系统中已存在指定的域名。"); } string orginalContent = string.Format("OEMId:{0},OEM名称:{1},授权域名:{2},授权到期:{3},授权保证金:{4},配置来源:{5}", distibutionOEM.Id, distibutionOEM.SiteName, distibutionOEM.DomainName, distibutionOEM.EffectTime, distibutionOEM.AuthCashDeposit, distibutionOEM.UseB3BConfig ? "使用平台配置" : "使用单独配置"); string newContent = string.Format("OEMId:{0},OEM名称:{1},授权域名:{2},授权到期:{3},授权保证金:{4},配置来源:{5}", oem.Id, oem.SiteName, oem.DomainName, oem.EffectTime, oem.AuthCashDeposit, oem.UseB3BConfig ? "使用平台配置" : "使用单独配置"); var repository = Factory.CreateDistributionOEMRepository(); repository.UpdateOemInfo(oem); saveUpdateLog("OEM授权信息", orginalContent, newContent, OperatorRole.Platform, oem.Id.ToString(), operatorAccount); }