dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

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 New

func New(c *conf.Config) (d *Dao)

New new a dao and return.

func (*Dao) ActivitySub

func (d *Dao) ActivitySub(c context.Context, oid int64) (title, link string, err error)

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

func (d *Dao) AddCountIndex(c context.Context, rp *model.Reply) (err error)

AddCountIndex add index by count.

func (*Dao) AddFloorIndex

func (d *Dao) AddFloorIndex(c context.Context, rp *model.Reply) (err error)

AddFloorIndex add index by floor.

func (*Dao) AddFolder

func (d *Dao) AddFolder(c context.Context, keyMapping map[string][]*model.Reply) (err error)

AddFolder ...

func (*Dao) AddLikeIndex

func (d *Dao) AddLikeIndex(c context.Context, rp *model.Reply, rpt *model.Report) (err error)

AddLikeIndex add index by like.

func (*Dao) AddNewChildIndex

func (d *Dao) AddNewChildIndex(c context.Context, rp *model.Reply) (err error)

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

func (d *Dao) AddReplyCache(c context.Context, rps ...*model.Reply) (err error)

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

func (d *Dao) AddSubjectCache(c context.Context, subs ...*model.Subject) (err error)

AddSubjectCache add subject into memcache.

func (*Dao) AddTopCache

func (d *Dao) AddTopCache(c context.Context, rp *model.Reply) (err error)

AddTopCache add top reply into memcache.

func (*Dao) AdminLog

func (d *Dao) AdminLog(c context.Context, rpID int64) (r *model.AdminLog, err error)

AdminLog return admin log by rpid

func (*Dao) AdminLogsByRpID

func (d *Dao) AdminLogsByRpID(c context.Context, rpID int64) (res []*model.AdminLog, err error)

AdminLogsByRpID return operation log list.

func (*Dao) AdminName

func (d *Dao) AdminName(c context.Context, admins map[int64]string) (err error)

AdminName get admin name by id.

func (*Dao) BanTitle

func (d *Dao) BanTitle(c context.Context, oid int64) (title, link string, err error)

BanTitle get ban info.

func (*Dao) BeginTran

func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)

BeginTran begin transaction.

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) Business

func (dao *Dao) Business(c context.Context, tp int32) (business *model.Business, err error)

Business return one business instance by type

func (*Dao) CountNotice

func (dao *Dao) CountNotice(c context.Context) (count int64, err error)

CountNotice return notice count.

func (*Dao) CountReplies

func (d *Dao) CountReplies(c context.Context, oid int64, tp, sort int32) (count int, err error)

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

func (dao *Dao) CreateNotice(c context.Context, nt *model.Notice) (rows int64, err error)

CreateNotice insert a notice into db.

func (*Dao) CreditTitle

func (d *Dao) CreditTitle(c context.Context, oid int64) (title, link string, err error)

CreditTitle return link.

func (*Dao) DelAuditIndex

func (d *Dao) DelAuditIndex(c context.Context, rp *model.Reply) (err error)

DelAuditIndex delete audit reply cache.

func (*Dao) DelConfigCache

func (d *Dao) DelConfigCache(c context.Context, oid int64, typ, category int32) (err error)

DelConfigCache delete reply config from memcache.

func (*Dao) DelEmojiByID

func (d *Dao) DelEmojiByID(c context.Context, id int64) (idx int64, err error)

DelEmojiByID delete emoji by id

func (*Dao) DelEmojiByPid

func (d *Dao) DelEmojiByPid(c context.Context, pid int64) (idx int64, err error)

DelEmojiByPid delete emoji by package_id

func (*Dao) DelEmojiPackage

func (d *Dao) DelEmojiPackage(c context.Context, id int64) (idx int64, err error)

DelEmojiPackage delete emoji_package by id

func (*Dao) DelIndexBySort

func (d *Dao) DelIndexBySort(c context.Context, rp *model.Reply, sort int32) (err error)

DelIndexBySort delete index by sort.

func (*Dao) DelReplyCache

func (d *Dao) DelReplyCache(c context.Context, rpID int64) (err error)

DelReplyCache delete reply from memcache.

func (*Dao) DelReplyIndex

func (d *Dao) DelReplyIndex(c context.Context, rp *model.Reply) (err error)

DelReplyIndex delete reply index.

func (*Dao) DelReport

func (d *Dao) DelReport(c context.Context, oid int64, rpid int64) (err error)

FilterContent get filtered contents by ids.

func (*Dao) DelSubjectCache

func (d *Dao) DelSubjectCache(c context.Context, oid int64, typ int32) (err error)

DelSubjectCache delete subject from memcache.

func (*Dao) DelTopCache

func (d *Dao) DelTopCache(c context.Context, oid int64, attr uint32) (err error)

DelTopCache delete topreply from memcache.

func (*Dao) DeleteConfig

func (d *Dao) DeleteConfig(c context.Context, id int64) (rows int64, err error)

DeleteConfig delete a reply config record by id.

func (*Dao) DeleteNotice

func (dao *Dao) DeleteNotice(c context.Context, id uint32) (rows int64, err error)

DeleteNotice delete a notice entry from db.

func (*Dao) DynamicTitle

func (d *Dao) DynamicTitle(c context.Context, oid int64) (title, link string, err error)

DynamicTitle return link and title.

func (*Dao) EmojiByName

func (d *Dao) EmojiByName(c context.Context, name string) (emojis []*model.Emoji, err error)

EmojiByName get emoji by name

func (*Dao) EmojiList

func (d *Dao) EmojiList(c context.Context) (emojis []*model.Emoji, err error)

EmojiList get all emoji

func (*Dao) EmojiListByPid

func (d *Dao) EmojiListByPid(c context.Context, pid int64) (emojis []*model.Emoji, err error)

EmojiListByPid get emoji by package_id

func (*Dao) EmojiPackageList

func (d *Dao) EmojiPackageList(c context.Context) (packs []*model.EmojiPackage, err error)

EmojiPackageList get all emoji_package

func (*Dao) ExpireFolder

func (d *Dao) ExpireFolder(c context.Context, kind string, ID int64) (ok bool, err error)

ExpireFolder ...

func (*Dao) ExpireIndex

func (d *Dao) ExpireIndex(c context.Context, oid int64, typ, sort int32) (ok bool, err error)

ExpireIndex set expire time for index.

func (*Dao) ExpireNewChildIndex

func (d *Dao) ExpireNewChildIndex(c context.Context, root int64) (ok bool, err error)

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 (d *Dao) ExsistsDelMid(c context.Context, mid int64) (ok bool, err error)

func (*Dao) FilterContents

func (d *Dao) FilterContents(ctx context.Context, rpMaps map[int64]string) error

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

func (d *Dao) InsertReply(c context.Context, r *model.Reply) (id int64, err error)

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

func (d *Dao) LiveActivityTitle(c context.Context, oid int64) (title, link string, err error)

LiveActivityTitle get live activity info.

func (*Dao) LiveNoticeTitle

func (d *Dao) LiveNoticeTitle(c context.Context, oid int64) (title, link string, err error)

LiveNoticeTitle get live notice info.

func (*Dao) LivePictureTitle

func (d *Dao) LivePictureTitle(c context.Context, oid int64) (title, link string, err error)

LivePictureTitle get live picture info.

func (*Dao) LiveVideoTitle

func (d *Dao) LiveVideoTitle(c context.Context, oid int64) (title, link string, err error)

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

func (d *Dao) LoadConfigByID(c context.Context, id int64) (m *model.Config, err error)

LoadConfigByID load a config record by id.

func (*Dao) MinScore

func (d *Dao) MinScore(c context.Context, oid int64, tp int32, sort int32) (score int32, err error)

MinScore get the lowest score from sorted set

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) Notice

func (dao *Dao) Notice(c context.Context, id uint32) (nt *model.Notice, err error)

Notice get one notice detail.

func (*Dao) NoticeTitle

func (d *Dao) NoticeTitle(c context.Context, oid int64) (title, link string, err error)

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) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping resouces is ok.

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) RemFolder

func (d *Dao) RemFolder(c context.Context, kind string, ID, rpID int64) (err error)

RemFolder ...

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

func (d *Dao) RemReplyFromRedis(c context.Context, keyMapping map[string][]int64) (err error)

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) Reply

func (d *Dao) Reply(c context.Context, oid, rpID int64) (r *model.Reply, err error)

Reply get a reply from database.

func (*Dao) ReplyCache

func (d *Dao) ReplyCache(c context.Context, rpID int64) (rp *model.Reply, err error)

ReplyCache get a reply from memcache.

func (*Dao) ReplyContent

func (d *Dao) ReplyContent(c context.Context, oid, rpID int64) (rc *model.ReplyContent, err error)

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) Report

func (d *Dao) Report(c context.Context, oid, rpID int64) (rpt *model.Report, err error)

Report get a reply report.

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) SendStats

func (d *Dao) SendStats(c context.Context, typ int32, oid int64, cnt int32) (err error)

SendStats update stat.

func (*Dao) SetDelMid

func (d *Dao) SetDelMid(c context.Context, mid int64) (err error)

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) Subject

func (d *Dao) Subject(c context.Context, oid int64, typ int32) (m *model.Subject, err error)

Subject get a subject from mysql.

func (*Dao) SubjectCache

func (d *Dao) SubjectCache(c context.Context, oid int64, typ int32) (sub *model.Subject, err error)

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) TopCache

func (d *Dao) TopCache(c context.Context, oid int64, attr uint32) (rp *model.Reply, err error)

TopCache get a reply from memcache.

func (*Dao) TopChildReply

func (d *Dao) TopChildReply(c context.Context, root, child int64) (err error)

TopChildReply ...

func (*Dao) TopicTitle

func (d *Dao) TopicTitle(c context.Context, oid int64) (title, link string, err error)

TopicTitle get topic info.

func (d *Dao) TopicsLink(c context.Context, links map[int64]string, isTopic bool) (err error)

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) TxReply

func (d *Dao) TxReply(tx *xsql.Tx, oid, rpID int64) (r *model.Reply, err error)

TxReply get a reply from database.

func (*Dao) TxReplyForUpdate

func (d *Dao) TxReplyForUpdate(tx *xsql.Tx, oid, rpID int64) (r *model.Reply, err error)

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) TxSubject

func (d *Dao) TxSubject(tx *xsql.Tx, oid int64, typ int32) (m *model.Subject, err error)

TxSubject get a subject from mysql.

func (*Dao) TxSubjectForUpdate

func (d *Dao) TxSubjectForUpdate(tx *xsql.Tx, oid int64, typ int32) (m *model.Subject, err error)

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

func (d *Dao) UpAdminNotNew(c context.Context, rpID []int64, now time.Time) (rows int64, err error)

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

func (dao *Dao) UpBusinessState(c context.Context, state, tp int32) (id int64, err error)

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

func (d *Dao) UpEmojiPackageSort(tx *xsql.Tx, ids string) (err error)

UpEmojiPackageSort udpate emojipack sort

func (*Dao) UpEmojiSort

func (d *Dao) UpEmojiSort(tx *xsql.Tx, ids string) (err error)

UpEmojiSort udpate emoji sort

func (*Dao) UpEmojiStateByID

func (d *Dao) UpEmojiStateByID(c context.Context, state int32, id int64) (idx int64, err error)

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

func (d *Dao) UpSearchMonitor(c context.Context, sub *model.Subject, remark string) (err error)

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

func (dao *Dao) UpdateNotice(c context.Context, nt *model.Notice) (rows int64, err error)

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.

func (*Dao) UpdateReplyState

func (d *Dao) UpdateReplyState(c context.Context, oid, rpID int64, state int32) (rows int64, err error)

UpdateReplyState update reply state.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL