Documentation
¶
Index ¶
- type Dao
- func (d *Dao) AddAnsLog(c context.Context, mid int64, score int64, anstr string, stime ctime.Time) (affect int64, err error)
- func (d *Dao) AddAppeal(c context.Context, tid, btid, oid, mid, business int64, content, reason string) (err error)
- func (d *Dao) AddBlockedCases(c context.Context, bc []*model.ArgJudgeCase) (err error)
- func (d *Dao) AddBlockedInfo(c context.Context, r *model.BlockedInfo) (err error)
- func (d *Dao) AddCaseReasonApply(c context.Context, mid, cid int64, applyType, originReason, applyReason int8) (err error)
- func (d *Dao) AddCaseVoteTotal(c context.Context, field string, cid int64, voteNum int8) (err error)
- func (d *Dao) AddHates(c context.Context, ids []int64) (affect int64, err error)
- func (d *Dao) AddLikes(c context.Context, ids []int64) (affect int64, err error)
- func (d *Dao) AddOpinionCache(c context.Context, op *model.Opinion) (err error)
- func (d *Dao) AddOpinionTx(tx *sql.Tx, cid, opid, mid int64, content string, attr, vote, state int8) (affect int64, err error)
- func (d *Dao) AddQs(c context.Context, qs *model.LabourQs) (err error)
- func (d *Dao) AddUserVoteTotal(c context.Context, mid int64) (err error)
- func (d *Dao) AnnouncementInfo(c context.Context, aid int64) (r *model.BlockedAnnouncement, err error)
- func (d *Dao) AnnouncementList(c context.Context) (res []*model.BlockedAnnouncement, err error)
- func (d *Dao) AnswerStatus(c context.Context, mid int64, ts time.Time) (status bool, err error)
- func (d *Dao) AppealList(c context.Context, mid int64, business int) (as []*model.Appeal, err error)
- func (d *Dao) BLKHistoryCount(c context.Context, ArgHis *model.ArgHistory) (count int64, err error)
- func (d *Dao) BLKHistorys(c context.Context, ah *model.ArgHistory) (res []*model.BlockedInfo, err error)
- func (d *Dao) BatchPublishs(c context.Context, ids []int64) (res map[int64]*model.BlockedAnnouncement, err error)
- func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)
- func (d *Dao) BlockTotalTime(c context.Context, mid int64, ts time.Time) (total int64, err error)
- func (d *Dao) BlockedCount(c context.Context, mid int64) (count int, err error)
- func (d *Dao) BlockedIdxCache(c context.Context, otype, btype int8, start, end int) (ids []int64, err error)
- func (d *Dao) BlockedInfoByID(c context.Context, id int64) (r *model.BlockedInfo, err error)
- func (d *Dao) BlockedInfoCache(c context.Context, id int64) (info *model.BlockedInfo, err error)
- func (d *Dao) BlockedInfoIDs(c context.Context, ids []int64) (res map[int64]*model.BlockedInfo, err error)
- func (d *Dao) BlockedInfos(c context.Context, ids []int64) (res []*model.BlockedInfo, err error)
- func (d *Dao) BlockedInfosCache(c context.Context, ids []int64) (infos []*model.BlockedInfo, miss []int64, err error)
- func (d *Dao) BlockedList(c context.Context, otype, btype int8) (res []*model.BlockedInfo, err error)
- func (d *Dao) BlockedNumUser(c context.Context, mid int64) (count int, err error)
- func (d *Dao) BlockedUserList(c context.Context, mid int64) (res []*model.BlockedInfo, err error)
- func (d *Dao) BlockedUserListCache(c context.Context, mid int64) (ls []*model.BlockedInfo, err error)
- func (d *Dao) CaseInfo(c context.Context, cid int64) (r *model.BlockedCase, err error)
- func (d *Dao) CaseInfoCache(c context.Context, cid int64) (bc *model.BlockedCase, err error)
- func (d *Dao) CaseInfoIDs(c context.Context, ids []int64) (cases map[int64]*model.BlockedCase, err error)
- func (d *Dao) CaseObtainMID(c context.Context, mid int64, isToday bool) (cases map[int64]*model.SimCase, err error)
- func (d *Dao) CaseOpIdxCache(c context.Context, cid, start, end int64) (ids []int64, err error)
- func (d *Dao) CaseRelationIDCount(c context.Context, tp int8, relationID string) (count int64, err error)
- func (d *Dao) CaseVoteIDMID(c context.Context, mid, pn, ps int64) (vids []int64, cids []int64, err error)
- func (d *Dao) CaseVoteIDTop(c context.Context, mid int64) (vids []int64, cids []int64, err error)
- func (d *Dao) CaseVoteIDs(c context.Context, ids []int64) (mbc map[int64]*model.BlockedCase, err error)
- func (d *Dao) CaseVoteTopCache(c context.Context, mid int64) (bs []*model.BlockedCase, err error)
- func (d *Dao) CaseVotesMID(c context.Context, ids []int64) (mvo map[int64]*model.VoteInfo, err error)
- func (d *Dao) Close()
- func (d *Dao) CountCaseVote(c context.Context, mid int64) (r int64, err error)
- func (d *Dao) DelCaseIdx(c context.Context, cid int64) (err error)
- func (d *Dao) DelJuryInfoCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelNoticeInfoCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelOpinion(c context.Context, opid int64) (err error)
- func (d *Dao) DelQs(c context.Context, id int64, isDel int64) (err error)
- func (d *Dao) DelQsCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelReasonListCache(c context.Context) (err error)
- func (d *Dao) DelVoteIdx(c context.Context, cid int64) (err error)
- func (d *Dao) ExpireBlockedIdx(c context.Context, otype, btype int8) (ok bool, err error)
- func (d *Dao) ExpireCaseIdx(c context.Context, cid int64) (ok bool, err error)
- func (d *Dao) ExpireVoteIdx(c context.Context, cid int64, otype int8) (ok bool, err error)
- func (d *Dao) GetAnswerStateCache(c context.Context, mid int64) (state int8, found bool, err error)
- func (dao *Dao) GetQS(c context.Context, mid int64) (qs *model.AIQsID, err error)
- func (d *Dao) GetQsCache(c context.Context, mid int64) (qsid *model.QsCache, err error)
- func (d *Dao) GrantCases(c context.Context) (mcases map[int64]*model.SimCase, err error)
- func (d *Dao) InsVote(c context.Context, mid int64, cid int64, t int64) (err error)
- func (d *Dao) IsExpiredObtainMID(c context.Context, mid int64, isToday bool) (ok bool, err error)
- func (d *Dao) IsVote(c context.Context, mid int64, cid int64) (r int64, err error)
- func (d *Dao) JuryApply(c context.Context, mid int64, expired time.Time) (err error)
- func (d *Dao) JuryInfo(c context.Context, mid int64) (r *model.BlockedJury, err error)
- func (d *Dao) JuryInfoCache(c context.Context, mid int64) (bj *model.BlockedJury, err error)
- func (d *Dao) JuryInfos(c context.Context, mids []int64) (mbj map[int64]*model.BlockedJury, err error)
- func (d *Dao) KPIList(c context.Context, mid int64) (res []*model.KPIData, err error)
- func (d *Dao) LastAuditQuestion(c context.Context) (res []*model.LabourQs, avIDs []int64, err error)
- func (d *Dao) LastNoAuditQuestion(c context.Context) (res []*model.LabourQs, avIDs []int64, err error)
- func (d *Dao) LenCaseIdx(c context.Context, cid int64) (count int, err error)
- func (d *Dao) LenVoteIdx(c context.Context, cid int64, otype int8) (count int, err error)
- func (d *Dao) LoadBlockedIdx(c context.Context, otype, btype int8, infos []*model.BlockedInfo) (err error)
- func (d *Dao) LoadCaseIdxs(c context.Context, cid int64, ops []*model.Opinion) (err error)
- func (d *Dao) LoadConf(c context.Context) (cf map[string]string, err error)
- func (d *Dao) LoadVoteCaseMID(c context.Context, mid int64, mcases map[int64]*model.SimCase, isToday bool) (err error)
- func (d *Dao) LoadVoteIDsMid(c context.Context, mid int64, day int) (cases map[int64]*model.SimCase, err error)
- func (d *Dao) LoadVoteOpIdxs(c context.Context, cid int64, otype int8, idx []int64) (err error)
- func (d *Dao) Manager(c context.Context, pn, ps int64) (mi []*model.MangerInfo, err error)
- func (d *Dao) ManagerTotal(c context.Context) (count int64, err error)
- func (d *Dao) Managers(c context.Context) (manMap map[string]int64, err error)
- func (d *Dao) NewKPI(c context.Context, mid int64) (rate int8, err error)
- func (d *Dao) Notice(c context.Context) (n *model.Notice, err error)
- func (d *Dao) NoticeInfoCache(c context.Context) (dt *model.Notice, err error)
- func (d *Dao) OpContentMid(c context.Context, mid int64) (content string, err error)
- func (d *Dao) OpinionCaseIdx(c context.Context, cid int64) (ops []*model.Opinion, err error)
- func (d *Dao) OpinionIdx(c context.Context, cid int64) (ops []*model.Opinion, err error)
- func (d *Dao) Opinions(c context.Context, opids []int64) (ops []*model.Opinion, err error)
- func (d *Dao) OpinionsCache(c context.Context, opids []int64) (ops map[int64]*model.Opinion, miss []int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubLabour(c context.Context, aid int64, msg interface{}) (err error)
- func (d *Dao) QsAllList(c context.Context, idStr string) (mlab map[int64]*model.LabourQs, labs []*model.LabourQs, avIDs []int64, ...)
- func (d *Dao) QsList(c context.Context, idStr string) (res []*model.LabourQs, err error)
- func (d *Dao) ReasonList(c context.Context) (res []*model.Reason, err error)
- func (d *Dao) ReasonListCache(c context.Context) (dt []*model.Reason, err error)
- func (dao *Dao) ReplysCount(c context.Context, oid []int64) (counts map[string]int64, err error)
- func (dao *Dao) SendMedal(c context.Context, mid int64, nid int64) (err error)
- func (dao *Dao) SendSysMsg(c context.Context, mid int64, title string, context string) (err error)
- func (d *Dao) SetAnswerStateCache(c context.Context, mid int64, state int8) (err error)
- func (d *Dao) SetBlockedInfoCache(c context.Context, id int64, info *model.BlockedInfo) (err error)
- func (d *Dao) SetBlockedInfosCache(c context.Context, infos []*model.BlockedInfo) (err error)
- func (d *Dao) SetBlockedUserListCache(c context.Context, mid int64, ls []*model.BlockedInfo) (err error)
- func (d *Dao) SetCaseInfoCache(c context.Context, cid int64, bc *model.BlockedCase) (err error)
- func (d *Dao) SetCaseVoteTopCache(c context.Context, mid int64, bs []*model.BlockedCase) (err error)
- func (d *Dao) SetJuryInfoCache(c context.Context, mid int64, bj *model.BlockedJury) (err error)
- func (d *Dao) SetNoticeInfoCache(c context.Context, n *model.Notice) (err error)
- func (d *Dao) SetQs(c context.Context, id int64, ans int64, status int64) (err error)
- func (d *Dao) SetQsCache(c context.Context, mid int64, qsid *model.QsCache) (err error)
- func (d *Dao) SetReasonListCache(c context.Context, dt []*model.Reason) (err error)
- func (d *Dao) SetVoteCaseMID(c context.Context, mid int64, sc *model.SimCase) (err error)
- func (d *Dao) SetVoteInfoCache(c context.Context, mid, cid int64, vi *model.VoteInfo) (err error)
- func (d *Dao) SetVoteTx(tx *sql.Tx, mid, cid int64, vote int8) (affect int64, err error)
- func (d *Dao) Setvote(c context.Context, mid, cid, vote int64) (err error)
- func (d *Dao) TxAddBlockedInfo(tx *sql.Tx, rs []*model.BlockedInfo) (err error)
- func (d *Dao) VoteInfo(c context.Context, mid int64, cid int64) (r *model.VoteInfo, err error)
- func (d *Dao) VoteInfoCache(c context.Context, mid, cid int64) (vi *model.VoteInfo, err error)
- func (d *Dao) VoteOpIdxCache(c context.Context, cid, start, end int64, otype int8) (ids []int64, err error)
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 struct info of Dao.
func (*Dao) AddAnsLog ¶
func (d *Dao) AddAnsLog(c context.Context, mid int64, score int64, anstr string, stime ctime.Time) (affect int64, err error)
AddAnsLog add labour answer log.
func (*Dao) AddAppeal ¶
func (d *Dao) AddAppeal(c context.Context, tid, btid, oid, mid, business int64, content, reason string) (err error)
AddAppeal add appeal.
func (*Dao) AddBlockedCases ¶
AddBlockedCases batch add blocked cases.
func (*Dao) AddBlockedInfo ¶
AddBlockedInfo add blocked info
func (*Dao) AddCaseReasonApply ¶
func (d *Dao) AddCaseReasonApply(c context.Context, mid, cid int64, applyType, originReason, applyReason int8) (err error)
AddCaseReasonApply add case reason apply log.
func (*Dao) AddCaseVoteTotal ¶
func (d *Dao) AddCaseVoteTotal(c context.Context, field string, cid int64, voteNum int8) (err error)
AddCaseVoteTotal add case vote total.
func (*Dao) AddOpinionCache ¶
AddOpinionCache add opinion cache.
func (*Dao) AddOpinionTx ¶
func (d *Dao) AddOpinionTx(tx *sql.Tx, cid, opid, mid int64, content string, attr, vote, state int8) (affect int64, err error)
AddOpinionTx add user opinion by transaction.
func (*Dao) AddUserVoteTotal ¶
AddUserVoteTotal add user vote total.
func (*Dao) AnnouncementInfo ¶
func (d *Dao) AnnouncementInfo(c context.Context, aid int64) (r *model.BlockedAnnouncement, err error)
AnnouncementInfo get announcement detail.
func (*Dao) AnnouncementList ¶
AnnouncementList get accnoucement list.
func (*Dao) AnswerStatus ¶
AnswerStatus get blocked user answer status.
func (*Dao) AppealList ¶
func (d *Dao) AppealList(c context.Context, mid int64, business int) (as []*model.Appeal, err error)
AppealList appeal list .
func (*Dao) BLKHistoryCount ¶
BLKHistoryCount get blocked historys count.
func (*Dao) BLKHistorys ¶
func (d *Dao) BLKHistorys(c context.Context, ah *model.ArgHistory) (res []*model.BlockedInfo, err error)
BLKHistorys get blocked historys list.
func (*Dao) BatchPublishs ¶
func (d *Dao) BatchPublishs(c context.Context, ids []int64) (res map[int64]*model.BlockedAnnouncement, err error)
BatchPublishs get publish info list.
func (*Dao) BlockTotalTime ¶
BlockTotalTime get block total by time.
func (*Dao) BlockedCount ¶
BlockedCount get user blocked count.
func (*Dao) BlockedIdxCache ¶
func (d *Dao) BlockedIdxCache(c context.Context, otype, btype int8, start, end int) (ids []int64, err error)
BlockedIdxCache get block list idx.
func (*Dao) BlockedInfoByID ¶
BlockedInfoByID get blocked info by id.
func (*Dao) BlockedInfoCache ¶
BlockedInfoCache get blocked info by blocked id.
func (*Dao) BlockedInfoIDs ¶
func (d *Dao) BlockedInfoIDs(c context.Context, ids []int64) (res map[int64]*model.BlockedInfo, err error)
BlockedInfoIDs get blocked info by ids
func (*Dao) BlockedInfos ¶
BlockedInfos get blocked infos. Queryed without mid or id, public default.
func (*Dao) BlockedInfosCache ¶
func (d *Dao) BlockedInfosCache(c context.Context, ids []int64) (infos []*model.BlockedInfo, miss []int64, err error)
BlockedInfosCache get blocked infos by ids.
func (*Dao) BlockedList ¶
func (d *Dao) BlockedList(c context.Context, otype, btype int8) (res []*model.BlockedInfo, err error)
BlockedList get blocked list.
func (*Dao) BlockedNumUser ¶
BlockedNumUser get blocked user number.
func (*Dao) BlockedUserList ¶
BlockedUserList get user blocked list.
func (*Dao) BlockedUserListCache ¶
func (d *Dao) BlockedUserListCache(c context.Context, mid int64) (ls []*model.BlockedInfo, err error)
BlockedUserListCache get user blocked list.
func (*Dao) CaseInfoCache ¶
CaseInfoCache get case info cache
func (*Dao) CaseInfoIDs ¶
func (d *Dao) CaseInfoIDs(c context.Context, ids []int64) (cases map[int64]*model.BlockedCase, err error)
CaseInfoIDs get case info by ids.
func (*Dao) CaseObtainMID ¶
func (d *Dao) CaseObtainMID(c context.Context, mid int64, isToday bool) (cases map[int64]*model.SimCase, err error)
CaseObtainMID get voted cids by MID.
func (*Dao) CaseOpIdxCache ¶
CaseOpIdxCache get case opinion index from cache.
func (*Dao) CaseRelationIDCount ¶
func (d *Dao) CaseRelationIDCount(c context.Context, tp int8, relationID string) (count int64, err error)
CaseRelationIDCount get case relation_id count.
func (*Dao) CaseVoteIDMID ¶
func (d *Dao) CaseVoteIDMID(c context.Context, mid, pn, ps int64) (vids []int64, cids []int64, err error)
CaseVoteIDMID get user's vote case ids and cids.
func (*Dao) CaseVoteIDTop ¶
CaseVoteIDTop get user's vote case ids and cids by top 100.
func (*Dao) CaseVoteIDs ¶
func (d *Dao) CaseVoteIDs(c context.Context, ids []int64) (mbc map[int64]*model.BlockedCase, err error)
CaseVoteIDs get user's vote info by ids.
func (*Dao) CaseVoteTopCache ¶
CaseVoteTopCache get case votes by top 100.
func (*Dao) CaseVotesMID ¶
func (d *Dao) CaseVotesMID(c context.Context, ids []int64) (mvo map[int64]*model.VoteInfo, err error)
CaseVotesMID get user's vote case ids.
func (*Dao) CountCaseVote ¶
CountCaseVote jury count case vote total.
func (*Dao) DelCaseIdx ¶
DelCaseIdx DEL case opinion idx.
func (*Dao) DelJuryInfoCache ¶
DelJuryInfoCache del jury cache info.
func (*Dao) DelNoticeInfoCache ¶
DelNoticeInfoCache delete notice info cache.
func (*Dao) DelOpinion ¶
DelOpinion del opinion.
func (*Dao) DelQsCache ¶
DelQsCache delete labour questions cache.
func (*Dao) DelReasonListCache ¶
DelReasonListCache delete reason info cache.
func (*Dao) DelVoteIdx ¶
DelVoteIdx DEL case opinion idx.
func (*Dao) ExpireBlockedIdx ¶
ExpireBlockedIdx expire case index cache.
func (*Dao) ExpireCaseIdx ¶
ExpireCaseIdx expire case index cache.
func (*Dao) ExpireVoteIdx ¶
ExpireVoteIdx expire vote idx.
func (*Dao) GetAnswerStateCache ¶
GetAnswerStateCache get labour answer state cache.
func (*Dao) GetQsCache ¶
GetQsCache get labour qestions info cache.
func (*Dao) GrantCases ¶
GrantCases get granting case cids.
func (*Dao) IsExpiredObtainMID ¶
IsExpiredObtainMID voted cids by MID of key is expired.
func (*Dao) JuryInfoCache ¶
JuryInfoCache .
func (*Dao) JuryInfos ¶
func (d *Dao) JuryInfos(c context.Context, mids []int64) (mbj map[int64]*model.BlockedJury, err error)
JuryInfos get user's applying jury info
func (*Dao) LastAuditQuestion ¶
func (d *Dao) LastAuditQuestion(c context.Context) (res []*model.LabourQs, avIDs []int64, err error)
LastAuditQuestion get new audit question data.
func (*Dao) LastNoAuditQuestion ¶
func (d *Dao) LastNoAuditQuestion(c context.Context) (res []*model.LabourQs, avIDs []int64, err error)
LastNoAuditQuestion get new no audit question data.
func (*Dao) LenCaseIdx ¶
LenCaseIdx get lenth of vote index.
func (*Dao) LenVoteIdx ¶
LenVoteIdx get lenth of vote index.
func (*Dao) LoadBlockedIdx ¶
func (d *Dao) LoadBlockedIdx(c context.Context, otype, btype int8, infos []*model.BlockedInfo) (err error)
LoadBlockedIdx laod blocked info index.
func (*Dao) LoadCaseIdxs ¶
LoadCaseIdxs load case opinion index into redis.
func (*Dao) LoadVoteCaseMID ¶
func (d *Dao) LoadVoteCaseMID(c context.Context, mid int64, mcases map[int64]*model.SimCase, isToday bool) (err error)
LoadVoteCaseMID load mid vote cases.
func (*Dao) LoadVoteIDsMid ¶
func (d *Dao) LoadVoteIDsMid(c context.Context, mid int64, day int) (cases map[int64]*model.SimCase, err error)
LoadVoteIDsMid load user vote case ids.
func (*Dao) LoadVoteOpIdxs ¶
LoadVoteOpIdxs load vote opinion index into cache.
func (*Dao) ManagerTotal ¶
ManagerTotal get manager user total.
func (*Dao) NoticeInfoCache ¶
NoticeInfoCache get notice info cache.
func (*Dao) OpContentMid ¶
OpContentMid get opinion content.
func (*Dao) OpinionCaseIdx ¶
OpinionCaseIdx get opinion case index.
func (*Dao) OpinionIdx ¶
OpinionIdx get opinion index.
func (*Dao) OpinionsCache ¶
func (d *Dao) OpinionsCache(c context.Context, opids []int64) (ops map[int64]*model.Opinion, miss []int64, err error)
OpinionsCache get opids opinion detail.
func (*Dao) QsAllList ¶
func (d *Dao) QsAllList(c context.Context, idStr string) (mlab map[int64]*model.LabourQs, labs []*model.LabourQs, avIDs []int64, err error)
QsAllList get question list.
func (*Dao) ReasonList ¶
ReasonList get reason list
func (*Dao) ReasonListCache ¶
ReasonListCache get Reason info cache.
func (*Dao) ReplysCount ¶
ReplysCount get reply count.
func (*Dao) SendSysMsg ¶
SendSysMsg send msg.
func (*Dao) SetAnswerStateCache ¶
SetAnswerStateCache set labour answer state cache.
func (*Dao) SetBlockedInfoCache ¶
SetBlockedInfoCache set user blocked list cache.
func (*Dao) SetBlockedInfosCache ¶
SetBlockedInfosCache set user blocked list cache.
func (*Dao) SetBlockedUserListCache ¶
func (d *Dao) SetBlockedUserListCache(c context.Context, mid int64, ls []*model.BlockedInfo) (err error)
SetBlockedUserListCache set user blocked list cache.
func (*Dao) SetCaseInfoCache ¶
SetCaseInfoCache set case info.
func (*Dao) SetCaseVoteTopCache ¶
func (d *Dao) SetCaseVoteTopCache(c context.Context, mid int64, bs []*model.BlockedCase) (err error)
SetCaseVoteTopCache set case votes by top 100.
func (*Dao) SetJuryInfoCache ¶
SetJuryInfoCache .
func (*Dao) SetNoticeInfoCache ¶
SetNoticeInfoCache get Notice info cache.
func (*Dao) SetQsCache ¶
SetQsCache set labour questions cache.
func (*Dao) SetReasonListCache ¶
SetReasonListCache get notice info cache.
func (*Dao) SetVoteCaseMID ¶
SetVoteCaseMID set vote case by mid on today.
func (*Dao) SetVoteInfoCache ¶
SetVoteInfoCache set vote case info.
func (*Dao) TxAddBlockedInfo ¶
TxAddBlockedInfo add blocked info
func (*Dao) VoteInfoCache ¶
VoteInfoCache get vote case info cache