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

Documentation

Index

Constants

View Source
const (
	// MaxSequence  max sequence in one time
	MaxSequence = 1000
	// WorkerBit worker bit
	WorkerBit = 10
	// SequenceBit sequence bit
	SequenceBit = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is growup service

func New

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

New fn

func (*Service) ArchiveBreach

func (s *Service) ArchiveBreach(c context.Context, mid int64, typ, page, size, all int) (data interface{}, err error)

ArchiveBreach get av_breach_record

func (*Service) ArchiveDetail

func (s *Service) ArchiveDetail(c context.Context, typ int, archiveID int64) (data interface{}, err error)

ArchiveDetail cal archive detail

func (*Service) ArchiveIncome

func (s *Service) ArchiveIncome(c context.Context, mid int64, typ, page, size, all int) (data map[string]interface{}, err error)

ArchiveIncome get archive income by mid

func (*Service) ArchiveSummary

func (s *Service) ArchiveSummary(c context.Context, typ int, mid int64) (data interface{}, err error)

ArchiveSummary get archive summary

func (*Service) AwardDetail

func (s *Service) AwardDetail(c context.Context, awardID int64) (data map[string]interface{}, err error)

AwardDetail get award detail include schedule & resource

func (*Service) AwardList

func (s *Service) AwardList(c context.Context) (as []*model.SimpleSpecialAward, err error)

AwardList award_id: award_name

func (*Service) Close

func (s *Service) Close()

Close dao

func (*Service) GetAwardUpStatus

func (s *Service) GetAwardUpStatus(c context.Context, awardID, mid int64) (status *model.AwardUpStatus, err error)

GetAwardUpStatus get award up status

func (*Service) GetBanner

func (s *Service) GetBanner(c context.Context) (b *model.Banner, err error)

GetBanner get banner for now

func (*Service) GetNotices

func (s *Service) GetNotices(c context.Context, typ int, platform int, offset, limit int) (notices []*model.Notice, total int64, err error)

GetNotices get notice

func (*Service) GetUpCharge

func (s *Service) GetUpCharge(c context.Context, mid int64, t time.Time) (total int, err error)

GetUpCharge get up daily sum(charge) last 30 days

func (*Service) GetUpStatus

func (s *Service) GetUpStatus(c context.Context, mid int64, ip string) (status *model.UpStatus, err error)

GetUpStatus status of user in growup plan by mid

func (*Service) GetWinningPoster

func (s *Service) GetWinningPoster(c context.Context, mid int64, awardID, prizeID int64) (poster *model.Poster, err error)

GetWinningPoster get prize winning poster

func (*Service) GetWinningRecord

func (s *Service) GetWinningRecord(c context.Context, mid int64) (rs []*model.WinningRecord, err error)

GetWinningRecord get winning record

func (*Service) GetWithdraw

func (s *Service) GetWithdraw(c context.Context, dateVersion string, from, limit int) (count int, withdrawVos []*model.WithdrawVo, err error)

GetWithdraw get up withdraw

func (*Service) GoodsBuy

func (s *Service) GoodsBuy(c context.Context, mid int64, productID string, goodsType int, price int64) (err error)

GoodsBuy buy goods from creative

func (*Service) GoodsRecord

func (s *Service) GoodsRecord(c context.Context, mid int64, page, size int) (monthOrder map[string][]*model.GoodsOrder, count int, err error)

GoodsRecord get goods record

func (*Service) GoodsShow

func (s *Service) GoodsShow(c context.Context, mid int64) (goods []*model.GoodsInfo, err error)

GoodsShow show goods

func (*Service) GoodsState

func (s *Service) GoodsState(c context.Context) (data interface{}, err error)

GoodsState get goods new state

func (*Service) InsertUpWithdrawRecord

func (s *Service) InsertUpWithdrawRecord(c context.Context, upIncomeWithdraw *model.UpIncomeWithdraw) (err error)

InsertUpWithdrawRecord insert up_withdraw_income record

func (*Service) JoinAv

func (s *Service) JoinAv(c context.Context, accountType int, mid int64, signType int) (err error)

JoinAv add user to growup plan (video)

func (*Service) JoinAward

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

JoinAward sign up award

func (*Service) JoinBgm

func (s *Service) JoinBgm(c context.Context, mid int64, accountType, signType int) (err error)

JoinBgm join bgm

func (*Service) JoinColumn

func (s *Service) JoinColumn(c context.Context, mid int64, accountType, signType int) (err error)

JoinColumn join up to creative column

func (*Service) LatestNotice

func (s *Service) LatestNotice(c context.Context, platform int) (notice *model.Notice, err error)

LatestNotice latest notice

func (*Service) Ping

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

Ping fn

func (*Service) Quit

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

Quit user quit growup plan

func (*Service) ShowActivity

func (s *Service) ShowActivity(c context.Context, mid, activityID int64) (ac *model.CActivity, err error)

ShowActivity show creative_activity

func (*Service) SignUpActivity

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

SignUpActivity up sign up activity

func (*Service) SpecialAwardInfo

func (s *Service) SpecialAwardInfo(c context.Context, mid int64) (data map[string]interface{}, err error)

SpecialAwardInfo special award info

func (*Service) UpBill

func (s *Service) UpBill(c context.Context, mid int64) (data interface{}, err error)

UpBill get up bill

func (*Service) UpIncomeStat

func (s *Service) UpIncomeStat(c context.Context, typ int, mid int64, date time.Time) (data interface{}, err error)

UpIncomeStat get up income stat by month

func (*Service) UpSummary

func (s *Service) UpSummary(c context.Context, mid int64) (data interface{}, err error)

UpSummary summary up income

func (*Service) UpWithdraw

func (s *Service) UpWithdraw(c context.Context, dateVersion string, from, limit int) (count int, upAccounts []*model.UpAccount, err error)

UpWithdraw get up withdraw

func (*Service) UpYear

func (s *Service) UpYear(c context.Context, mid int64) (data interface{}, err error)

UpYear up year

func (*Service) Winners

func (s *Service) Winners(c context.Context, awardID int64) (as []*model.Account, err error)

Winners get winners by award id

func (*Service) WithdrawDetail

func (s *Service) WithdrawDetail(c context.Context, mid int64) (upWithdraws []*model.UpIncomeWithdraw, err error)

WithdrawDetail get withdraw detail

func (*Service) WithdrawSuccess

func (s *Service) WithdrawSuccess(c context.Context, orderNo int64, tradeStatus int) (err error)

WithdrawSuccess withdraw success callback

type SnowFlake

type SnowFlake struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SnowFlake snow flake

func NewSnowFlake

func NewSnowFlake() *SnowFlake

NewSnowFlake new

func (*SnowFlake) Generate

func (s *SnowFlake) Generate() (int64, error)

Generate generate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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