using System; using System.Collections.Generic; using System.Text; using System.Data; using Song.Entities; using WeiSha.Data; namespace Song.ServiceInterfaces { /// /// 网站内容的管理 /// public interface IContents : WeiSha.Common.IBusinessInterface { #region 新闻文章的管理 /// /// 添加新闻文章 /// /// 业务实体 int ArticleAdd(Article entity); /// /// 修改新闻文章 /// /// 业务实体 void ArticleSave(Article entity); /// /// 使当前文章浏览计数加一,仅传入id,返回浏览数,效率更高 /// /// 新闻文章的id /// 每次浏览增加几个数 /// int ArticleAddNumber(int id, int addNum); /// /// 删除 /// /// 业务实体 void ArticleDelete(Article entity); /// /// 删除 /// /// 文章实体 /// 事务对象 void ArticleDelete(Article entity, DbTrans tran); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void ArticleDelete(int identify); /// /// 删除所有新闻文章 /// /// 机构id /// 栏目id void ArticleDeleteAll(int orgid, int colid); /// /// 标准文章是否处于删除状态,即进入回收站 /// /// void ArticleIsDelete(int identify); /// /// 文章还原,从回收站回到文章列表 /// /// void ArticleRecover(int identify); /// /// 通过审核 /// /// 文章id /// 审核人 void ArticlePassVerify(int identify, string verMan); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Article ArticleSingle(int identify); /// /// 当前新闻的上一条新闻 /// /// /// Article ArticlePrev(int identify, int orgid); /// /// 当前新闻的下一条新闻 /// /// /// Article ArticleNext(int identify, int orgid); /// /// 当前新闻所在的专题 /// /// /// Special[] Article4Special(int identify); /// /// 按新闻栏目获取新闻文章 /// /// 机构id /// 栏目id,如果id小于0,则取全部 /// 获取记录数 /// 获取类别,默认null取最新置顶的优先,hot热点优先,flux流量最大优先,img为图片新闻 /// Article[] ArticleCount(int orgid, int colId, int topNum, string order); /// /// 统计文章数量 /// /// /// /// int ArticleOfCount(int orgid, int colId); /// /// 分页获取新闻 /// /// 机构id /// 栏目id,如果id小于0,则取全部< /// 是否显示 /// 按标题检索 /// /// /// /// Article[] ArticlePager(int orgid, int? colid, bool? isShow, string searTxt, int size, int index, out int countSum); /// /// 按栏目,标题,是否审核来分页 /// /// 机构id /// /// 是否审核 /// 是否删除 /// /// /// /// /// Article[] ArticlePager(int orgid, int? colid, bool? isVerify, bool? isDel, string searTxt, int size, int index, out int countSum); /// /// 分页获取新闻 /// /// 机构id /// 新闻栏目 /// 按标题的检索的字符串 /// 是否审核 /// 是否删除 /// 是否置顶 /// 是否热点 /// 是否推荐 /// 是否是图片新闻 /// /// /// /// Article[] ArticlePager(int orgid, int? colid, string searTxt, bool? isVerify, bool? isDel, bool? isTop, bool? isHot, bool? isRec, bool? isImg, int size, int index, out int countSum); #endregion #region 新闻专题管理 /// /// 添加新闻专题 /// /// 业务实体 int SpecialAdd(Special entity); /// /// 修改 /// /// 业务实体 void SpecialSave(Special entity); /// /// 删除 /// /// 业务实体 void SpecialDelete(Special entity); /// /// 删除,按主键ID; /// /// 实体的主键 void SpecialDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Special SpecialSingle(int identify); /// /// 当前专题所辖的文章 /// /// /// /// Article[] Special4Article(int identify, string searTxt); /// /// 当前专题所辖的文章 /// /// 专题id /// 检索的信息 /// 取多少条 /// 获取类别,默认null取最新置顶的优先,hot热点优先,maxFlux流量最大优先 /// Article[] Special4Article(int identify, string searTxt, int num, string type); /// /// 取新闻专题 /// /// 机构id /// /// /// 取多少条 /// Special[] SpecialCount(int orgid, bool? isShow, bool? isUse, int count); /// /// 将当前项目向上移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool SpecialUp(int orgid, int id); /// /// 将当前项目向下移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool SpecialDown(int orgid, int id); /// /// 创建专题与文章的关联 /// /// /// /// bool SpecialAndArticle(int spId, int artId); /// /// 删除专题与文章的关联 /// /// /// /// bool SpecialAndArticleDel(int spId, int artId); /// /// 专题列表 /// /// /// /// /// /// Special[] SpecialPager(string searTxt, int size, int index, out int countSum); /// /// 专题下的文章列表 /// /// 专题id /// /// /// /// /// Article[] SpecialArticlePager(int spId, string searTxt, int size, int index, out int countSum); Article[] SpecialArticlePager(int spId, string searTxt, int size, int index, out int countSum, bool? isShow, bool? isUse); Article[] SpecialArticlePager(int spId, string searTxt, int size, int index, out int countSum, bool? isDel, bool? isShow, bool? isUse); Article[] SpecialArticle(int spId, string searTxt, int count); /// /// 专题下的文章 /// /// 专题Id /// 检索的字符 /// 是否删除 /// 是否显示 /// 是否使用 /// 取多少条,小于等于0,取所有 /// 获取类别,默认null取最新置顶的优先,hot热点优先,maxFlux流量最大优先 /// Article[] SpecialArticle(int spId, string searTxt, bool? isDel, bool? isShow, bool? isUse, int count, string type); #endregion #region 新闻评论管理 /// /// 添加 /// /// 业务实体 int NoteAdd(NewsNote entity); /// /// 修改 /// /// 业务实体 void NoteSave(NewsNote entity); /// /// 删除,按主键ID; /// /// 实体的主键 void NoteDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// NewsNote NoteSingle(int identify); /// /// 新闻的评论 /// /// 新闻id /// 是否显示 /// /// NewsNote[] NoteCount(int artid, bool? isShow, int count); /// /// 文章的评论 /// /// 文章id /// /// /// /// /// /// NewsNote[] NotePager(int artid, string searTxt, bool? isShow, int size, int index, out int countSum); #endregion #region 图片信息的管理 /// /// 添加 /// /// 业务实体 int PictureAdd(Picture entity); /// /// 修改 /// /// 业务实体 void PictureSave(Picture entity); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void PictureDelete(int identify); void PictureDelete(Picture entity); /// /// 删除所有图片 /// /// 机构id /// 栏目id void PictureDeleteAll(int orgid, int colid); /// /// 标注是否处于删除状态,即进入回收站 /// /// void PictureIsDelete(int identify); /// /// 图片还原,从回收站回到列表 /// /// void PictureRecover(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Picture PictureSingle(int identify); /// /// 设置当前图片为相册封面 /// /// 所属栏目的id /// 当前图片的Id void PictureSetCover(int colid, int pid); void PictureSetCover(string uid, int pid); /// /// 获取图片信息 /// /// 栏目id /// 是否删除 /// 是否显示 /// 检索信息 /// 获取多少条 /// Picture[] PictureCount(int orgid, int? colid, bool? isDel, bool? isShow, string searTxt, int count); Picture[] PictureCount(int orgid, string uid, bool? isDel, bool? isShow, string searTxt, int count); /// /// 按分类分页 /// /// 栏目id /// /// /// /// Picture[] PicturePager(int orgid, int? colid, bool? isDel, string searTxt, int size, int index, out int countSum); Picture[] PicturePager(int orgid, int? colid, bool? isDel, bool? isShow, string searTxt, int size, int index, out int countSum); Picture[] PicturePager(int orgid, int? colid, bool? isDel, bool? isShow, string searTxt, bool? isHot, bool? isRec, bool? isTop, int size, int index, out int countSum); #endregion #region 产品管理 /// /// 添加 /// /// 业务实体 int ProductAdd(Product entity); /// /// 修改 /// /// 业务实体 void ProductSave(Product entity); /// /// 将当前项目向上移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool ProductUp(int orgid, int id); /// /// 将当前项目向下移动;仅在当前对象的同层移动,即同一父节点下的对象这前移动; /// /// /// 如果已经处于顶端,则返回false;移动成功,返回true bool ProductDown(int orgid, int id); /// /// 使当前产品浏览计数加一 /// /// 产品的id /// 每次浏览增加几个数 /// int ProductNumber(int id, int addNum); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void ProductDelete(int identify); /// /// 批量删除 /// /// 机构id /// 栏目分类id void ProductDeleteAll(int orgid, int colid); /// /// 标准文章是否处于删除状态,即进入回收站 /// /// void ProductIsDelete(int identify); /// /// 文章还原,从回收站回到文章列表 /// /// void ProductRecover(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Product ProductSingle(int identify); /// /// 获取单一实体对象,按全局唯一值UID; /// /// 全局唯一值 /// Product ProductSingle(string uid); /// /// 按栏目分页 /// /// 栏目id,为空则返回所有 /// /// /// /// Product[] ProductPager(int orgid, int? colid, int size, int index, out int countSum); Product[] ProductPager(int orgid, int? colid, string searTxt, bool? isDel, int size, int index, out int countSum); /// /// 按栏目分页 /// /// 栏目id /// 要检索的信息 /// 是否删除的 /// 是否使用的 /// 按类别排序,最热hot,最新new,推荐rec,浏览器flux /// /// /// /// Product[] ProductPager(int orgid, int? colid, string searTxt, bool? isDel, bool? isUse, bool? isNew, bool? isRec, string type, int size, int index, out int countSum); /// /// 获取产品列表,不分页 /// /// /// /// /// /// 按类别取,最热hot,最新new,推荐rec /// Product[] ProductCount(int orgid, int? colid, int count, bool? isDel, bool? isUse, string type); #endregion #region 资源信息的管理 #region 资源 /// /// 添加 /// /// 业务实体 int DownloadAdd(Download entity); /// /// 修改 /// /// 业务实体 void DownloadSave(Download entity); /// /// 使当前下载的浏览计数加一,仅传入id,返回浏览数,效率更高 /// /// 下载信息的id /// 每次浏览增加几个数 /// int DownloadNumber(int id, int addNum); /// /// 使当前下载信息的下载量加一 /// /// 文件名 /// 每次增加几个数 /// int DownloadNumber(string file, int addNum); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void DownloadDelete(int identify); void DownloadDelete(Download entity); /// /// 删除所有 /// /// 机构id /// 栏目id void DownloadDeleteAll(int orgid, int colid); /// /// 标准文章是否处于删除状态,即进入回收站 /// /// void DownloadIsDelete(int identify); /// /// 文章还原,从回收站回到文章列表 /// /// void DownloadRecover(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Download DownloadSingle(int identify); /// /// 获取单一实体对象,按全局唯一; /// /// /// Download DownloadSingle(string uid); /// /// 分页返回 /// /// /// /// /// /// /// /// Download[] DownloadPager(int orgid, int? colid, bool? isDel, string searTxt, int size, int index, out int countSum); /// /// /// /// /// 排序的类别,按热点hot,按推荐rec,按置顶top,按最新new,按流量flux /// /// /// /// /// /// Download[] DownloadPager(int orgid, int? colid, string type, bool? isDel, bool? isShow, int size, int index, out int countSum); Download[] DownloadPager(int orgid, int? colid, string searTxt, string type, bool? isDel, bool? isShow, bool? isHot, bool? isRec, bool? isTop, int size, int index, out int countSum); /// /// 获取下载资料的信息 /// /// 分类id,为0取所有信息 /// 排序的类别,按热点hot,按推荐rec,按置顶top,按最新new,按流量flux /// /// /// /// Download[] DownloadCount(int orgid, int? colid, string type, bool? isDel, bool? isShow, int count); #endregion #region 下载的资源分类 /// /// 添加 /// /// 业务实体 int DownloadTypeAdd(DownloadType entity); /// /// 修改 /// /// 业务实体 void DownloadTypeSave(DownloadType entity); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void DownloadTypeDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// DownloadType DownloadTypeSingle(int identify); /// /// 取多少条记录 /// /// /// /// DownloadType[] DownloadTypeCount(int orgid, bool? isUse, int count); /// /// 上移 /// /// /// bool DownloadTypeUp(int orgid, int identify); /// /// 下移 /// /// /// bool DownloadTypeDown(int orgid, int identify); #endregion #region 适用的系统 /// /// 添加下载中的适用系统 /// /// 业务实体 int DownloadOSAdd(DownloadOS entity); /// /// 修改下载中的适用系统 /// /// 业务实体 void DownloadOSSave(DownloadOS entity); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void DownloadOSDelete(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// DownloadOS DownloadOSSingle(int identify); /// /// 取多少条记录 /// /// /// /// DownloadOS[] DownloadOSCount(int orgid, bool? isUse, int count); /// /// 上移 /// /// /// bool DownloadOSUp(int orgid, int identify); /// /// 下移 /// /// /// bool DownloadOSDown(int orgid, int identify); #endregion #endregion #region 视频信息的管理 /// /// 添加 /// /// 业务实体 int VideoAdd(Video entity); /// /// 修改 /// /// 业务实体 void VideoSave(Video entity); /// /// 彻底删除,按主键ID; /// /// 实体的主键 void VideoDelete(int identify); void VideoDelete(Video entity); /// /// 删除所有 /// /// 机构id /// 栏目分类id void VideoDeleteAll(int orgid, int colid); /// /// 标注是否处于删除状态,即进入回收站 /// /// void VideoIsDelete(int identify); /// /// 视频还原,从回收站回到列表 /// /// void VideoRecover(int identify); /// /// 获取单一实体对象,按主键ID; /// /// 实体的主键 /// Video VideoSingle(int identify); /// /// 设置当前视频为相册封面 /// /// 当前分类 /// 当前视频的Id void VideoSetCover(int colid, int vid); /// /// 获取视频信息 /// /// 视频分类 /// 是否删除 /// 是否显示 /// 检索信息 /// 获取多少条 /// Video[] VideoCount(int orgid, int? colid, bool? isDel, bool? isShow, string searTxt, int count); Video[] VideoPager(int orgid, int? colid, int size, int index, out int countSum); /// /// 按分类分页 /// /// 视频分类 /// /// /// /// Video[] VideoPager(int orgid, int? colid, bool? isDel, string searTxt, int size, int index, out int countSum); Video[] VideoPager(int orgid, int? colid, bool? isDel, bool? isShow, string searTxt, int size, int index, out int countSum); Video[] VideoPager(int orgid, int? colid, bool? isDel, bool? isShow, bool? isHot, bool? isRec, bool? isTop, string searTxt, int size, int index, out int countSum); #endregion } }