Documentation
¶
Index ¶
- type Dao
- func (d *Dao) AddBlockInfo(c context.Context, b *model.BlockedInfo, ts time.Time) (id int64, err error)
- func (d *Dao) AddBlockInfoIdx(c context.Context, bl *model.BlockedInfo) (err error)
- func (d *Dao) AddBlockedCase(c context.Context, ca *model.Case) (err error)
- func (d *Dao) AddBlockedCaseModifyLog(c context.Context, cid int64, mType, oReason, mReason int8) (err error)
- func (d *Dao) AddMoney(c context.Context, mid int64, money float64, reason string) (err error)
- func (d *Dao) AddMoral(c context.Context, mid int64, moral float64, reasonType int8, ...) (err error)
- func (d *Dao) AutoCaseConf(c context.Context, otype int8) (ac *model.AutoCaseConf, err error)
- func (d *Dao) BlockAccount(c context.Context, r *model.BlockedInfo) (err error)
- func (d *Dao) BlockedInfoID(c context.Context, uid int64) (id int64, err error)
- func (d *Dao) CaseApplyReasonNum(c context.Context, cid int64, aReasons []int64) (cas []*model.CaseApplyModifyLog, err error)
- func (d *Dao) CaseApplyReasons(c context.Context, cid int64) (aReasons []int64, err error)
- func (d *Dao) CaseByID(c context.Context, id int64) (res model.Case, err error)
- func (d *Dao) CaseRelationIDCount(c context.Context, tp int8, relationID string) (count int64, err error)
- func (d *Dao) CaseVote(c context.Context, id int64) (res *model.CaseVote, err error)
- func (d *Dao) CaseVotesCID(c context.Context, cid int64) (res []*model.CaseVote, err error)
- func (d *Dao) CasesStatus(c context.Context, cids []int64) (map[int64]int8, error)
- func (d *Dao) CheckFilter(c context.Context, area, msg, ip string) (need bool, err error)
- func (d *Dao) Close()
- func (d *Dao) CountBlocked(c context.Context, uid int64, ts time.Time) (count int64, err error)
- func (d *Dao) CountCaseMID(c context.Context, mid int64, tp int8) (count int64, err error)
- func (d *Dao) CountKPIRate(c context.Context, mid int64) (count int, err error)
- func (d *Dao) DelAnswerStateCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelBlockedInfoIdx(c context.Context, bl *model.BlockedInfo) (err error)
- func (d *Dao) DelCaseIdx(c context.Context, cid int64) (err error)
- func (d *Dao) DelCaseInfoCache(c context.Context, cid int64) (err error)
- func (d *Dao) DelCaseVoteTopCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelGrantCase(c context.Context, cids []int64) (err error)
- func (d *Dao) DelJuryInfoCache(c context.Context, mid int64) (err error)
- func (d *Dao) DelOpinionCache(c context.Context, vid int64) (err error)
- func (d *Dao) DelReply(c context.Context, rpid, tp, oid string) (err error)
- func (d *Dao) DelTag(c context.Context, tid, aid string) (err error)
- func (d *Dao) DelVoteCaseCache(c context.Context, mid, cid int64) (err error)
- func (d *Dao) DelVoteIdx(c context.Context, cid int64) (err error)
- func (d *Dao) GrantCases(c context.Context) (cids []int64, err error)
- func (d *Dao) Grantcase(c context.Context, limit int) (mcases map[int64]*model.SimCase, err error)
- func (d *Dao) InvalidJury(c context.Context, reason, mid int64) (err error)
- func (d *Dao) KPIInfo(c context.Context, id int64) (res model.Kpi, err error)
- func (d *Dao) KPIList(c context.Context, day string) (res []model.Kpi, err error)
- func (d *Dao) LoadConf(c context.Context) (cf map[string]string, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) RegReply(c context.Context, id int64, tid int8) (err error)
- func (d *Dao) ReportDM(c context.Context, cid string, dmid string, result int64) (err error)
- func (d *Dao) SendMedal(c context.Context, mid int64, nid int64) (err error)
- func (d *Dao) SendMsg(c context.Context, mid int64, title string, context string) (err error)
- func (d *Dao) SendPendant(c context.Context, mid int64, pids []int64, day int64) (err error)
- func (d *Dao) SetGrantCase(c context.Context, mcases map[int64]*model.SimCase) (err error)
- func (d *Dao) Sms(c context.Context, phone, token, msg string) (err error)
- func (d *Dao) TotalGrantCase(c context.Context) (count int, err error)
- func (d *Dao) UnBlockAccount(c context.Context, r *model.BlockedInfo) (err error)
- func (d *Dao) UpAppealState(c context.Context, bid, oid, eid int64) (err error)
- func (d *Dao) UpBlockedCaseReason(c context.Context, cid int64, reasonType int8) (affect int64, err error)
- func (d *Dao) UpBlockedCaseStatus(c context.Context, cid int64, status int8) (err error)
- func (d *Dao) UpGrantCase(c context.Context, ids []int64, stime xtime.Time, etime xtime.Time) (err error)
- func (d *Dao) UpReplyState(c context.Context, oid, rpid int64, tp, state int8) (err error)
- func (d *Dao) UpdateCase(c context.Context, st, jt, id int64) (err error)
- func (d *Dao) UpdateJuryExpired(c context.Context, mid int64, expired time.Time) (err error)
- func (d *Dao) UpdateKPI(c context.Context, id int64) (err error)
- func (d *Dao) UpdateKPIHandlerStatus(c context.Context, id int64) (err error)
- func (d *Dao) UpdateKPIPendentStatus(c context.Context, id int64) (err error)
- func (d *Dao) UpdatePunishResult(c context.Context, id int64, punishResult int8) (err error)
- func (d *Dao) UpdateVoteRight(c context.Context, mid int64) (err error)
- func (d *Dao) UpdateVoteTotal(c context.Context, mid 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) AddBlockInfo ¶
func (d *Dao) AddBlockInfo(c context.Context, b *model.BlockedInfo, ts time.Time) (id int64, err error)
AddBlockInfo add user block info.
func (*Dao) AddBlockInfoIdx ¶
AddBlockInfoIdx ZADD block info idx.
func (*Dao) AddBlockedCase ¶
AddBlockedCase add blocked case.
func (*Dao) AddBlockedCaseModifyLog ¶
func (d *Dao) AddBlockedCaseModifyLog(c context.Context, cid int64, mType, oReason, mReason int8) (err error)
AddBlockedCaseModifyLog add blocked case modify log.
func (*Dao) AddMoral ¶
func (d *Dao) AddMoral(c context.Context, mid int64, moral float64, reasonType int8, oper, reason, remark, remoteIP string) (err error)
AddMoral add or reduce moral to user
func (*Dao) AutoCaseConf ¶
AutoCaseConf get auto case config.
func (*Dao) BlockAccount ¶
BlockAccount block account.
func (*Dao) BlockedInfoID ¶
BlockedInfoID get user blocked new info.
func (*Dao) CaseApplyReasonNum ¶
func (d *Dao) CaseApplyReasonNum(c context.Context, cid int64, aReasons []int64) (cas []*model.CaseApplyModifyLog, err error)
CaseApplyReasonNum case group apply reasons num.
func (*Dao) CaseApplyReasons ¶
CaseApplyReasons case apply reasons.
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) CaseVotesCID ¶
CaseVotesCID is blocked case vote list by cid.
func (*Dao) CasesStatus ¶
CasesStatus get cases status.
func (*Dao) CheckFilter ¶
CheckFilter check content filter.
func (*Dao) CountBlocked ¶
CountBlocked get user block count ofter ts.
func (*Dao) CountCaseMID ¶
CountCaseMID get count case by mid.
func (*Dao) CountKPIRate ¶
CountKPIRate count KPI rate<=4(C).
func (*Dao) DelAnswerStateCache ¶
DelAnswerStateCache del answer state cache info.
func (*Dao) DelBlockedInfoIdx ¶
DelBlockedInfoIdx ZREM block info idx.
func (*Dao) DelCaseIdx ¶
DelCaseIdx DEL case opinion idx.
func (*Dao) DelCaseInfoCache ¶
DelCaseInfoCache del case info cache info.
func (*Dao) DelCaseVoteTopCache ¶
DelCaseVoteTopCache del case vote total cache.
func (*Dao) DelGrantCase ¶
DelGrantCase del grant case id.
func (*Dao) DelJuryInfoCache ¶
DelJuryInfoCache del jury cache info.
func (*Dao) DelOpinionCache ¶
DelOpinionCache del opinion cache info.
func (*Dao) DelVoteCaseCache ¶
DelVoteCaseCache del vote case cache info.
func (*Dao) DelVoteIdx ¶
DelVoteIdx DEL case opinion idx.
func (*Dao) GrantCases ¶
GrantCases get granting case cids.
func (*Dao) InvalidJury ¶
InvalidJury set jury invalid.
func (*Dao) SendPendant ¶
SendPendant send pendant.
func (*Dao) SetGrantCase ¶
SetGrantCase set grant case ids.
func (*Dao) TotalGrantCase ¶
TotalGrantCase get length of grant case ids.
func (*Dao) UnBlockAccount ¶
UnBlockAccount unblock account.
func (*Dao) UpAppealState ¶
UpAppealState .
func (*Dao) UpBlockedCaseReason ¶
func (d *Dao) UpBlockedCaseReason(c context.Context, cid int64, reasonType int8) (affect int64, err error)
UpBlockedCaseReason update blocked case reason.
func (*Dao) UpBlockedCaseStatus ¶
UpBlockedCaseStatus update blocked case status.
func (*Dao) UpGrantCase ¶
func (d *Dao) UpGrantCase(c context.Context, ids []int64, stime xtime.Time, etime xtime.Time) (err error)
UpGrantCase update blocked_case from que to granting.
func (*Dao) UpReplyState ¶
UpReplyState update reply state.
func (*Dao) UpdateCase ¶
UpdateCase update case status to st.
func (*Dao) UpdateJuryExpired ¶
UpdateJuryExpired update jury expired.
func (*Dao) UpdateKPIHandlerStatus ¶
UpdateKPIHandlerStatus update blocked_kpi handler status.
func (*Dao) UpdateKPIPendentStatus ¶
UpdateKPIPendentStatus update blocked_kpi status to st.
func (*Dao) UpdatePunishResult ¶
UpdatePunishResult update table blocked_case punish_result field =0
func (*Dao) UpdateVoteRight ¶
UpdateVoteRight update vote total and vote right.