//保存商品的title public int SaveProductTitle(string productNo, string productTitle) { //判断是否存在编辑过的商品 SWfsProductRef productObj = GetProductRefByProductNO(productNo); if (productObj == null) { productObj.ProductNO = productNo; productObj.TemplateNO = ""; productObj.CreateDate = DateTime.Parse("1900-01-01 00:00:00"); productObj.EditeDate = DateTime.Parse("1900-01-01 00:00:00"); productObj.HTMLCode = ""; productObj.PublishHTML = ""; productObj.ProductTitle = productTitle; productObj.PublishTime = DateTime.Parse("1900-01-01 00:00:00"); productObj.PublishPeople = ""; productObj.EditePeople = ""; productObj.HTMLCodeMobile = ""; productObj.PublishHTMLMobile = ""; return(DapperUtil.Insert <SWfsProductRef>(productObj)); } else { return(DapperUtil.UpdatePartialColumns <SWfsProductRef>(new { RefID = productObj.RefID, ProductTitle = productTitle })?1:0); } return(DapperUtil.Execute("ComBeziWfs_SWfsProductRef_SaveProductTitle", new { ProductTitle = productTitle, ProductNO = productNo })); }
/// <summary> /// 删除上新下的商品信息 /// </summary> /// <param name="newarrivalid">上新id</param> public void DelNewProductsByNewArrivalId(string newarrivalid) { DynamicParameters dp = new DynamicParameters(); dp.Add("NewArrivalId", newarrivalid, System.Data.DbType.Int32, System.Data.ParameterDirection.Input); DapperUtil.Execute("ComBeziWfs_SWfsIndexNewArrivalProductList_DelNewProductsByNid", dp); }
/// <summary> /// 按主键删除首页推荐品牌 /// </summary> /// <param name="id">主键ID</param> /// <returns></returns> public int DeleteHomeBrand(int id) { return(DapperUtil.Execute("ComBeziWfs_SWfsSpHomeRecommendBrand_deleteHomeBrandByID", new { RecommendBrandID = id })); }
public static void UpdateListener(IEnumerable <Listener> listeners) { DapperUtil.Execute(executor => { var transaction = executor.BeginTransaction(); foreach (var listener in listeners) { executor.Execute(@" INSERT OR REPLACE INTO Listener ( ListenerId ,Name ,Color ,Author ,AccountName ) VALUES ( @ListenerId, @Name, @Color, @Author, @AccountName ); " , listener, transaction); ListenerCache[listener.ListenerId] = listener; } transaction.Commit(); }); }
//清除历史 public int ClearHistory(string userId) { return(DapperUtil.Execute("ComBeziWfs_SWfsSortHistory_DeleteSortHistoryByUserId", new { UserId = userId })); }
/// <summary> /// 删除上新信息 /// </summary> /// <param name="pkid">上新主键编号</param> /// <returns></returns> public int DelSWfsIndexNewArrivalStatus(int pkid) { return(DapperUtil.Execute("ComBeziWfs_SWfsIndexNewArrival_DelNewComming", new { NewArrivalId = pkid, })); }
//删除历史记录 public int ClearLabelHistory(string userId) { return(DapperUtil.Execute("ComBeziWfs_SWfsProductSearchHistory_DeleteProductHistory", new { SearchUser = userId })); }
public int Edit(string topicId, string action, string status = "1") { SWfsTopics t = new SWfsTopics(); int rs = 0; switch (action) { case "del": //删除 rs = DapperUtil.Execute("ComBeziWfs_SWfsTopics_DeleteTopicByTopicNo", (new { TopicNo = topicId })); break; case "switch": //开启和关闭 rs = DapperUtil.UpdatePartialColumns <SWfsTopics>(new { TopicNo = topicId, status = status }) ? 1 : 0; break; case "top": //置顶和取消 rs = DapperUtil.UpdatePartialColumns <SWfsTopics>(new { TopicNo = topicId, IsTop = (status == "1")?true:false, DateTop = DateTime.Now }) ? 1 : 0; break; } return(rs); }
public int DelAppRecommendProductById(string Id) { int result = 0; DapperUtil.Execute("ComBeziWfs_SWfsAppRecommendProduct_deleteInfoById", new { ID = Id }); return(result); }
/// <summary> /// 修改positionName /// </summary> /// <param name="PageNo"></param> /// <param name="pagePositionNo"></param> /// <param name="PagePositionName"></param> /// <param name="WebSiteNo"></param> /// <param name="IsRecommendBrand"></param> /// <returns></returns> public int UpdateRecommendBrandPositionName(string PageNo, string pagePositionNo, string PagePositionName, string WebSiteNo = "shangpin.com", string IsRecommendBrand = "0") { int result = 0; result = DapperUtil.Execute("ComBeziWfs_SWfsSpHomeRecommendBrand_UpdateHomeRecommendBrandPagePositionName", new { PagePositionName = PagePositionName, PageNo = PageNo, PagePositionNo = pagePositionNo, WebSiteNo = WebSiteNo, IsRecommendBrand = IsRecommendBrand }); return(result); }
/// <summary> /// 首页运营位复制 /// </summary> /// <param name="id">复制数据的主键ID</param> /// <param name="positionID">运营位ID</param> /// <returns></returns> public int CopySmallPagePosition(int id) { return(DapperUtil.Execute("ComBeziWfs_SWfsPictureManager_CopySmallPagePosition", new { PictureManageId = id, })); }
public int EditePositionSort(int id, int sort) { return(DapperUtil.Execute("ComBeziWfs_SWfsAppOperatingPosition_EditePositionSort", new { Sort = sort, OperatingPositionId = id })); }
//修改状态(分组表) public int AlterStatus(int groupId, int satus) { if (satus == 0) { //RedisCacheProvider.Instance.Remove("SWfsListAlterPicListByCategory" + category); } return(DapperUtil.Execute("ComBeziWfs_Brand_SWfsListAlterPic_Status", new { GroupId = groupId, Status = satus })); }
public JsonResult DeleHotProductById(string hotproductId) { if (!string.IsNullOrEmpty(hotproductId)) { DapperUtil.Execute("ComBeziWfs_SWfsHotProduct_DeleteById", new { HotProductId = hotproductId }); } return(Json(new { result = "success" })); }
/// <summary> /// 逻辑删除楼层广告图 /// </summary> /// <param name="moduleId"></param> /// <returns></returns> public int DeleteSWfsOperationPictureByPicId(int PictureManageId) { if (PictureManageId <= 0) { return(-1); } return(DapperUtil.Execute("ComBeziWfs_SWfsOperationPicture_DeleteSWfsOperationPictureByPicId", new { PictureManageId = PictureManageId })); }
/// <summary> /// 逻辑删除楼层关联图片 /// </summary> /// <param name="moduleId"></param> /// <returns></returns> public int DeleteSWfsIndexModuleRefPic(int moduleId) { if (moduleId <= 0) { return(-1); } return(DapperUtil.Execute("ComBeziWfs_SWfsOperationPicture_DeleteSWfsIndexModuleRefPic", new { ModuleId = moduleId.ToString() })); }
//保存结构名称 public int SaveParentStructName(string structName, string productNo) { return(DapperUtil.Execute("SWfsProductRefTemplate_SaveParentStructName", new { ModuleName = structName, ProductNo = productNo })); }
//使用结构的情况下保存编辑的内容 public int SaveContentByStruct(int id, string htmlCode) { return(DapperUtil.Execute("ComBeziWfs_SWfsProductRefTemplate_SaveContentByStruct", new { ProductRefTemplateID = id, TemplateHtmlCode = htmlCode })); }
public static void CreateTable() { DapperUtil.Execute(@" CREATE TABLE IF NOT EXISTS Config ( ConfigKey TEXT PRIMARY KEY NOT NULL ,Value TEXT NOT NULL ); " ); }
public static void CreateTable() { DapperUtil.Execute(@" CREATE TABLE IF NOT EXISTS Account ( AccountName TEXT PRIMARY KEY NOT NULL ,Color TEXT ); " ); }
//使用结构 public int UseStruct(string productNo, int struckId) { //使用结构 return(DapperUtil.Execute("ComBeziWfs_SWfsProductRefTemplate_UseStructById", new { ProductNo = productNo, ProductRefTemplateID = struckId })); }
//删除咨询表 public int DeleteSWfsQuestAnswer(string questAnswerId) { if (DeleteSWfsQuestAnswerRef(questAnswerId) > 0 || GetSWfsSWfsQuestAnswerRefListByQuestAnswerId(questAnswerId).Count() == 0) { UpdateSWfsQuestAnswerOperateUserId(Convert.ToInt32(questAnswerId), PresentationHelper.GetPassport().UserName); return(DapperUtil.Execute("ComBeziWfs_SWfsProductQuestAnswer_DeleteSWfsProductQuestAnswer_Delete", new { QuestAnswerId = questAnswerId })); } return(0); }
/// <summary> /// 删除热门商品信息 /// </summary> /// <param name="idstr"></param> public void DelHotProductProduct(string idstr) { foreach (string id in idstr.Split(',')) { DynamicParameters dp = new DynamicParameters(); dp.Add("ID", id, System.Data.DbType.Int32, System.Data.ParameterDirection.Input); DapperUtil.Execute("ComBeziWfs_SWfsIndexHotProductListTemp_DelHotProductProduct", dp); } }
/// <summary> /// 删除COS分类下的所有规则 /// </summary> /// <param name="OCSCategoryNo"></param> /// <returns></returns> public int DelSortRuleByCategoryNo(string OCSCategoryNo) { int result = 0; result = DapperUtil.Execute("ComBeziWfs_SWfsSortRule_DeleteSortRuleByCategoryNo", new { OcsCategoryNO = OCSCategoryNo }); return(result); }
/// <summary> /// 删除导航信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public int delNavigaInfoById(string id) { int result = 0; result = DapperUtil.Execute("ComBeziWfs_SWfsNavigationManage_DeleteNavigationSortById", new { NavigationId = id }); return(result); }
/// <summary> /// 关闭横幅广告 /// </summary> /// <param name="PageNo"></param> /// <param name="Status"></param> /// <param name="WebSiteNo"></param> /// <param name="PagePositionNo"></param> /// <returns></returns> public string ChannelBananaPicture(string PageNo, string Status, string WebSiteNo = "shangpin.com", string PagePositionNo = "BannerADHeight70") { string result = ""; if (Status == "0") { EnyimMemcachedClient.Instance.Remove("ComBeziWfs_SWfsOperationPicture_GetSWfsOperationPictureByPageNo_GetIndexOperationPicture_CHANNEL_NV003_BannerADHeight70"); } result = DapperUtil.Execute("ComBeziWfs_SWfsOperationPicture_UpdateStatusBananaPicture", new { Status = Status, PageNo = PageNo, WebSiteNo = WebSiteNo, PagePositionNo = PagePositionNo }) + ""; return(result); }
/// <summary> /// 修改上新信息 /// </summary> /// <param name="pkid">上新实体</param> /// <returns></returns> public int UpdateSWfsIndexNewArrivalManager(SWfsIndexNewArrival sWfsIndexNewArrival) { return(DapperUtil.Execute("ComBeziWfs_SWfsIndexNewArrival_UpdateManager", new { NewArrivalTitle = sWfsIndexNewArrival.NewArrivalTitle, StartDate = sWfsIndexNewArrival.StartDate, UpdateOperateUserId = sWfsIndexNewArrival.UpdateOperateUserId, UpdateDate = DateTime.Now, NewArrivalId = sWfsIndexNewArrival.NewArrivalId, })); }
/// <summary> /// 关闭上新预告 /// </summary> /// <param name="PageNo"></param> /// <returns></returns> public string ChannelNewsNotice(string PageNo, string DataState, string WebSiteNo = "shangpin.com") { string result = ""; if (DataState == "0") { EnyimMemcachedClient.Instance.Remove("ComBeziWfs_SWfsNewArrivalNotice_GetSWfsNewArrivalNotice_GetSWfsNewArrivalNoticeCHANNEL_NV003"); } result = DapperUtil.Execute("ComBeziWfs_SWfsNewArrivalNotice_UpdateStatusNewsNotice", new { DataState = DataState, PageNo = PageNo, WebSiteNo = WebSiteNo }) + ""; return(result); }
/// <summary> /// 添加App推荐产品 /// </summary> /// <param name="DTO"></param> /// <returns></returns> public int AddAppRecommendProduct(AppRecommendProductModle DTO) { int result = 0; var IsExit = DapperUtil.Query <AppRecommendProductModle>("ComBeziWfs_SWfsAppRecommendProduct_SelectInfoByProductNo", new { ProductNo = DTO.ProductNo }).ToList(); if (IsExit.Count() == 0) { result = DapperUtil.Execute("ComBeziWfs_SWfsAppRecommendProduct_InsertInfo", new { ProductNo = DTO.ProductNo, SortId = "0", CreateTime = DateTime.Now, Creator = DTO.Creator }); } return(result); }
public int AddSWfsSearchPriceInterval(SWfsSearchPriceInterval sWfsSearchPriceInterval) { return(DapperUtil.Execute("ComBeziWfs_SWfsSearchPriceInterval_Add", new { @CategoryNo = sWfsSearchPriceInterval.CategoryNo, @MinPrice = sWfsSearchPriceInterval.MinPrice, @MaxPrice = sWfsSearchPriceInterval.MaxPrice, @Status = 0, @OperatorUserId = sWfsSearchPriceInterval.OperatorUserId })); }