income

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: 10 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 {
	Tx *sql.Tx
	// contains filtered or unexported fields
}

Dao dao

func New

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

New fn

func (*Dao) ArchiveChargeRatio

func (d *Dao) ArchiveChargeRatio(c context.Context, id int64, limit int64) (m map[int]map[int64]*model.ArchiveChargeRatio, last int64, err error)

ArchiveChargeRatio map[ctype]map[archive_id]*archiveChargeRatio

func (*Dao) AvChargeStatis

func (d *Dao) AvChargeStatis(c context.Context, id int64, limit int) (data []*model.AvChargeStatis, err error)

AvChargeStatis get av_charge_statis

func (*Dao) AvDailyCharge

func (d *Dao) AvDailyCharge(c context.Context, date time.Time, id int64, limit int) (data []*model.AvCharge, err error)

AvDailyCharge get av daily charge by date

func (*Dao) AvIncomeStat

func (d *Dao) AvIncomeStat(c context.Context, id int64, limit int64) (m map[int64]*model.AvIncomeStat, last int64, err error)

AvIncomeStat key: av_id

func (*Dao) AvMonthlyCharge

func (d *Dao) AvMonthlyCharge(c context.Context, date time.Time, id int64, limit int) (data []*model.AvCharge, err error)

AvMonthlyCharge get av monthly charge

func (*Dao) AvWeeklyCharge

func (d *Dao) AvWeeklyCharge(c context.Context, date time.Time, id int64, limit int) (data []*model.AvCharge, err error)

AvWeeklyCharge get av weekly charge

func (*Dao) BeginTran

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

BeginTran begin transcation

func (*Dao) BgmIncomeStat

func (d *Dao) BgmIncomeStat(c context.Context, id int64, limit int64) (m map[int64]*model.BgmIncomeStat, last int64, err error)

BgmIncomeStat key: sid

func (*Dao) Blacklist

func (d *Dao) Blacklist(c context.Context, id int64, limit int64) (m map[int][]int64, last int64, err error)

Blacklist map[ctype][]id

func (*Dao) BusinessOrders

func (d *Dao) BusinessOrders(c context.Context, offset, limit int64) (last int64, m map[int64]bool, err error)

BusinessOrders get business order

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) ColumnDailyCharge

func (d *Dao) ColumnDailyCharge(c context.Context, date time.Time, id int64, limit int) (columns []*model.ColumnCharge, err error)

ColumnDailyCharge get column daily charge by date

func (*Dao) ColumnIncomeStat

func (d *Dao) ColumnIncomeStat(c context.Context, id int64, limit int64) (m map[int64]*model.ColumnIncomeStat, last int64, err error)

ColumnIncomeStat key: av_id

func (*Dao) DelBGM

func (d *Dao) DelBGM(c context.Context, limit int64) (rows int64, err error)

DelBGM del bgm

func (*Dao) DelIncomeStatisTable

func (d *Dao) DelIncomeStatisTable(c context.Context, table, date string) (rows int64, err error)

DelIncomeStatisTable del income statis by table

func (*Dao) Exec

func (d *Dao) Exec(c context.Context, sql string) (err error)

Exec exec sql

func (*Dao) FixInsertUpIncome

func (d *Dao) FixInsertUpIncome(c context.Context, values string) (rows int64, err error)

FixInsertUpIncome batch insert up income

func (*Dao) FixInsertUpIncomeStat

func (d *Dao) FixInsertUpIncomeStat(c context.Context, values string) (rows int64, err error)

FixInsertUpIncomeStat fix insert up income stat

func (*Dao) GetArchiveByDate

func (d *Dao) GetArchiveByDate(c context.Context, aid, table, date string, id int64, limit int) (archives []*model.ArchiveIncome, err error)

GetArchiveByDate get archive by date

func (*Dao) GetAvCharge

func (d *Dao) GetAvCharge(c context.Context, sql string, date string, id int64, limit int) (data []*model.AvCharge, err error)

GetAvCharge get av charge by sql required

func (*Dao) GetBGM

func (d *Dao) GetBGM(c context.Context, id int64, limit int64) (bs []*model.BGM, last int64, err error)

GetBGM get bgms

func (*Dao) GetBgmIncomeByDate

func (d *Dao) GetBgmIncomeByDate(c context.Context, date string, id int64, limit int) (archives []*model.ArchiveIncome, err error)

GetBgmIncomeByDate get bgm income by date

func (*Dao) GetBubbleMeta

func (d *Dao) GetBubbleMeta(c context.Context, id int64, limit int64) (data map[int64][]int, last int64, err error)

GetBubbleMeta get bubble meta

func (*Dao) GetUpCharges

func (d *Dao) GetUpCharges(c context.Context, table string, date string, offset, limit int64) (last int64, charges map[int64]*model.UpCharge, err error)

GetUpCharges get up charges

func (*Dao) GetUpIncomeTable

func (d *Dao) GetUpIncomeTable(c context.Context, table, date string, id int64, limit int) (ups []*model.UpIncome, err error)

GetUpIncomeTable get up_income up_income_weekly up_income_monthly

func (*Dao) InsertAvChargeStatisBatch

func (d *Dao) InsertAvChargeStatisBatch(c context.Context, vals string) (count int64, err error)

InsertAvChargeStatisBatch add av charge statis batch

func (*Dao) InsertAvChargeTable

func (d *Dao) InsertAvChargeTable(c context.Context, vals, table string) (rows int64, err error)

InsertAvChargeTable add av charge batch

func (*Dao) InsertAvIncome

func (d *Dao) InsertAvIncome(c context.Context, values string) (rows int64, err error)

InsertAvIncome batch insert av income

func (*Dao) InsertAvIncomeStat

func (d *Dao) InsertAvIncomeStat(c context.Context, values string) (rows int64, err error)

InsertAvIncomeStat batch insert av income stat

func (*Dao) InsertBGM

func (d *Dao) InsertBGM(c context.Context, values string) (rows int64, err error)

InsertBGM insert bgm from data platform

func (*Dao) InsertBgmIncome

func (d *Dao) InsertBgmIncome(c context.Context, values string) (rows int64, err error)

InsertBgmIncome batch insert bgm income

func (*Dao) InsertBgmIncomeStat

func (d *Dao) InsertBgmIncomeStat(c context.Context, values string) (rows int64, err error)

InsertBgmIncomeStat batch insert bgm income stat

func (*Dao) InsertColumnChargeTable

func (d *Dao) InsertColumnChargeTable(c context.Context, vals, table string) (rows int64, err error)

InsertColumnChargeTable add av charge batch

func (*Dao) InsertColumnIncome

func (d *Dao) InsertColumnIncome(c context.Context, values string) (rows int64, err error)

InsertColumnIncome batch insert column income

func (*Dao) InsertColumnIncomeStat

func (d *Dao) InsertColumnIncomeStat(c context.Context, values string) (rows int64, err error)

InsertColumnIncomeStat batch insert column income stat

func (*Dao) InsertIncomeStatisTable

func (d *Dao) InsertIncomeStatisTable(c context.Context, table, vals string) (rows int64, err error)

InsertIncomeStatisTable add av_income_date_statis batch

func (*Dao) InsertUpAccount

func (d *Dao) InsertUpAccount(c context.Context, values string) (rows int64, err error)

InsertUpAccount batch insert up account

func (*Dao) InsertUpCharge

func (d *Dao) InsertUpCharge(c context.Context, table string, values string) (rows int64, err error)

InsertUpCharge batch insert up charge

func (*Dao) InsertUpIncome

func (d *Dao) InsertUpIncome(c context.Context, values string) (rows int64, err error)

InsertUpIncome batch insert up income

func (*Dao) InsertUpIncomeDailyStatis

func (d *Dao) InsertUpIncomeDailyStatis(c context.Context, table string, vals string) (rows int64, err error)

InsertUpIncomeDailyStatis add up_income_daily_statis batch

func (*Dao) InsertUpIncomeStat

func (d *Dao) InsertUpIncomeStat(c context.Context, values string) (rows int64, err error)

InsertUpIncomeStat batch insert up income stat

func (*Dao) InsertUpIncomeTable

func (d *Dao) InsertUpIncomeTable(c context.Context, table, values string) (rows int64, err error)

InsertUpIncomeTable insert up_income up_income_weekly up_income_monthly

func (*Dao) Ping

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

Ping ping health.

func (*Dao) Query

func (d *Dao) Query(c context.Context, sql string) (rows *sql.Rows, err error)

Query query

func (*Dao) QueryRow

func (d *Dao) QueryRow(c context.Context, sql string) (rows *sql.Row)

QueryRow query row

func (*Dao) UpAccount

func (d *Dao) UpAccount(c context.Context, mid int64) (a *model.UpAccount, err error)

UpAccount get up account by mid

func (*Dao) UpAccounts

func (d *Dao) UpAccounts(c context.Context, id int64, limit int64) (m map[int64]*model.UpAccount, last int64, err error)

UpAccounts batch read up account

func (*Dao) UpChargeRatio

func (d *Dao) UpChargeRatio(c context.Context, id int64, limit int64) (m map[int]map[int64]*model.UpChargeRatio, last int64, err error)

UpChargeRatio get every day up charge ratio

func (*Dao) UpIncomeStat

func (d *Dao) UpIncomeStat(c context.Context, id int64, limit int64) (m map[int64]*model.UpIncomeStat, last int64, err error)

UpIncomeStat return m key: mid, value: total_income

func (*Dao) UpIncomes

func (d *Dao) UpIncomes(c context.Context, id int64, limit int64) (last int64, us []*model.UpIncome, err error)

UpIncomes up incomes

func (*Dao) UpdateUpAccount

func (d *Dao) UpdateUpAccount(c context.Context, mid, ver, totalIncome, totalUnwithdrawIncome int64) (rows int64, err error)

UpdateUpAccount update up account by mid and version instead batch update

func (*Dao) Ups

func (d *Dao) Ups(c context.Context, business string, offset int64, limit int64) (last int64, ups map[int64]*model.Signed, err error)

Ups get ups by business type

type IAvCharge

type IAvCharge func(c context.Context, date time.Time, id int64, limit int) (data []*model.AvCharge, err error)

IAvCharge av charge func

Jump to

Keyboard shortcuts

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