C# Класс Discuz.Data.Posts

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
IPostService ICachePosts
appDBCache bool

Открытые методы

Метод Описание
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

更新帖子的评分值

Приватные методы

Метод Описание
LoadSinglePostInfo ( IDataReader reader ) : Discuz.Entity.PostInfo

装帖子信息

LoadSingleShowtopicPagePostInfo ( IDataReader reader ) : Discuz.Entity.ShowtopicPagePostInfo

装载ShowtopicPagePostInfo对象

Описание методов

AuditPost() публичный статический Метод

通过待验证的帖子
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列表
Результат void

BanPosts() публичный статический Метод

屏蔽帖子内容
public static BanPosts ( string tableId, string postList, int invisible ) : void
tableId string 分表Id
postList string 帖子Id列表
invisible int 屏蔽还是解除屏蔽
Результат void

CancelPostRate() публичный статический Метод

public static CancelPostRate ( string pidIdList, string posttableid ) : int
pidIdList string
posttableid string
Результат int

CreatePost() публичный статический Метод

创建帖子
public static CreatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int
postInfo Discuz.Entity.PostInfo 帖子信息
postTableId string 分表ID
Результат int

DeletePost() публичный статический Метод

删除指定ID的帖子
public static DeletePost ( string postTableId, int pid, bool chanagePostStatistic ) : int
postTableId string 帖子所在分表Id
pid int 帖子ID
chanagePostStatistic bool 是否更新帖子数量统计
Результат int

DeletePostByPosterid() публичный статический Метод

public static DeletePostByPosterid ( int tableId, int uid ) : void
tableId int
uid int
Результат void

DeletePostByUidAndDays() публичный статический Метод

删除用户指定天数内的帖子
public static DeletePostByUidAndDays ( int uid, int days ) : void
uid int 用户id
days int 天数
Результат void

DeleteTopicByTid() публичный статический Метод

删除帖子
public static DeleteTopicByTid ( int tid, string postTableName ) : bool
tid int 主题ID
postTableName string
Результат bool

GetFirstPostId() публичный статический Метод

获得指定主题的第一个帖子的id
public static GetFirstPostId ( int tid ) : int
tid int 主题id
Результат int

GetForumLastPost() публичный статический Метод

获取板块最后一帖
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 今日发帖数
Результат IDataReader

GetLastPostByFid() публичный статический Метод

获取主题的最后一个回复
public static GetLastPostByFid ( int fid, string posttablename ) : IDataReader
fid int 版块ID
posttablename string 分表名称
Результат IDataReader

GetLastPostByTid() публичный статический Метод

public static GetLastPostByTid ( int tid, string tableName ) : Discuz.Entity.PostInfo
tid int
tableName string
Результат Discuz.Entity.PostInfo

GetLastPostDataTable() публичный статический Метод

获得最后回复的帖子列表
public static GetLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
Результат System.Data.DataTable

GetMainPostInfo() публичный статический Метод

获取主帖子信息
public static GetMainPostInfo ( string postTableName, int tid ) : DataTable
postTableName string 分表名称
tid int 主题Id
Результат System.Data.DataTable

GetModPostCountByPidList() публичный статический Метод

获取版主有权限管理的帖子数
public static GetModPostCountByPidList ( string fidList, string postTableId, string pidList ) : int
fidList string 版块ID列表
postTableId string 分表ID
pidList string 帖子ID列表
Результат int

GetPagedLastPostDataTable() публичный статический Метод

获得最后回复的帖子列表,支持分页
public static GetPagedLastPostDataTable ( Discuz.Entity.PostpramsInfo postpramsInfo ) : DataTable
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
Результат System.Data.DataTable

GetPostCount() публичный статический Метод

获取指定tid的帖子总数
public static GetPostCount ( int tid ) : int
tid int 帖子的tid
Результат int

GetPostCount() публичный статический Метод

获取版块帖数
public static GetPostCount ( int fid, string postTableName ) : int
fid int 版块Id
postTableName string 分表名称
Результат int

GetPostCountBeforePid() публичный статический Метод

获取指定主题下小于pid的有效帖子数
public static GetPostCountBeforePid ( int pid, int tid ) : int
pid int
tid int
Результат int

GetPostCountByPosterId() публичный статический Метод

获得指定用户回复指定主题次数
public static GetPostCountByPosterId ( string postTableId, int topicId, int posterId ) : int
postTableId string 帖子分表Id
topicId int 主题Id
posterId int 用户Id
Результат int

GetPostCountByUid() публичный статический Метод

获取用户发帖数
public static GetPostCountByUid ( int uid, string postTableName ) : int
uid int 用户Id
postTableName string 分表名称
Результат int

GetPostCountFromIndex() публичный статический Метод

public static GetPostCountFromIndex ( string postsid ) : DataTable
postsid string
Результат System.Data.DataTable

GetPostCountTable() публичный статический Метод

public static GetPostCountTable ( string postsid ) : DataTable
postsid string
Результат System.Data.DataTable

GetPostDataTable() публичный статический Метод

public static GetPostDataTable ( string tidList, string postTableIdArray ) : DataTable
tidList string
postTableIdArray string
Результат System.Data.DataTable

GetPostInfo() публичный статический Метод

public static GetPostInfo ( string postTableId, int pid ) : Discuz.Entity.PostInfo
postTableId string
pid int
Результат Discuz.Entity.PostInfo

GetPostInfoByPid() публичный статический Метод

获取帖子信息
public static GetPostInfoByPid ( string postTableName, int pid ) : DataTable
postTableName string 分表名称
pid int 帖子Id
Результат System.Data.DataTable

GetPostInfoWithAttachments() публичный статический Метод

获取ShowtopicPagePostInfo对象与ShowtopicPageAttachmentInfo对象列表
public static GetPostInfoWithAttachments ( Discuz.Entity.PostpramsInfo postPramsInfo, List &attachmentList ) : Discuz.Entity.ShowtopicPagePostInfo
postPramsInfo Discuz.Entity.PostpramsInfo 参数对象
attachmentList List 输出附件列表
Результат Discuz.Entity.ShowtopicPagePostInfo

GetPostLayer() публичный статический Метод

获取帖子登记
public static GetPostLayer ( int currentPostTableId, int postid ) : DataTable
currentPostTableId int 分表ID
postid int 帖子ID
Результат System.Data.DataTable

GetPostList() публичный статический Метод

返回帖子列表
public static GetPostList ( string postList, string tableId ) : DataTable
postList string 帖子ID
tableId string 帖子分表ID
Результат System.Data.DataTable

GetPostList() публичный статический Метод

获取指定条件的帖子DataSet
public static GetPostList ( Discuz.Entity.PostpramsInfo postpramsInfo ) : List
postpramsInfo Discuz.Entity.PostpramsInfo
Результат List

GetPostListByCondition() публичный статический Метод

按条件获取帖子列表
public static GetPostListByCondition ( string postTableName, string condition ) : DataTable
postTableName string 分表名称
condition string 条件
Результат System.Data.DataTable

GetPostTableName() публичный статический Метод

获取完整分表名
public static GetPostTableName ( int postTableId ) : string
postTableId int 分表Id
Результат string

GetPostTree() публичный статический Метод

获取指定tid的帖子DataTable
public static GetPostTree ( int tid ) : DataTable
tid int 帖子的tid
Результат System.Data.DataTable

GetPosts() публичный статический Метод

获取帖子列表
public static GetPosts ( int tid, int pagesize, int pageindex, string posttableid ) : DataSet
tid int 主题ID
pagesize int 页面大小
pageindex int 当前页码
posttableid string 分表id
Результат System.Data.DataSet

GetPostsCount() публичный статический Метод

获取分表帖数
public static GetPostsCount ( string postTableid ) : int
postTableid string 分表Id
Результат int

GetTodayPostCount() публичный статический Метод

获取版块当天帖数
public static GetTodayPostCount ( int fid, string postTableName ) : int
fid int 版块Id
postTableName string 分表名称
Результат int

GetTodayPostCountByUid() публичный статический Метод

获取用户当天发帖数
public static GetTodayPostCountByUid ( int uid, string postTableName ) : int
uid int 用户Id
postTableName string 分表名称
Результат int

GetTopicAuditCondition() публичный статический Метод

获取帖子审核的条件
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 删除结束日期
Результат string

GetTopicListByTidlist() публичный статический Метод

根据主题ID列表取出主题帖子
public static GetTopicListByTidlist ( string posttableid, string tidlist ) : DataTable
posttableid string 分表ID
tidlist string 主题ID列表
Результат System.Data.DataTable

GetTopicPostInfo() публичный статический Метод

通过主题ID得到主帖内容,此方法可继续扩展
public static GetTopicPostInfo ( int tid ) : Discuz.Entity.PostInfo
tid int
Результат Discuz.Entity.PostInfo

GetUnauditNewPostCount() публичный статический Метод

获取需要审核的回复数
public static GetUnauditNewPostCount ( string fidList, int postTableId, int filter ) : int
fidList string 版块ID
postTableId int 分表ID
filter int 可见性过滤器
Результат int

GetUnauditPost() публичный статический Метод

获取需要审核的回复
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 可见性过滤器
Результат List

GetUserPostCountList() публичный статический Метод

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

IsExistAuditTopic() публичный статический Метод

是否存在满足条件的需要审核的帖子
public static IsExistAuditTopic ( string condition ) : bool
condition string 条件
Результат bool

IsReplier() публичный статический Метод

判断指定用户是否是指定主题的回复者
public static IsReplier ( int tid, int uid ) : bool
tid int 主题id
uid int 用户id
Результат bool

LoadPostList() публичный статический Метод

装载帖子列表
public static LoadPostList ( Discuz.Entity.PostpramsInfo postpramsInfo, IDataReader reader ) : List
postpramsInfo Discuz.Entity.PostpramsInfo 参数对象
reader IDataReader
Результат List

PassPost() публичный статический Метод

通过未审核的帖子
public static PassPost ( int currentPostTableId, string pidlist ) : void
currentPostTableId int 当前表ID
pidlist string 帖子ID列表
Результат void

ReSetStatistic() публичный статический Метод

重设统计信息
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 最后注册用户名称
Результат void

ResetLastRepliesInfoOfTopics() публичный статический Метод

根据分表名更新主题的最后回复等信息
public static ResetLastRepliesInfoOfTopics ( int postTableID ) : void
postTableID int
Результат void

SearchPost() публичный статический Метод

查询帖子的条件
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
Результат string

UpdateMyPost() публичный статический Метод

更新我的帖子
public static UpdateMyPost ( ) : void
Результат void

UpdatePost() публичный статический Метод

更新指定帖子信息
public static UpdatePost ( Discuz.Entity.PostInfo postInfo, string postTableId ) : int
postInfo Discuz.Entity.PostInfo 帖子信息
postTableId string
Результат int

UpdatePostAttachmentType() публичный статический Метод

public static UpdatePostAttachmentType ( int tid, int pid, int attType ) : int
tid int
pid int
attType int
Результат int

UpdatePostPoster() публичный статический Метод

更新帖子作者名称
public static UpdatePostPoster ( int uid, string newUserName ) : void
uid int 要更新的帖子作者的Uid
newUserName string 作者的新用户名
Результат void

UpdatePostRate() публичный статический Метод

更新帖子评分
public static UpdatePostRate ( int pid, float rate, string posttableid ) : int
pid int
rate float
posttableid string
Результат int

UpdatePostRateTimes() публичный статический Метод

更新帖子的评分值
public static UpdatePostRateTimes ( int tid, string postidlist ) : int
tid int 主题ID
postidlist string 帖子ID列表
Результат int

Описание свойств

IPostService публичное статическое свойство

public static ICachePosts IPostService
Результат ICachePosts

appDBCache публичное статическое свойство

是否启用缓存帖子表
public static bool appDBCache
Результат bool