Documentation ¶
Index ¶
- type Dao
- func (d *Dao) ActivitySub(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) AddAdminLog(c context.Context, oids, rpIDs []int64, adminID int64, ...) (rows int64, err error)
- func (d *Dao) AddConfig(c context.Context, typ, category int32, oid, adminid int64, ...) (id int64, err error)
- func (d *Dao) AddCountIndex(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) AddFloorIndex(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) AddFolder(c context.Context, keyMapping map[string][]*model.Reply) (err error)
- func (d *Dao) AddLikeIndex(c context.Context, rp *model.Reply, rpt *model.Report) (err error)
- func (d *Dao) AddNewChildIndex(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) AddRdsByFold(ctx context.Context, roots []int64, childMap map[int64][]int64, ...)
- func (d *Dao) AddReplyCache(c context.Context, rps ...*model.Reply) (err error)
- func (d *Dao) AddSubject(c context.Context, mid, oid int64, typ, state int32, now time.Time) (id int64, err error)
- func (d *Dao) AddSubjectCache(c context.Context, subs ...*model.Subject) (err error)
- func (d *Dao) AddTopCache(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) AdminLog(c context.Context, rpID int64) (r *model.AdminLog, err error)
- func (d *Dao) AdminLogsByRpID(c context.Context, rpID int64) (res []*model.AdminLog, err error)
- func (d *Dao) AdminName(c context.Context, admins map[int64]string) (err error)
- func (d *Dao) BanTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)
- func (d *Dao) BlockAccount(c context.Context, mid int64, ftime int64, notify bool, freason int32, ...) (err error)
- func (dao *Dao) Business(c context.Context, tp int32) (business *model.Business, err error)
- func (dao *Dao) CountNotice(c context.Context) (count int64, err error)
- func (d *Dao) CountReplies(c context.Context, oid int64, tp, sort int32) (count int, err error)
- func (d *Dao) CreateEmoji(c context.Context, pid int64, name string, url string, sort int32, state int32, ...) (id int64, err error)
- func (d *Dao) CreateEmojiPackage(c context.Context, name string, url string, sort int32, remark string, ...) (id int64, err error)
- func (dao *Dao) CreateNotice(c context.Context, nt *model.Notice) (rows int64, err error)
- func (d *Dao) CreditTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) DelAuditIndex(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) DelConfigCache(c context.Context, oid int64, typ, category int32) (err error)
- func (d *Dao) DelEmojiByID(c context.Context, id int64) (idx int64, err error)
- func (d *Dao) DelEmojiByPid(c context.Context, pid int64) (idx int64, err error)
- func (d *Dao) DelEmojiPackage(c context.Context, id int64) (idx int64, err error)
- func (d *Dao) DelIndexBySort(c context.Context, rp *model.Reply, sort int32) (err error)
- func (d *Dao) DelReplyCache(c context.Context, rpID int64) (err error)
- func (d *Dao) DelReplyIndex(c context.Context, rp *model.Reply) (err error)
- func (d *Dao) DelReport(c context.Context, oid int64, rpid int64) (err error)
- func (d *Dao) DelSubjectCache(c context.Context, oid int64, typ int32) (err error)
- func (d *Dao) DelTopCache(c context.Context, oid int64, attr uint32) (err error)
- func (d *Dao) DeleteConfig(c context.Context, id int64) (rows int64, err error)
- func (dao *Dao) DeleteNotice(c context.Context, id uint32) (rows int64, err error)
- func (d *Dao) DynamicTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) EmojiByName(c context.Context, name string) (emojis []*model.Emoji, err error)
- func (d *Dao) EmojiList(c context.Context) (emojis []*model.Emoji, err error)
- func (d *Dao) EmojiListByPid(c context.Context, pid int64) (emojis []*model.Emoji, err error)
- func (d *Dao) EmojiPackageList(c context.Context) (packs []*model.EmojiPackage, err error)
- func (d *Dao) ExpireFolder(c context.Context, kind string, ID int64) (ok bool, err error)
- func (d *Dao) ExpireIndex(c context.Context, oid int64, typ, sort int32) (ok bool, err error)
- func (d *Dao) ExpireNewChildIndex(c context.Context, root int64) (ok bool, err error)
- func (d *Dao) ExportReplies(c context.Context, oid, mid int64, tp int8, state string, ...) (data [][]string, err error)
- func (d *Dao) ExsistsDelMid(c context.Context, mid int64) (ok bool, err error)
- func (d *Dao) FilterContents(ctx context.Context, rpMaps map[int64]string) error
- func (d *Dao) FoldedReplies(ctx context.Context, oid int64, tp int32, root int64) (rps []*model.Reply, err error)
- func (dao *Dao) InBusiness(c context.Context, tp int32, name, appkey, remark, alias string) (id int64, err error)
- func (d *Dao) InsertReply(c context.Context, r *model.Reply) (id int64, err error)
- func (dao *Dao) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
- func (dao *Dao) ListNotice(c context.Context, offset int64, count int64) (nts []*model.Notice, err error)
- func (d *Dao) LiveActivityTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) LiveNoticeTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) LivePictureTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) LiveVideoTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) LoadConfig(c context.Context, typ, category int32, oid int64) (m *model.Config, err error)
- func (d *Dao) LoadConfigByID(c context.Context, id int64) (m *model.Config, err error)
- func (d *Dao) MinScore(c context.Context, oid int64, tp int32, sort int32) (score int32, err error)
- func (d *Dao) MonitorStats(c context.Context, mode, page, pageSize int64, ...) (res *model.StatsMonitorResult, err error)
- func (dao *Dao) Notice(c context.Context, id uint32) (nt *model.Notice, err error)
- func (d *Dao) NoticeTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) PaginateConfig(c context.Context, typ, category int32, oid int64, operator string, ...) (configs []*model.Config, err error)
- func (d *Dao) PaginateConfigCount(c context.Context, typ, category int32, oid int64, operator string) (totalCount int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubEvent(c context.Context, action string, mid int64, sub *model.Subject, ...) error
- func (dao *Dao) RangeNotice(c context.Context, plat model.NoticePlat, stime xtime.Time, etime xtime.Time) (nts []*model.Notice, err error)
- func (d *Dao) RemFolder(c context.Context, kind string, ID, rpID int64) (err error)
- func (d *Dao) RemRdsByFold(ctx context.Context, roots []int64, childMap map[int64][]int64, ...)
- func (d *Dao) RemReplyFromRedis(c context.Context, keyMapping map[string][]int64) (err error)
- func (d *Dao) Replies(c context.Context, oids []int64, rpIds []int64) (rpMap map[int64]*model.Reply, err error)
- func (d *Dao) RepliesCache(c context.Context, rpIDs []int64) (rpMap map[int64]*model.Reply, missed []int64, err error)
- func (d *Dao) Reply(c context.Context, oid, rpID int64) (r *model.Reply, err error)
- func (d *Dao) ReplyCache(c context.Context, rpID int64) (rp *model.Reply, err error)
- func (d *Dao) ReplyContent(c context.Context, oid, rpID int64) (rc *model.ReplyContent, err error)
- func (d *Dao) ReplyContents(c context.Context, oids []int64, rpIds []int64) (rcMap map[int64]*model.ReplyContent, err error)
- func (d *Dao) Report(c context.Context, oid, rpID int64) (rpt *model.Report, err error)
- func (d *Dao) ReportByOids(c context.Context, typ int32, oids ...int64) (res map[int64]*model.Report, err error)
- func (d *Dao) ReportLog(c context.Context, sp model.LogSearchParam) (data *ReportLogData, err error)
- func (d *Dao) ReportUsers(c context.Context, oid int64, tp int32, rpID int64) (res map[int64]*model.ReportUser, err error)
- func (d *Dao) Reports(c context.Context, oids, rpIDs []int64) (res map[int64]*model.Report, err error)
- func (d *Dao) SearchAdminLog(c context.Context, rpids []int64) (res []*model.SearchAdminLog, err error)
- func (d *Dao) SearchMonitor(c context.Context, sp *model.SearchMonitorParams, page, pageSize int64) (res *model.SearchMonitorResult, err error)
- func (d *Dao) SearchReply(c context.Context, p *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
- func (d *Dao) SearchReplyV3(c context.Context, sp *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
- func (d *Dao) SearchReport(c context.Context, sp *model.SearchReportParams, page, pageSize int64) (res *model.SearchReportResult, err error)
- func (d *Dao) SendReplyDelMsg(c context.Context, mid int64, title, msg string, now time.Time) (err error)
- func (d *Dao) SendReportAcceptMsg(c context.Context, mid int64, title, msg string, now time.Time) (err error)
- func (d *Dao) SendStats(c context.Context, typ int32, oid int64, cnt int32) (err error)
- func (d *Dao) SetDelMid(c context.Context, mid int64) (err error)
- func (d *Dao) SetUserReported(c context.Context, oid int64, tp int32, rpID int64, now time.Time) (rows int64, err error)
- func (d *Dao) SubMCount(c context.Context, oids []int64, typ int32) (res map[int64]int32, err error)
- func (d *Dao) Subject(c context.Context, oid int64, typ int32) (m *model.Subject, err error)
- func (d *Dao) SubjectCache(c context.Context, oid int64, typ int32) (sub *model.Subject, err error)
- func (d *Dao) Subjects(c context.Context, oids []int64, typ int32) (subMap map[int64]*model.Subject, err error)
- func (d *Dao) TopCache(c context.Context, oid int64, attr uint32) (rp *model.Reply, err error)
- func (d *Dao) TopChildReply(c context.Context, root, child int64) (err error)
- func (d *Dao) TopicTitle(c context.Context, oid int64) (title, link string, err error)
- func (d *Dao) TopicsLink(c context.Context, links map[int64]string, isTopic bool) (err error)
- func (d *Dao) TransferArbitration(c context.Context, rps map[int64]*model.Reply, rpts map[int64]*model.Report, ...) (err error)
- func (d *Dao) TxCountFoldedReplies(tx *sql.Tx, oid int64, tp int32, root int64) (count int, err error)
- func (d *Dao) TxDecrReplyRCount(tx *xsql.Tx, oid, rpID int64, now time.Time) (rows int64, err error)
- func (d *Dao) TxDecrSubRCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxIncrReplyRCount(tx *xsql.Tx, oid, rpID int64, now time.Time) (rows int64, err error)
- func (d *Dao) TxIncrSubACount(tx *xsql.Tx, oid int64, typ int32, count int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxIncrSubCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxIncrSubFCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxIncrSubRCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxReply(tx *xsql.Tx, oid, rpID int64) (r *model.Reply, err error)
- func (d *Dao) TxReplyForUpdate(tx *xsql.Tx, oid, rpID int64) (r *model.Reply, err error)
- func (d *Dao) TxSubDecrACount(tx *xsql.Tx, oid int64, typ int32, count int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxSubDecrMCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
- func (d *Dao) TxSubject(tx *xsql.Tx, oid int64, typ int32) (m *model.Subject, err error)
- func (d *Dao) TxSubjectForUpdate(tx *xsql.Tx, oid int64, typ int32) (m *model.Subject, err error)
- func (d *Dao) TxUpReplyAttr(tx *xsql.Tx, oid, rpID int64, attr uint32, now time.Time) (rows int64, err error)
- func (d *Dao) TxUpSubAttr(tx *xsql.Tx, oid int64, tp int32, attr uint32, now time.Time) (rows int64, err error)
- func (d *Dao) TxUpSubMeta(tx *xsql.Tx, oid int64, tp int32, meta string, now time.Time) (rows int64, err error)
- func (d *Dao) TxUpdateReplyState(tx *xsql.Tx, oid, rpID int64, state int32, mtime time.Time) (rows int64, err error)
- func (d *Dao) UpAdminNotNew(c context.Context, rpID []int64, now time.Time) (rows int64, err error)
- func (dao *Dao) UpBusiness(c context.Context, name, appkey, remark, alias string, tp int32) (id int64, err error)
- func (dao *Dao) UpBusinessState(c context.Context, state, tp int32) (id int64, err error)
- func (d *Dao) UpEmoji(c context.Context, name string, remark string, url string, id int64) (idx int64, err error)
- func (d *Dao) UpEmojiPackage(c context.Context, name string, url string, remark string, state int32, ...) (idx int64, err error)
- func (d *Dao) UpEmojiPackageSort(tx *xsql.Tx, ids string) (err error)
- func (d *Dao) UpEmojiSort(tx *xsql.Tx, ids string) (err error)
- func (d *Dao) UpEmojiStateByID(c context.Context, state int32, id int64) (idx int64, err error)
- func (d *Dao) UpReplyContent(c context.Context, oid int64, rpID int64, msg string, now time.Time) (rows int64, err error)
- func (d *Dao) UpReportsAttrBit(c context.Context, oids, rpIDs []int64, bit uint32, val uint32, now time.Time) (rows int64, err error)
- func (d *Dao) UpReportsState(c context.Context, oids, rpIDs []int64, state int32, now time.Time) (rows int64, err error)
- func (d *Dao) UpReportsStateWithReason(c context.Context, oids, rpIDs []int64, state, reason int32, content string, ...) (rows int64, err error)
- func (d *Dao) UpSearchMonitor(c context.Context, sub *model.Subject, remark string) (err error)
- func (d *Dao) UpSearchReply(c context.Context, rps map[int64]*model.Reply, newState int32) (err error)
- func (d *Dao) UpSearchReport(c context.Context, rpts map[int64]*model.Report, rpState *int32) (err error)
- func (d *Dao) UpStateAndAttr(c context.Context, oid int64, typ, state int32, attr uint32, now time.Time) (rows int64, err error)
- func (d *Dao) UpSubjectAttr(c context.Context, oid int64, typ int32, attr uint32, now time.Time) (rows int64, err error)
- func (d *Dao) UpSubjectState(c context.Context, oid int64, typ, state int32, now time.Time) (rows int64, err error)
- func (dao *Dao) UpdateNotice(c context.Context, nt *model.Notice) (rows int64, err error)
- func (dao *Dao) UpdateNoticeStatus(c context.Context, status model.NoticeStatus, id uint32) (rows int64, err error)
- func (d *Dao) UpdateReplyState(c context.Context, oid, rpID int64, state int32) (rows int64, err error)
- type ReportLogData
- type ReportLogResult
- type TransferData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) ActivitySub ¶
ActivitySub return activity sub link.
func (*Dao) AddAdminLog ¶
func (d *Dao) AddAdminLog(c context.Context, oids, rpIDs []int64, adminID int64, typ, isNew, isReport, state int32, result, remark string, now time.Time) (rows int64, err error)
AddAdminLog add admin log to mysql.
func (*Dao) AddConfig ¶
func (d *Dao) AddConfig(c context.Context, typ, category int32, oid, adminid int64, operator, config string, now time.Time) (id int64, err error)
AddConfig create a new config.
func (*Dao) AddCountIndex ¶
AddCountIndex add index by count.
func (*Dao) AddFloorIndex ¶
AddFloorIndex add index by floor.
func (*Dao) AddLikeIndex ¶
AddLikeIndex add index by like.
func (*Dao) AddNewChildIndex ¶
AddNewChildIndex add root reply index by floor.
func (*Dao) AddRdsByFold ¶
func (d *Dao) AddRdsByFold(ctx context.Context, roots []int64, childMap map[int64][]int64, sub *model.Subject, rpMap map[int64]*model.Reply)
AddRdsByFold ...
func (*Dao) AddReplyCache ¶
AddReplyCache add reply into memcache.
func (*Dao) AddSubject ¶
func (d *Dao) AddSubject(c context.Context, mid, oid int64, typ, state int32, now time.Time) (id int64, err error)
AddSubject insert or update subject state.
func (*Dao) AddSubjectCache ¶
AddSubjectCache add subject into memcache.
func (*Dao) AddTopCache ¶
AddTopCache add top reply into memcache.
func (*Dao) AdminLogsByRpID ¶
AdminLogsByRpID return operation log list.
func (*Dao) BlockAccount ¶
func (d *Dao) BlockAccount(c context.Context, mid int64, ftime int64, notify bool, freason int32, originTitle string, originContent string, redirectURL string, adname string, remark string) (err error)
BlockAccount ban an account.
func (*Dao) CountNotice ¶
CountNotice return notice count.
func (*Dao) CountReplies ¶
CountReplies get count of reply.
func (*Dao) CreateEmoji ¶
func (d *Dao) CreateEmoji(c context.Context, pid int64, name string, url string, sort int32, state int32, remark string) (id int64, err error)
CreateEmoji insert a emoji into db
func (*Dao) CreateEmojiPackage ¶
func (d *Dao) CreateEmojiPackage(c context.Context, name string, url string, sort int32, remark string, state int32) (id int64, err error)
CreateEmojiPackage insert a emoji_package into db
func (*Dao) CreateNotice ¶
CreateNotice insert a notice into db.
func (*Dao) CreditTitle ¶
CreditTitle return link.
func (*Dao) DelAuditIndex ¶
DelAuditIndex delete audit reply cache.
func (*Dao) DelConfigCache ¶
DelConfigCache delete reply config from memcache.
func (*Dao) DelEmojiByID ¶
DelEmojiByID delete emoji by id
func (*Dao) DelEmojiByPid ¶
DelEmojiByPid delete emoji by package_id
func (*Dao) DelEmojiPackage ¶
DelEmojiPackage delete emoji_package by id
func (*Dao) DelIndexBySort ¶
DelIndexBySort delete index by sort.
func (*Dao) DelReplyCache ¶
DelReplyCache delete reply from memcache.
func (*Dao) DelReplyIndex ¶
DelReplyIndex delete reply index.
func (*Dao) DelSubjectCache ¶
DelSubjectCache delete subject from memcache.
func (*Dao) DelTopCache ¶
DelTopCache delete topreply from memcache.
func (*Dao) DeleteConfig ¶
DeleteConfig delete a reply config record by id.
func (*Dao) DeleteNotice ¶
DeleteNotice delete a notice entry from db.
func (*Dao) DynamicTitle ¶
DynamicTitle return link and title.
func (*Dao) EmojiByName ¶
EmojiByName get emoji by name
func (*Dao) EmojiListByPid ¶
EmojiListByPid get emoji by package_id
func (*Dao) EmojiPackageList ¶
EmojiPackageList get all emoji_package
func (*Dao) ExpireFolder ¶
ExpireFolder ...
func (*Dao) ExpireIndex ¶
ExpireIndex set expire time for index.
func (*Dao) ExpireNewChildIndex ¶
ExpireNewChildIndex set expire time for root's index.
func (*Dao) ExportReplies ¶
func (d *Dao) ExportReplies(c context.Context, oid, mid int64, tp int8, state string, startTime, endTime time.Time) (data [][]string, err error)
ExportReplies export replies
func (*Dao) ExsistsDelMid ¶
func (*Dao) FilterContents ¶
FilterContents get filtered contents from db
func (*Dao) FoldedReplies ¶
func (d *Dao) FoldedReplies(ctx context.Context, oid int64, tp int32, root int64) (rps []*model.Reply, err error)
FoldedReplies ...
func (*Dao) InBusiness ¶
func (dao *Dao) InBusiness(c context.Context, tp int32, name, appkey, remark, alias string) (id int64, err error)
InBusiness insert a business record
func (*Dao) InsertReply ¶
InsertReply insert reply by transaction.
func (*Dao) ListBusiness ¶
func (dao *Dao) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
ListBusiness Gets gets all business records
func (*Dao) ListNotice ¶
func (dao *Dao) ListNotice(c context.Context, offset int64, count int64) (nts []*model.Notice, err error)
ListNotice retrive reply's notice list from db by offset and count.
func (*Dao) LiveActivityTitle ¶
LiveActivityTitle get live activity info.
func (*Dao) LiveNoticeTitle ¶
LiveNoticeTitle get live notice info.
func (*Dao) LivePictureTitle ¶
LivePictureTitle get live picture info.
func (*Dao) LiveVideoTitle ¶
LiveVideoTitle get live video title.
func (*Dao) LoadConfig ¶
func (d *Dao) LoadConfig(c context.Context, typ, category int32, oid int64) (m *model.Config, err error)
LoadConfig load a config record.
func (*Dao) LoadConfigByID ¶
LoadConfigByID load a config record by id.
func (*Dao) MonitorStats ¶
func (d *Dao) MonitorStats(c context.Context, mode, page, pageSize int64, adminIDs, sort, order, startTime, endTime string) (res *model.StatsMonitorResult, err error)
MonitorStats return search monitor stats from ES.
func (*Dao) NoticeTitle ¶
NoticeTitle get blackromm notice info.
func (*Dao) PaginateConfig ¶
func (d *Dao) PaginateConfig(c context.Context, typ, category int32, oid int64, operator string, offset, count int) (configs []*model.Config, err error)
PaginateConfig paginate config list of records indexing from start(offset) to end(offset+count) by conditions.
func (*Dao) PaginateConfigCount ¶
func (d *Dao) PaginateConfigCount(c context.Context, typ, category int32, oid int64, operator string) (totalCount int64, err error)
PaginateConfigCount returns a total count of records by conditions.
func (*Dao) PubEvent ¶
func (d *Dao) PubEvent(c context.Context, action string, mid int64, sub *model.Subject, rp *model.Reply, report *model.Report) error
PubEvent pub reply event.
func (*Dao) RangeNotice ¶
func (dao *Dao) RangeNotice(c context.Context, plat model.NoticePlat, stime xtime.Time, etime xtime.Time) (nts []*model.Notice, err error)
RangeNotice 获取发布时间与某一时间范围有交集的公告.
func (*Dao) RemRdsByFold ¶
func (d *Dao) RemRdsByFold(ctx context.Context, roots []int64, childMap map[int64][]int64, sub *model.Subject, rpMap map[int64]*model.Reply)
RemRdsByFold ...
func (*Dao) RemReplyFromRedis ¶
RemReplyFromRedis ...
func (*Dao) Replies ¶
func (d *Dao) Replies(c context.Context, oids []int64, rpIds []int64) (rpMap map[int64]*model.Reply, err error)
Replies get replies by reply ids.
func (*Dao) RepliesCache ¶
func (d *Dao) RepliesCache(c context.Context, rpIDs []int64) (rpMap map[int64]*model.Reply, missed []int64, err error)
RepliesCache multi get replies from memcache.
func (*Dao) ReplyCache ¶
ReplyCache get a reply from memcache.
func (*Dao) ReplyContent ¶
ReplyContent get a ReplyContent from database.
func (*Dao) ReplyContents ¶
func (d *Dao) ReplyContents(c context.Context, oids []int64, rpIds []int64) (rcMap map[int64]*model.ReplyContent, err error)
ReplyContents get reply contents by ids.
func (*Dao) ReportByOids ¶
func (d *Dao) ReportByOids(c context.Context, typ int32, oids ...int64) (res map[int64]*model.Report, err error)
ReportByOids return report map by oid.
func (*Dao) ReportLog ¶
func (d *Dao) ReportLog(c context.Context, sp model.LogSearchParam) (data *ReportLogData, err error)
ReportLog get notice info.
func (*Dao) ReportUsers ¶
func (d *Dao) ReportUsers(c context.Context, oid int64, tp int32, rpID int64) (res map[int64]*model.ReportUser, err error)
ReportUsers return a report users from mysql.
func (*Dao) Reports ¶
func (d *Dao) Reports(c context.Context, oids, rpIDs []int64) (res map[int64]*model.Report, err error)
Reports return report map by oid.
func (*Dao) SearchAdminLog ¶
func (d *Dao) SearchAdminLog(c context.Context, rpids []int64) (res []*model.SearchAdminLog, err error)
SearchAdminLog search adminlog
func (*Dao) SearchMonitor ¶
func (d *Dao) SearchMonitor(c context.Context, sp *model.SearchMonitorParams, page, pageSize int64) (res *model.SearchMonitorResult, err error)
SearchMonitor return search monitor reply from ES.
func (*Dao) SearchReply ¶
func (d *Dao) SearchReply(c context.Context, p *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
SearchReply search reply from ES.
func (*Dao) SearchReplyV3 ¶
func (d *Dao) SearchReplyV3(c context.Context, sp *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
func (*Dao) SearchReport ¶
func (d *Dao) SearchReport(c context.Context, sp *model.SearchReportParams, page, pageSize int64) (res *model.SearchReportResult, err error)
SearchReport search reports from ES.
func (*Dao) SendReplyDelMsg ¶
func (d *Dao) SendReplyDelMsg(c context.Context, mid int64, title, msg string, now time.Time) (err error)
SendReplyDelMsg send delete reply message.
func (*Dao) SendReportAcceptMsg ¶
func (d *Dao) SendReportAcceptMsg(c context.Context, mid int64, title, msg string, now time.Time) (err error)
SendReportAcceptMsg send report message.
func (*Dao) SetUserReported ¶
func (d *Dao) SetUserReported(c context.Context, oid int64, tp int32, rpID int64, now time.Time) (rows int64, err error)
SetUserReported set a user report state by rpID.
func (*Dao) SubMCount ¶
func (d *Dao) SubMCount(c context.Context, oids []int64, typ int32) (res map[int64]int32, err error)
SubMCount get subject mcount from mysql
func (*Dao) SubjectCache ¶
SubjectCache get subject from memcache.
func (*Dao) Subjects ¶
func (d *Dao) Subjects(c context.Context, oids []int64, typ int32) (subMap map[int64]*model.Subject, err error)
Subjects get subjects from mysql.
func (*Dao) TopChildReply ¶
TopChildReply ...
func (*Dao) TopicTitle ¶
TopicTitle get topic info.
func (*Dao) TopicsLink ¶
TopicsLink get topic info.
func (*Dao) TransferArbitration ¶
func (d *Dao) TransferArbitration(c context.Context, rps map[int64]*model.Reply, rpts map[int64]*model.Report, adid int64, adname string, titles map[int64]string, links map[int64]string) (err error)
TransferArbitration transfer report to Arbitration.
func (*Dao) TxCountFoldedReplies ¶
func (d *Dao) TxCountFoldedReplies(tx *sql.Tx, oid int64, tp int32, root int64) (count int, err error)
TxCountFoldedReplies ...
func (*Dao) TxDecrReplyRCount ¶
func (d *Dao) TxDecrReplyRCount(tx *xsql.Tx, oid, rpID int64, now time.Time) (rows int64, err error)
TxDecrReplyRCount decr rcount of reply by transaction.
func (*Dao) TxDecrSubRCount ¶
func (d *Dao) TxDecrSubRCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
TxDecrSubRCount decr subject count by transaction.
func (*Dao) TxIncrReplyRCount ¶
func (d *Dao) TxIncrReplyRCount(tx *xsql.Tx, oid, rpID int64, now time.Time) (rows int64, err error)
TxIncrReplyRCount incr rcount of reply by transaction.
func (*Dao) TxIncrSubACount ¶
func (d *Dao) TxIncrSubACount(tx *xsql.Tx, oid int64, typ int32, count int32, now time.Time) (rows int64, err error)
TxIncrSubACount incr subject acount by transaction.
func (*Dao) TxIncrSubCount ¶
func (d *Dao) TxIncrSubCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
TxIncrSubCount incr subject count and rcount by transaction.
func (*Dao) TxIncrSubFCount ¶
func (d *Dao) TxIncrSubFCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
TxIncrSubFCount incr subject count and rcount by transaction.
func (*Dao) TxIncrSubRCount ¶
func (d *Dao) TxIncrSubRCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
TxIncrSubRCount incr subject rcount by transaction
func (*Dao) TxReplyForUpdate ¶
TxReplyForUpdate get a reply from database.
func (*Dao) TxSubDecrACount ¶
func (d *Dao) TxSubDecrACount(tx *xsql.Tx, oid int64, typ int32, count int32, now time.Time) (rows int64, err error)
TxSubDecrACount decr subject rcount by transaction.
func (*Dao) TxSubDecrMCount ¶
func (d *Dao) TxSubDecrMCount(tx *xsql.Tx, oid int64, typ int32, now time.Time) (rows int64, err error)
TxSubDecrMCount decr subject mcount by transaction.
func (*Dao) TxSubjectForUpdate ¶
TxSubjectForUpdate get a subject from mysql for update.
func (*Dao) TxUpReplyAttr ¶
func (d *Dao) TxUpReplyAttr(tx *xsql.Tx, oid, rpID int64, attr uint32, now time.Time) (rows int64, err error)
TxUpReplyAttr update subject attr.
func (*Dao) TxUpSubAttr ¶
func (d *Dao) TxUpSubAttr(tx *xsql.Tx, oid int64, tp int32, attr uint32, now time.Time) (rows int64, err error)
TxUpSubAttr update subject attr.
func (*Dao) TxUpSubMeta ¶
func (d *Dao) TxUpSubMeta(tx *xsql.Tx, oid int64, tp int32, meta string, now time.Time) (rows int64, err error)
TxUpSubMeta update subject meta.
func (*Dao) TxUpdateReplyState ¶
func (d *Dao) TxUpdateReplyState(tx *xsql.Tx, oid, rpID int64, state int32, mtime time.Time) (rows int64, err error)
TxUpdateReplyState tx update reply state.
func (*Dao) UpAdminNotNew ¶
UpAdminNotNew update admin log to not new.
func (*Dao) UpBusiness ¶
func (dao *Dao) UpBusiness(c context.Context, name, appkey, remark, alias string, tp int32) (id int64, err error)
UpBusiness update business by type
func (*Dao) UpBusinessState ¶
UpBusinessState logical delete a business record by set state to StateDelete
func (*Dao) UpEmoji ¶
func (d *Dao) UpEmoji(c context.Context, name string, remark string, url string, id int64) (idx int64, err error)
UpEmoji update emoji name and remark by id
func (*Dao) UpEmojiPackage ¶
func (d *Dao) UpEmojiPackage(c context.Context, name string, url string, remark string, state int32, id int64) (idx int64, err error)
UpEmojiPackage update emojipack by id
func (*Dao) UpEmojiPackageSort ¶
UpEmojiPackageSort udpate emojipack sort
func (*Dao) UpEmojiSort ¶
UpEmojiSort udpate emoji sort
func (*Dao) UpEmojiStateByID ¶
UpEmojiStateByID update emoji state
func (*Dao) UpReplyContent ¶
func (d *Dao) UpReplyContent(c context.Context, oid int64, rpID int64, msg string, now time.Time) (rows int64, err error)
UpReplyContent update reply content's message.
func (*Dao) UpReportsAttrBit ¶
func (d *Dao) UpReportsAttrBit(c context.Context, oids, rpIDs []int64, bit uint32, val uint32, now time.Time) (rows int64, err error)
UpReportsAttrBit update the report attr.
func (*Dao) UpReportsState ¶
func (d *Dao) UpReportsState(c context.Context, oids, rpIDs []int64, state int32, now time.Time) (rows int64, err error)
UpReportsState update the report state.
func (*Dao) UpReportsStateWithReason ¶
func (d *Dao) UpReportsStateWithReason(c context.Context, oids, rpIDs []int64, state, reason int32, content string, now time.Time) (rows int64, err error)
UpReportsStateWithReason update the report state.
func (*Dao) UpSearchMonitor ¶
UpSearchMonitor update monitor to search data.
func (*Dao) UpSearchReply ¶
func (d *Dao) UpSearchReply(c context.Context, rps map[int64]*model.Reply, newState int32) (err error)
UpSearchReply update search reply index.
func (*Dao) UpSearchReport ¶
func (d *Dao) UpSearchReport(c context.Context, rpts map[int64]*model.Report, rpState *int32) (err error)
UpSearchReport update search report index.
func (*Dao) UpStateAndAttr ¶
func (d *Dao) UpStateAndAttr(c context.Context, oid int64, typ, state int32, attr uint32, now time.Time) (rows int64, err error)
UpStateAndAttr update subject state and attr
func (*Dao) UpSubjectAttr ¶
func (d *Dao) UpSubjectAttr(c context.Context, oid int64, typ int32, attr uint32, now time.Time) (rows int64, err error)
UpSubjectAttr update subject attr.
func (*Dao) UpSubjectState ¶
func (d *Dao) UpSubjectState(c context.Context, oid int64, typ, state int32, now time.Time) (rows int64, err error)
UpSubjectState update subject state.
func (*Dao) UpdateNotice ¶
UpdateNotice update main notice's main fileds.
func (*Dao) UpdateNoticeStatus ¶
func (dao *Dao) UpdateNoticeStatus(c context.Context, status model.NoticeStatus, id uint32) (rows int64, err error)
UpdateNoticeStatus change notice's status to offline\online.
type ReportLogData ¶
type ReportLogData struct { Sort string `json:"sort"` Order string `json:"order"` Page model.Page `json:"page"` Result []*ReportLogResult `json:"result"` }
ReportLogData report log data
type ReportLogResult ¶
type ReportLogResult struct { AdminName string `json:"uname"` AdminID int64 `json:"uid"` Business int64 `json:"business"` Type int32 `json:"type"` Oid int64 `json:"oid"` OidStr string `json:"oid_str"` Action string `json:"action"` Ctime string `json:"ctime"` Index0 int64 `json:"int_0"` Index1 int64 `json:"int_1"` Index2 int64 `json:"int_2"` Content string `json:"extra_data"` }
ReportLogResult ReportLogResult
type TransferData ¶
type TransferData struct { Oid int64 `json:"oid"` Type int32 `json:"type"` Mid int64 `json:"mid"` RpID int64 `json:"rp_id"` Operator string `json:"operator"` OperatorID int64 `json:"oper_id"` Content string `json:"origin_content"` Reason int32 `json:"reason_type"` Title string `json:"origin_title"` Link string `json:"origin_url"` Ctime int64 `json:"business_time"` OriginType int32 `json:"origin_type"` }
TransferData transefer data