C# Class Discuz.Data.Posts

Afficher le fichier Open project: CyranoChen/DiscuzNT

Méthodes publiques

Свойство Type Description
IPostService ICachePosts
appDBCache bool

Méthodes publiques

Méthode 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

Méthode Description
LoadSinglePostInfo ( IDataReader reader ) : Discuz.Entity.PostInfo

装帖子信息

LoadSingleShowtopicPagePostInfo ( IDataReader reader ) : Discuz.Entity.ShowtopicPagePostInfo

装载ShowtopicPagePostInfo对象

Method Details

AuditPost() public static méthode

通过待验证的帖子
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列表
Résultat void

BanPosts() public static méthode

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

CancelPostRate() public static méthode

public static CancelPostRate ( string pidIdList, string posttableid ) : int
pidIdList string
posttableid string
Résultat int

CreatePost() public static méthode

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

DeletePost() public static méthode

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

DeletePostByPosterid() public static méthode

public static DeletePostByPosterid ( int tableId, int uid ) : void
tableId int
uid int
Résultat void

DeletePostByUidAndDays() public static méthode

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

DeleteTopicByTid() public static méthode

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

GetFirstPostId() public static méthode

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

GetForumLastPost() public static méthode

获取板块最后一帖
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 今日发帖数
Résultat IDataReader

GetLastPostByFid() public static méthode

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

GetLastPostByTid() public static méthode

public static GetLastPostByTid ( int tid, string tableName ) : Discuz.Entity.PostInfo
tid int
tableName string
Résultat Discuz.Entity.PostInfo

GetLastPostDataTable() public static méthode

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

GetMainPostInfo() public static méthode

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

GetModPostCountByPidList() public static méthode

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

GetPagedLastPostDataTable() public static méthode

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

GetPostCount() public static méthode

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

GetPostCount() public static méthode

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

GetPostCountBeforePid() public static méthode

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

GetPostCountByPosterId() public static méthode

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

GetPostCountByUid() public static méthode

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

GetPostCountFromIndex() public static méthode

public static GetPostCountFromIndex ( string postsid ) : DataTable
postsid string
Résultat System.Data.DataTable

GetPostCountTable() public static méthode

public static GetPostCountTable ( string postsid ) : DataTable
postsid string
Résultat System.Data.DataTable

GetPostDataTable() public static méthode

public static GetPostDataTable ( string tidList, string postTableIdArray ) : DataTable
tidList string
postTableIdArray string
Résultat System.Data.DataTable

GetPostInfo() public static méthode

public static GetPostInfo ( string postTableId, int pid ) : Discuz.Entity.PostInfo
postTableId string
pid int
Résultat Discuz.Entity.PostInfo

GetPostInfoByPid() public static méthode

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

GetPostInfoWithAttachments() public static méthode

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

GetPostLayer() public static méthode

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

GetPostList() public static méthode

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

GetPostList() public static méthode

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

GetPostListByCondition() public static méthode

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

GetPostTableName() public static méthode

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

GetPostTree() public static méthode

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

GetPosts() public static méthode

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

GetPostsCount() public static méthode

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

GetTodayPostCount() public static méthode

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

GetTodayPostCountByUid() public static méthode

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

GetTopicAuditCondition() public static méthode

获取帖子审核的条件
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 删除结束日期
Résultat string

GetTopicListByTidlist() public static méthode

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

GetTopicPostInfo() public static méthode

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

GetUnauditNewPostCount() public static méthode

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

GetUnauditPost() public static méthode

获取需要审核的回复
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 可见性过滤器
Résultat List

GetUserPostCountList() public static méthode

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

IsExistAuditTopic() public static méthode

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

IsReplier() public static méthode

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

LoadPostList() public static méthode

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

PassPost() public static méthode

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

ReSetStatistic() public static méthode

重设统计信息
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 最后注册用户名称
Résultat void

ResetLastRepliesInfoOfTopics() public static méthode

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

SearchPost() public static méthode

查询帖子的条件
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
Résultat string

UpdateMyPost() public static méthode

更新我的帖子
public static UpdateMyPost ( ) : void
Résultat void

UpdatePost() public static méthode

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

UpdatePostAttachmentType() public static méthode

public static UpdatePostAttachmentType ( int tid, int pid, int attType ) : int
tid int
pid int
attType int
Résultat int

UpdatePostPoster() public static méthode

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

UpdatePostRate() public static méthode

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

UpdatePostRateTimes() public static méthode

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

Property Details

IPostService public_oe static_oe property

public static ICachePosts IPostService
Résultat ICachePosts

appDBCache public_oe static_oe property

是否启用缓存帖子表
public static bool appDBCache
Résultat bool