/// <summary> /// 高级网店审核 /// </summary> /// <param name="info">高级网店申请审核信息业务实体</param> /// <returns>1:成功 0:失败 2:域名重复 3:有效期限时间值不对</returns> public int EshopChecked(EyouSoft.Model.SystemStructure.EshopCheckInfo info) { if (string.IsNullOrEmpty(info.ApplyId) || info.ApplyState == EyouSoft.Model.SystemStructure.ApplyServiceState.未审核) { return(0); } info.ExpireTime = info.ExpireTime.AddDays(1).AddSeconds(-1); if (info.EnableTime > info.ExpireTime || info.EnableTime == DateTime.MinValue || info.ExpireTime == DateTime.MinValue) { return(3); } EyouSoft.Model.SystemStructure.SysApplyServiceInfo apply = GetApplyInfo(info.ApplyId); if (apply != null) { if (!string.IsNullOrEmpty(info.DomainName)) { EyouSoft.Cache.Facade.EyouSoftCache.Remove(EyouSoft.CacheTag.System.SystemDomain + info.DomainName.ToLower()); } EyouSoft.Cache.Facade.EyouSoftCache.Remove(EyouSoft.CacheTag.Company.CompanyState + apply.CompanyId); } return(dal.EshopChecked(info)); }
protected void AuditShop() { int applyState = Utils.GetInt(Utils.GetQueryStringValue("applystate")); EyouSoft.Model.SystemStructure.EshopCheckInfo shopinfo = new EyouSoft.Model.SystemStructure.EshopCheckInfo(); DateTime StartDate = Utils.GetDateTime(Request.QueryString["enableDate"], DateTime.Now); DateTime EndDate = Utils.GetDateTime(Request.QueryString["expireDate"], DateTime.Now); shopinfo.ApplyId = Utils.GetQueryStringValue("id"); shopinfo.EnableTime = StartDate; shopinfo.ExpireTime = EndDate;; shopinfo.DomainName = Utils.GetString(Request.QueryString["url"], "").Replace("http://", ""); shopinfo.TemplatePath = this.GetEShopTemplatePath((EyouSoft.Model.CompanyStructure.CompanyType)Utils.GetInt(Utils.GetQueryStringValue("cType"))); shopinfo.GoogleMapKey = Utils.GetString(Request.QueryString["googleMapKey"], ""); string shopCompanyId = Utils.InputText(Request.QueryString["shopCompanyId"]); if (applyState != 3) { if (applyState == 1) { if (!(StartDate <= EndDate && StartDate >= Convert.ToDateTime(NowDate))) { Utils.ResponseMeg(false, "有效期填写错误!"); return; } } shopinfo.ApplyState = (EyouSoft.Model.SystemStructure.ApplyServiceState)applyState; shopinfo.CheckTime = DateTime.Now; shopinfo.OperatorId = MasterUserInfo.ID; } else { shopinfo.ApplyState = EyouSoft.Model.SystemStructure.ApplyServiceState.审核通过; shopinfo.CheckTime = Utils.GetDateTime(Request.QueryString["checkDate"], DateTime.Now); shopinfo.OperatorId = Utils.GetInt(Request.QueryString["operatorId"]); } switch (EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().EshopChecked(shopinfo)) { case 1: int row = EyouSoft.BLL.AdvStructure.Adv.CreateInstance().UpdateAdv(shopCompanyId, shopinfo.DomainName); Utils.ResponseMeg(true, "操作成功!"); break; case 0: Utils.ResponseMeg(false, "操作失败"); break; case 2: Utils.ResponseMeg(false, "域名重复!"); break; case 3: Utils.ResponseMeg(false, "有效期限时间值错误!"); break; } shopinfo = null; }
/// <summary> /// /// </summary> private void ApplyServiceTest() { int recordCount = 0; EyouSoft.Model.SystemStructure.SysApplyServiceInfo info = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo(); info.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop; info.ApplyText = "www.g.com"; info.ApplyTime = DateTime.Now; info.CityId = 1; info.CityName = "aq"; info.CompanyId = "bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4"; info.CompanyName = "company name"; info.ContactAddress = "company address"; info.ContactMobile = "15888888888"; info.ContactMQ = "10000"; info.ContactName = "contact name"; info.ContactQQ = "10000"; info.ContactTel = "057188888888"; info.ProvinceId = 1; info.ProvinceName = "ah"; info.UserId = "916b9d06-72e7-410c-8cd9-a8859d04c85e"; EyouSoft.IBLL.SystemStructure.ISysApplyService bll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance(); bll.Apply(info); bll.GetApplyInfo("d63d71cb-f1c4-4317-b944-9bf8884aa41f"); Response.Write(bll.GetApplys(10, 1, ref recordCount, EyouSoft.Model.CompanyStructure.SysService.HighShop, null, null, null, null, null, null).Count); Response.Write(bll.GetApplyState("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop)); Response.Write(bll.IsApply("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop)); EyouSoft.Model.SystemStructure.EshopCheckInfo checkinfo = new EyouSoft.Model.SystemStructure.EshopCheckInfo(); checkinfo.ApplyId = "d63d71cb-f1c4-4317-b944-9bf8884aa41f"; checkinfo.ApplyState = EyouSoft.Model.SystemStructure.ApplyServiceState.审核通过; checkinfo.CheckTime = DateTime.Now; checkinfo.DomainName = "www.google.com"; checkinfo.EnableTime = Convert.ToDateTime("2010-01-01"); checkinfo.ExpireTime = Convert.ToDateTime("2010-01-31"); checkinfo.OperatorId = 1; Response.Write(bll.EshopChecked(checkinfo)); /*Response.Write(bll.Renewed("d63d71cb-f1c4-4317-b944-9bf8884aa41f", Convert.ToDateTime("2010-02-01") * , Convert.ToDateTime("2010-08-28"), 1, DateTime.Now));*/ }
/// <summary> /// 高级网店审核 /// </summary> /// <param name="info">高级网店申请审核信息业务实体</param> /// <returns>1:成功 0:失败 2:域名重复</returns> public virtual int EshopChecked(EyouSoft.Model.SystemStructure.EshopCheckInfo info) { DbCommand cmd = this.SystemStore.GetStoredProcCommand("proc_SysApplyService_EshopChecked"); this.SystemStore.AddInParameter(cmd, "ApplyId", DbType.String, info.ApplyId); this.SystemStore.AddInParameter(cmd, "EnableTime", DbType.DateTime, info.EnableTime); this.SystemStore.AddInParameter(cmd, "ExpireTime", DbType.DateTime, info.ExpireTime); this.SystemStore.AddInParameter(cmd, "ApplyState", DbType.Byte, info.ApplyState); this.SystemStore.AddInParameter(cmd, "CheckTime", DbType.DateTime, info.CheckTime); this.SystemStore.AddInParameter(cmd, "OperatorId", DbType.Int32, info.OperatorId); this.SystemStore.AddInParameter(cmd, "DomainName", DbType.String, info.DomainName); this.SystemStore.AddInParameter(cmd, "RenewalId", DbType.String, Guid.NewGuid().ToString()); this.SystemStore.AddOutParameter(cmd, "Result", DbType.Int32, 4); this.SystemStore.AddInParameter(cmd, "TemplatePath", DbType.String, info.TemplatePath); this.SystemStore.AddInParameter(cmd, "GoogleMapKey", DbType.String, info.GoogleMapKey); DbHelper.RunProcedure(cmd, this.SystemStore); return(Convert.ToInt32(this.SystemStore.GetParameterValue(cmd, "Result"))); }