service

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service struct of service.

func New

func New(c *conf.Config) (s *Service)

New create service instance and return.

func (*Service) AddAppeal

func (s *Service) AddAppeal(c context.Context, btid, bid, mid int64, reason string) (err error)

AddAppeal add a new appeal .

func (*Service) AddBatchBlockedInfo

func (s *Service) AddBatchBlockedInfo(c context.Context, argJBs *model.ArgJudgeBatchBlocked) (err error)

AddBatchBlockedInfo add batch blocked info.

func (*Service) AddBlockedCases

func (s *Service) AddBlockedCases(c context.Context, bc []*model.ArgJudgeCase) (err error)

AddBlockedCases batch add blocked cases.

func (*Service) AddBlockedInfo

func (s *Service) AddBlockedInfo(c context.Context, argJB *model.ArgJudgeBlocked) (err error)

AddBlockedInfo add blocked info.

func (*Service) AddQs

func (s *Service) AddQs(c context.Context, qs *model.LabourQs) (err error)

AddQs add labour question.

func (*Service) AnnouncementInfo

func (s *Service) AnnouncementInfo(c context.Context, aid int64) (res *model.BlockedAnnouncement, err error)

AnnouncementInfo get announcement detail.

func (*Service) AnnouncementList

func (s *Service) AnnouncementList(c context.Context, tp int8, pn, ps int64) (resp *model.AnnounceList, err error)

AnnouncementList get announcement list.

func (*Service) AppealState

func (s *Service) AppealState(c context.Context, mid, bid int64) (state bool, err error)

AppealState appeal status .

func (*Service) Apply

func (s *Service) Apply(c context.Context, mid int64) (err error)

Apply user apply jury.

func (*Service) BLKHistorys

func (s *Service) BLKHistorys(c context.Context, ah *model.ArgHistory) (rhs *model.ResBLKHistorys, err error)

BLKHistorys get blocked historys list.

func (*Service) BatchBLKCases

func (s *Service) BatchBLKCases(c context.Context, ids []int64) (cases map[int64]*model.BlockedCase, err error)

BatchBLKCases get batch blocked cases by ids.

func (*Service) BatchBLKInfos

func (s *Service) BatchBLKInfos(c context.Context, ids []int64) (items map[int64]*model.BlockedInfo, err error)

BatchBLKInfos mutli get blocked info by ids.

func (*Service) BatchPublishs

func (s *Service) BatchPublishs(c context.Context, ids []int64) (res map[int64]*model.BlockedAnnouncement, err error)

BatchPublishs get publish info list.

func (*Service) BlockedInfo

func (s *Service) BlockedInfo(c context.Context, id int64) (info *model.BlockedInfo, err error)

BlockedInfo blocked info

func (*Service) BlockedInfoAppeal

func (s *Service) BlockedInfoAppeal(c context.Context, id, mid int64) (info *model.BlockedInfo, err error)

BlockedInfoAppeal get blocked info for appeal .

func (*Service) BlockedList

func (s *Service) BlockedList(c context.Context, oType, bType int8, pn, ps int) (res []*model.BlockedInfo, err error)

BlockedList blocked info list, public default.

func (*Service) BlockedNumUser

func (s *Service) BlockedNumUser(c context.Context, mid int64) (blockedSum *model.ResBlockedNumUser, err error)

BlockedNumUser get blocked user number.

func (*Service) BlockedUserCard

func (s *Service) BlockedUserCard(c context.Context, mid int64) (card *model.BlockedUserCard, err error)

BlockedUserCard get user blocked card info.

func (*Service) BlockedUserList

func (s *Service) BlockedUserList(c context.Context, mid int64) (r []*model.BlockedInfo, err error)

BlockedUserList get user blocked info list

func (*Service) CaseInfo

func (s *Service) CaseInfo(c context.Context, cid int64) (res *model.BlockedCase, err error)

CaseInfo jury get case info.

func (*Service) CaseInfoCache

func (s *Service) CaseInfoCache(c context.Context, cid int64) (bc *model.BlockedCase, err error)

CaseInfoCache .

func (*Service) CaseList

func (s *Service) CaseList(c context.Context, mid, pn, ps int64) (res []*model.BlockedCase, err error)

CaseList user case list. TODO:cache

func (*Service) CaseListCache

func (s *Service) CaseListCache(c context.Context, mid, pn, ps int64) (bs []*model.BlockedCase, err error)

CaseListCache .

func (*Service) CaseObtain

func (s *Service) CaseObtain(c context.Context, mid int64, pubCid int64) (cid int64, err error)

CaseObtain jury user obtain case list.

func (*Service) CaseObtainByID

func (s *Service) CaseObtainByID(c context.Context, mid, cid int64) (err error)

CaseObtainByID obtain case by case id. NOTE: just for specific case.

func (*Service) CaseOpinion

func (s *Service) CaseOpinion(c context.Context, cid, pn, ps int64) (ops []*model.Opinion, count int, err error)

CaseOpinion get case opinion.

func (*Service) Close

func (s *Service) Close()

Close dao.

func (*Service) CommitQs

func (s *Service) CommitQs(c context.Context, mid int64, refer string, ua string, buvid string, ans *model.LabourAns) (commitRs *model.CommitRs, err error)

CommitQs commit questions.

func (*Service) DelOpinion

func (s *Service) DelOpinion(c context.Context, cid, opid int64) (err error)

DelOpinion del opinion.

func (*Service) DelQs

func (s *Service) DelQs(c context.Context, id int64, isDel int64) (err error)

DelQs del labour question.

func (*Service) GetQs

func (s *Service) GetQs(c context.Context, mid int64) (qs []*model.LabourQs, err error)

GetQs get question.

func (*Service) IsAnswered

func (s *Service) IsAnswered(c context.Context, mid int64, mtime int64) (state int8, err error)

IsAnswered labour check user is answwered question between the time.

func (*Service) Jury

func (s *Service) Jury(c context.Context, mid int64) (ui *model.UserInfo, err error)

Jury jury user info.

func (*Service) JuryCase

func (s *Service) JuryCase(c context.Context, mid int64, cid int64) (res *model.BlockedCase, err error)

JuryCase jury user case info contain vote.

func (*Service) JuryInfoCache

func (s *Service) JuryInfoCache(c context.Context, mid int64) (bj *model.BlockedJury, err error)

JuryInfoCache JuryInfo cache .

func (*Service) JuryInfos

func (s *Service) JuryInfos(c context.Context, mids []int64) (res map[int64]*model.ResJuryerStatus, err error)

JuryInfos mutli get jurys info.

func (*Service) KPIList

func (s *Service) KPIList(c context.Context, mid int64) (res []*model.KPI, err error)

KPIList get kpi list.

func (*Service) LoadAnnouncement

func (s *Service) LoadAnnouncement(c context.Context)

LoadAnnouncement load AnnouncementList.

func (*Service) Notice

func (s *Service) Notice(c context.Context) (n *model.Notice, err error)

Notice get notice info.

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping check server ok.

func (*Service) ReasonList

func (s *Service) ReasonList(c context.Context) (n []*model.Reason, err error)

ReasonList get reason list.

func (*Service) Requirement

func (s *Service) Requirement(c context.Context, mid int64) (jr *model.JuryRequirement, err error)

Requirement user status in apply jury.

func (*Service) SetQs

func (s *Service) SetQs(c context.Context, id int64, ans int64, status int64) (err error)

SetQs set labour question field.

func (*Service) SpJuryCase

func (s *Service) SpJuryCase(c context.Context, mid int64, cid int64) (res *model.BlockedCase, err error)

SpJuryCase get specific jury case info. NOTE : just for specific case for boss.

func (*Service) Vote

func (s *Service) Vote(c context.Context, mid, cid int64, attr, vote, aType, aReason int8, oc string, likes, hates []int64) (err error)

Vote jury user vote case.

func (*Service) VoteInfo

func (s *Service) VoteInfo(c context.Context, mid int64, cid int64) (vi *model.VoteInfo, err error)

VoteInfo jury user vote info.

func (*Service) VoteInfoCache

func (s *Service) VoteInfoCache(c context.Context, mid, cid int64) (vi *model.VoteInfo, err error)

VoteInfoCache use vote cid info.

func (*Service) VoteOpinion

func (s *Service) VoteOpinion(c context.Context, cid, pn, ps int64, otype int8) (ops []*model.Opinion, count int, err error)

VoteOpinion get vote opinion.

Jump to

Keyboard shortcuts

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