C# Class Discuz.Data.Posts

ファイルを表示 Open project: CyranoChen/DiscuzNT

Public Properties

Property Type Description
IPostService ICachePosts
appDBCache bool

Public Methods

Method Description
AuditPost ( int postTableId, string validatePidList, string deletePidList, string ignorePidList, string fidList ) : void

通过待验证的帖子

BanPosts ( string tableId, string postList, int invisible ) : void

屏蔽帖子内容

CancelPostRate ( string pidIdList, string posttableid ) : int
CreatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int

创建帖子

DeletePost ( string postTableId, int pid, bool chanagePostStatistic ) : int

删除指定ID的帖子

DeletePostByPosterid ( int tableId, int uid ) : void
DeletePostByUidAndDays ( int uid, int days ) : void

删除用户指定天数内的帖子

DeleteTopicByTid ( int tid, string postTableName ) : bool

删除帖子

GetFirstPostId ( int tid ) : int

获得指定主题的第一个帖子的id

GetForumLastPost ( int fid, string posttablename, int topiccount, int postcount, int lasttid, string lasttitle, string lastpost, int lastposterid, string lastposter, int todaypostcount ) : IDataReader

获取板块最后一帖

GetLastPostByFid ( int fid, string posttablename ) : IDataReader

获取主题的最后一个回复

GetLastPostByTid ( int tid, string tableName ) : Discuz.Entity.PostInfo
GetLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable

获得最后回复的帖子列表

GetMainPostInfo ( string postTableName, int tid ) : DataTable

获取主帖子信息

GetModPostCountByPidList ( string fidList, string postTableId, string pidList ) : int

获取版主有权限管理的帖子数

GetPagedLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable

获得最后回复的帖子列表,支持分页

GetPostCount ( int tid ) : int

获取指定tid的帖子总数

GetPostCount ( int fid, string postTableName ) : int

获取版块帖数

GetPostCountBeforePid ( int pid, int tid ) : int

获取指定主题下小于pid的有效帖子数

GetPostCountByPosterId ( string postTableId, int topicId, int posterId ) : int

获得指定用户回复指定主题次数

GetPostCountByUid ( int uid, string postTableName ) : int

获取用户发帖数

GetPostCountFromIndex ( string postsid ) : DataTable
GetPostCountTable ( string postsid ) : DataTable
GetPostDataTable ( string tidList, string postTableIdArray ) : DataTable

GetPostInfo ( string postTableId, int pid ) : Discuz.Entity.PostInfo
GetPostInfoByPid ( string postTableName, int pid ) : DataTable

获取帖子信息

GetPostInfoWithAttachments ( Discuz.Entity.PostpramsInfo postPramsInfo, List &attachmentList ) : Discuz.Entity.ShowtopicPagePostInfo

获取ShowtopicPagePostInfo对象与ShowtopicPageAttachmentInfo对象列表

GetPostLayer ( int currentPostTableId, int postid ) : DataTable

获取帖子登记

GetPostList ( string postList, string tableId ) : DataTable

返回帖子列表

GetPostList ( Discuz.Entity.PostpramsInfo postpramsInfo ) : List

获取指定条件的帖子DataSet

GetPostListByCondition ( string postTableName, string condition ) : DataTable

按条件获取帖子列表

GetPostTableName ( int postTableId ) : string

获取完整分表名

GetPostTree ( int tid ) : DataTable

获取指定tid的帖子DataTable

GetPosts ( int tid, int pagesize, int pageindex, string posttableid ) : DataSet

获取帖子列表

GetPostsCount ( string postTableid ) : int

获取分表帖数

GetTodayPostCount ( int fid, string postTableName ) : int

获取版块当天帖数

GetTodayPostCountByUid ( int uid, string postTableName ) : int

获取用户当天发帖数

GetTopicAuditCondition ( int fid, string poster, string title, string moderatorName, System.DateTime postDateTimeStart, System.DateTime postDateTimeEnd, System.DateTime delDateTimeStart, System.DateTime delDateTimeEnd ) : string

获取帖子审核的条件

GetTopicListByTidlist ( string posttableid, string tidlist ) : DataTable

根据主题ID列表取出主题帖子

GetTopicPostInfo ( int tid ) : Discuz.Entity.PostInfo

通过主题ID得到主帖内容,此方法可继续扩展

GetUnauditNewPostCount ( string fidList, int postTableId, int filter ) : int

获取需要审核的回复数

GetUnauditPost ( string fidList, int ppp, int pageIndex, int postTableId, int filter ) : List

获取需要审核的回复

GetUserPostCountList ( int topNumber, DateType dateType, int dateNum, string postTableName ) : List

获取用户单位时间内的发帖数

IsExistAuditTopic ( string condition ) : bool

是否存在满足条件的需要审核的帖子

IsReplier ( int tid, int uid ) : bool

判断指定用户是否是指定主题的回复者

LoadPostList ( Discuz.Entity.PostpramsInfo postpramsInfo, IDataReader reader ) : List

装载帖子列表

PassPost ( int currentPostTableId, string pidlist ) : void

通过未审核的帖子

ReSetStatistic ( int UserCount, int TopicsCount, int PostCount, string lastuserid, string lastusername ) : void

重设统计信息

ResetLastRepliesInfoOfTopics ( int postTableID ) : void

根据分表名更新主题的最后回复等信息

SearchPost ( int forumid, string posttableid, System.DateTime postdatetimeStart, System.DateTime postdatetimeEnd, string poster, bool lowerupper, string ip, string message ) : string

查询帖子的条件

UpdateMyPost ( ) : void

更新我的帖子

UpdatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int

更新指定帖子信息

UpdatePostAttachmentType ( int tid, int pid, int attType ) : int
UpdatePostPoster ( int uid, string newUserName ) : void

更新帖子作者名称

UpdatePostRate ( int pid, float rate, string posttableid ) : int

更新帖子评分

UpdatePostRateTimes ( int tid, string postidlist ) : int

更新帖子的评分值

Private Methods

Method Description
LoadSinglePostInfo ( IDataReader reader ) : Discuz.Entity.PostInfo

装帖子信息

LoadSingleShowtopicPagePostInfo ( IDataReader reader ) : Discuz.Entity.ShowtopicPagePostInfo

装载ShowtopicPagePostInfo对象

Method Details

AuditPost() public static method

通过待验证的帖子
public static AuditPost ( int postTableId, string validatePidList, string deletePidList, string ignorePidList, string fidList ) : void
postTableId int 帖子分表Id
validatePidList string 需要验证的帖子Id列表
deletePidList string 需要删除的帖子Id列表
ignorePidList string 需要忽略的帖子ID列表
fidList string 版块Id列表
return void

BanPosts() public static method

屏蔽帖子内容
public static BanPosts ( string tableId, string postList, int invisible ) : void
tableId string 分表Id
postList string 帖子Id列表
invisible int 屏蔽还是解除屏蔽
return void

CancelPostRate() public static method

public static CancelPostRate ( string pidIdList, string posttableid ) : int
pidIdList string
posttableid string
return int

CreatePost() public static method

创建帖子
public static CreatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int
postInfo Discuz.Entity.PostInfo 帖子信息
postTableId string 分表ID
return int

DeletePost() public static method

删除指定ID的帖子
public static DeletePost ( string postTableId, int pid, bool chanagePostStatistic ) : int
postTableId string 帖子所在分表Id
pid int 帖子ID
chanagePostStatistic bool 是否更新帖子数量统计
return int

DeletePostByPosterid() public static method

public static DeletePostByPosterid ( int tableId, int uid ) : void
tableId int
uid int
return void

DeletePostByUidAndDays() public static method

删除用户指定天数内的帖子
public static DeletePostByUidAndDays ( int uid, int days ) : void
uid int 用户id
days int 天数
return void

DeleteTopicByTid() public static method

删除帖子
public static DeleteTopicByTid ( int tid, string postTableName ) : bool
tid int 主题ID
postTableName string
return bool

GetFirstPostId() public static method

获得指定主题的第一个帖子的id
public static GetFirstPostId ( int tid ) : int
tid int 主题id
return int

GetForumLastPost() public static method

获取板块最后一帖
public static GetForumLastPost ( int fid, string posttablename, int topiccount, int postcount, int lasttid, string lasttitle, string lastpost, int lastposterid, string lastposter, int todaypostcount ) : IDataReader
fid int 板块id
posttablename string 分表名称
topiccount int 主题数
postcount int 回帖数
lasttid int 最后发表主题ID
lasttitle string 最后发表标题
lastpost string 最后发表时间
lastposterid int 最后发表人ID
lastposter string 最后发表人
todaypostcount int 今日发帖数
return IDataReader

GetLastPostByFid() public static method

获取主题的最后一个回复
public static GetLastPostByFid ( int fid, string posttablename ) : IDataReader
fid int 版块ID
posttablename string 分表名称
return IDataReader

GetLastPostByTid() public static method

public static GetLastPostByTid ( int tid, string tableName ) : Discuz.Entity.PostInfo
tid int
tableName string
return Discuz.Entity.PostInfo

GetLastPostDataTable() public static method

获得最后回复的帖子列表
public static GetLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
return System.Data.DataTable

GetMainPostInfo() public static method

获取主帖子信息
public static GetMainPostInfo ( string postTableName, int tid ) : DataTable
postTableName string 分表名称
tid int 主题Id
return System.Data.DataTable

GetModPostCountByPidList() public static method

获取版主有权限管理的帖子数
public static GetModPostCountByPidList ( string fidList, string postTableId, string pidList ) : int
fidList string 版块ID列表
postTableId string 分表ID
pidList string 帖子ID列表
return int

GetPagedLastPostDataTable() public static method

获得最后回复的帖子列表,支持分页
public static GetPagedLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
return System.Data.DataTable

GetPostCount() public static method

获取指定tid的帖子总数
public static GetPostCount ( int tid ) : int
tid int 帖子的tid
return int

GetPostCount() public static method

获取版块帖数
public static GetPostCount ( int fid, string postTableName ) : int
fid int 版块Id
postTableName string 分表名称
return int

GetPostCountBeforePid() public static method

获取指定主题下小于pid的有效帖子数
public static GetPostCountBeforePid ( int pid, int tid ) : int
pid int
tid int
return int

GetPostCountByPosterId() public static method

获得指定用户回复指定主题次数
public static GetPostCountByPosterId ( string postTableId, int topicId, int posterId ) : int
postTableId string 帖子分表Id
topicId int 主题Id
posterId int 用户Id
return int

GetPostCountByUid() public static method

获取用户发帖数
public static GetPostCountByUid ( int uid, string postTableName ) : int
uid int 用户Id
postTableName string 分表名称
return int

GetPostCountFromIndex() public static method

public static GetPostCountFromIndex ( string postsid ) : DataTable
postsid string
return System.Data.DataTable

GetPostCountTable() public static method

public static GetPostCountTable ( string postsid ) : DataTable
postsid string
return System.Data.DataTable

GetPostDataTable() public static method

public static GetPostDataTable ( string tidList, string postTableIdArray ) : DataTable
tidList string
postTableIdArray string
return System.Data.DataTable

GetPostInfo() public static method

public static GetPostInfo ( string postTableId, int pid ) : Discuz.Entity.PostInfo
postTableId string
pid int
return Discuz.Entity.PostInfo

GetPostInfoByPid() public static method

获取帖子信息
public static GetPostInfoByPid ( string postTableName, int pid ) : DataTable
postTableName string 分表名称
pid int 帖子Id
return System.Data.DataTable

GetPostInfoWithAttachments() public static method

获取ShowtopicPagePostInfo对象与ShowtopicPageAttachmentInfo对象列表
public static GetPostInfoWithAttachments ( Discuz.Entity.PostpramsInfo postPramsInfo, List &attachmentList ) : Discuz.Entity.ShowtopicPagePostInfo
postPramsInfo Discuz.Entity.PostpramsInfo 参数对象
attachmentList List 输出附件列表
return Discuz.Entity.ShowtopicPagePostInfo

GetPostLayer() public static method

获取帖子登记
public static GetPostLayer ( int currentPostTableId, int postid ) : DataTable
currentPostTableId int 分表ID
postid int 帖子ID
return System.Data.DataTable

GetPostList() public static method

返回帖子列表
public static GetPostList ( string postList, string tableId ) : DataTable
postList string 帖子ID
tableId string 帖子分表ID
return System.Data.DataTable

GetPostList() public static method

获取指定条件的帖子DataSet
public static GetPostList ( Discuz.Entity.PostpramsInfo postpramsInfo ) : List
postpramsInfo Discuz.Entity.PostpramsInfo
return List

GetPostListByCondition() public static method

按条件获取帖子列表
public static GetPostListByCondition ( string postTableName, string condition ) : DataTable
postTableName string 分表名称
condition string 条件
return System.Data.DataTable

GetPostTableName() public static method

获取完整分表名
public static GetPostTableName ( int postTableId ) : string
postTableId int 分表Id
return string

GetPostTree() public static method

获取指定tid的帖子DataTable
public static GetPostTree ( int tid ) : DataTable
tid int 帖子的tid
return System.Data.DataTable

GetPosts() public static method

获取帖子列表
public static GetPosts ( int tid, int pagesize, int pageindex, string posttableid ) : DataSet
tid int 主题ID
pagesize int 页面大小
pageindex int 当前页码
posttableid string 分表id
return System.Data.DataSet

GetPostsCount() public static method

获取分表帖数
public static GetPostsCount ( string postTableid ) : int
postTableid string 分表Id
return int

GetTodayPostCount() public static method

获取版块当天帖数
public static GetTodayPostCount ( int fid, string postTableName ) : int
fid int 版块Id
postTableName string 分表名称
return int

GetTodayPostCountByUid() public static method

获取用户当天发帖数
public static GetTodayPostCountByUid ( int uid, string postTableName ) : int
uid int 用户Id
postTableName string 分表名称
return int

GetTopicAuditCondition() public static method

获取帖子审核的条件
public static GetTopicAuditCondition ( int fid, string poster, string title, string moderatorName, System.DateTime postDateTimeStart, System.DateTime postDateTimeEnd, System.DateTime delDateTimeStart, System.DateTime delDateTimeEnd ) : string
fid int 版块Id
poster string 帖子作者
title string 标题
moderatorName string 版主名称
postDateTimeStart System.DateTime 主题发布起始日期
postDateTimeEnd System.DateTime 主题发布结束日期
delDateTimeStart System.DateTime 删除起始日期
delDateTimeEnd System.DateTime 删除结束日期
return string

GetTopicListByTidlist() public static method

根据主题ID列表取出主题帖子
public static GetTopicListByTidlist ( string posttableid, string tidlist ) : DataTable
posttableid string 分表ID
tidlist string 主题ID列表
return System.Data.DataTable

GetTopicPostInfo() public static method

通过主题ID得到主帖内容,此方法可继续扩展
public static GetTopicPostInfo ( int tid ) : Discuz.Entity.PostInfo
tid int
return Discuz.Entity.PostInfo

GetUnauditNewPostCount() public static method

获取需要审核的回复数
public static GetUnauditNewPostCount ( string fidList, int postTableId, int filter ) : int
fidList string 版块ID
postTableId int 分表ID
filter int 可见性过滤器
return int

GetUnauditPost() public static method

获取需要审核的回复
public static GetUnauditPost ( string fidList, int ppp, int pageIndex, int postTableId, int filter ) : List
fidList string 版块ID列表
ppp int 每页帖子书
pageIndex int 当前页数
postTableId int 分表
filter int 可见性过滤器
return List

GetUserPostCountList() public static method

获取用户单位时间内的发帖数
public static GetUserPostCountList ( int topNumber, DateType dateType, int dateNum, string postTableName ) : List
topNumber int Top条数
dateType DateType 时间类型
dateNum int 时间数
postTableName string 当前帖子分表名
return List

IsExistAuditTopic() public static method

是否存在满足条件的需要审核的帖子
public static IsExistAuditTopic ( string condition ) : bool
condition string 条件
return bool

IsReplier() public static method

判断指定用户是否是指定主题的回复者
public static IsReplier ( int tid, int uid ) : bool
tid int 主题id
uid int 用户id
return bool

LoadPostList() public static method

装载帖子列表
public static LoadPostList ( Discuz.Entity.PostpramsInfo postpramsInfo, IDataReader reader ) : List
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
reader IDataReader
return List

PassPost() public static method

通过未审核的帖子
public static PassPost ( int currentPostTableId, string pidlist ) : void
currentPostTableId int 当前表ID
pidlist string 帖子ID列表
return void

ReSetStatistic() public static method

重设统计信息
public static ReSetStatistic ( int UserCount, int TopicsCount, int PostCount, string lastuserid, string lastusername ) : void
UserCount int 用户数
TopicsCount int 主题数
PostCount int 帖子数
lastuserid string 最后注册用户ID
lastusername string 最后注册用户名称
return void

ResetLastRepliesInfoOfTopics() public static method

根据分表名更新主题的最后回复等信息
public static ResetLastRepliesInfoOfTopics ( int postTableID ) : void
postTableID int
return void

SearchPost() public static method

查询帖子的条件
public static SearchPost ( int forumid, string posttableid, System.DateTime postdatetimeStart, System.DateTime postdatetimeEnd, string poster, bool lowerupper, string ip, string message ) : string
forumid int
posttableid string
postdatetimeStart System.DateTime
postdatetimeEnd System.DateTime
poster string
lowerupper bool
ip string
message string
return string

UpdateMyPost() public static method

更新我的帖子
public static UpdateMyPost ( ) : void
return void

UpdatePost() public static method

更新指定帖子信息
public static UpdatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int
postInfo Discuz.Entity.PostInfo 帖子信息
postTableId string
return int

UpdatePostAttachmentType() public static method

public static UpdatePostAttachmentType ( int tid, int pid, int attType ) : int
tid int
pid int
attType int
return int

UpdatePostPoster() public static method

更新帖子作者名称
public static UpdatePostPoster ( int uid, string newUserName ) : void
uid int 要更新的帖子作者的Uid
newUserName string 作者的新用户名
return void

UpdatePostRate() public static method

更新帖子评分
public static UpdatePostRate ( int pid, float rate, string posttableid ) : int
pid int
rate float
posttableid string
return int

UpdatePostRateTimes() public static method

更新帖子的评分值
public static UpdatePostRateTimes ( int tid, string postidlist ) : int
tid int 主题ID
postidlist string 帖子ID列表
return int

Property Details

IPostService public_oe static_oe property

public static ICachePosts IPostService
return ICachePosts

appDBCache public_oe static_oe property

是否启用缓存帖子表
public static bool appDBCache
return bool