Documentation ¶
Index ¶
- func Div(x, y float64) float64
- func DivWithRound(x, y float64, places int) float64
- func Mul(x, y float64) float64
- func MulWithRound(x, y float64, places int) float64
- func Round(val float64, places int) float64
- func Tax(income float64) (tax float64)
- type AvChargeSvr
- func (s *AvChargeSvr) AvChargeDBStore(c context.Context, weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge) (err error)
- func (s *AvChargeSvr) AvChargeStatisDBStore(c context.Context, chargeStatisMap map[int64]*model.AvChargeStatis) error
- func (s *AvChargeSvr) AvCharges(c context.Context, date time.Time, ch chan []*model.AvCharge, ...) (err error)
- func (s *AvChargeSvr) CalAvCharge(date time.Time, weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge, ...)
- func (s *AvChargeSvr) CalAvChargeStatis(dailyCharge *model.AvCharge, chargeStatisMap map[int64]*model.AvChargeStatis)
- func (s *AvChargeSvr) GetAvCharge(c context.Context, date time.Time, fn dao.IAvCharge) (avCharges []*model.AvCharge, err error)
- func (s *AvChargeSvr) GetAvChargeStatis(c context.Context) (avChargeStatis []*model.AvChargeStatis, err error)
- func (s *AvChargeSvr) GetAvChargeStatisMap(c context.Context) (chargeStatisMap map[int64]*model.AvChargeStatis, err error)
- func (s *AvChargeSvr) HandleAvCharge(c context.Context, date time.Time, dailyChannel chan []*model.AvCharge) (weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge, ...)
- type AvFilter
- type AvIncomeStatSvr
- type AvIncomeSvr
- type BgmFilter
- type BgmIncomeStatSvr
- type BgmIncomeSvr
- type ChargeRatioSvr
- type ChargeRegulator
- type ColumnFilter
- type ColumnIncomeStatSvr
- type ColumnIncomeSvr
- type DateStatis
- type Income
- func (p *Income) CalAvIncome(ch chan []*model.AvCharge, urs map[int64]*model.UpChargeRatio, ...) (am map[int64][]*model.AvIncome, total map[int64]*model.UpBusinessIncome)
- func (p *Income) CalBgmIncome(ch chan []*model.AvCharge, bgms map[int64][]*model.BGM, ...) (bm map[int64]map[int64]map[int64]*model.BgmIncome, ...)
- func (p *Income) CalColumnIncome(ch chan []*model.ColumnCharge, urs map[int64]*model.UpChargeRatio, ...) (cm map[int64][]*model.ColumnIncome, total map[int64]*model.UpBusinessIncome)
- func (p *Income) CalUpIncome(ch chan map[int64]*model.UpBusinessIncome, date time.Time) (m map[int64]*model.UpIncome)
- func (p *Income) IncomeStat(um map[int64]*model.UpIncome, am map[int64][]*model.AvIncome, ...)
- func (p *Income) PurgeUpAccount(date time.Time, accs map[int64]*model.UpAccount, um map[int64]*model.UpIncome)
- func (p *Income) UpdateBusinessIncomeByDate(c context.Context, date string) (err error)
- type SectionEntries
- type Service
- func (s *Service) BGMs(c context.Context, limit int64) (bm map[int64][]*model.BGM, err error)
- func (s *Service) Blacklist(c context.Context, limit int64) (m map[int]map[int64]bool, err error)
- func (s *Service) GetBubbleMeta(c context.Context) (data map[int64][]int, err error)
- func (s *Service) GetBusinessOrders(c context.Context, limit int64) (result map[int64]bool, err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) RunAndSendMail(c context.Context, date time.Time) (err error)
- func (s *Service) RunStatis(c context.Context, date time.Time) (err error)
- func (s *Service) Signed(c context.Context, business string, limit int64) (m map[int64]*model.Signed, err error)
- func (s *Service) SyncBgmInfo(c context.Context) (err error)
- func (s *Service) UpdateBusinessIncome(c context.Context, date string) (err error)
- type TaxRate
- type UpAccountSvr
- func (s *UpAccountSvr) BatchInsertUpAccount(c context.Context, us map[int64]*model.UpAccount) (err error)
- func (s *UpAccountSvr) UpAccount(c context.Context, limit int64) (m map[int64]*model.UpAccount, err error)
- func (s *UpAccountSvr) UpdateUpAccount(c context.Context, us map[int64]*model.UpAccount) (err error)
- type UpIncomeStatSvr
- type UpIncomeSvr
- func (p *UpIncomeSvr) BatchInsertUpIncome(c context.Context, us map[int64]*model.UpIncome) (err error)
- func (s *UpIncomeSvr) GetUpIncomeTable(c context.Context, date time.Time, table string) (upIncomes []*model.UpIncome, err error)
- func (s *UpIncomeSvr) GetUpIncomeWeeklyAndMonthly(c context.Context, date time.Time) (weeklyMap map[int64]*model.UpIncome, monthlyMap map[int64]*model.UpIncome, ...)
- func (s *UpIncomeSvr) UpIncomeDBStore(c context.Context, weeklyMap, monthlyMap map[int64]*model.UpIncome) (err error)
- func (s *UpIncomeSvr) UpIncomeDBStoreBatch(c context.Context, table string, upIncomeMap map[int64]*model.UpIncome) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AvChargeSvr ¶
type AvChargeSvr struct {
// contains filtered or unexported fields
}
AvChargeSvr av charge service
func NewAvChargeSvr ¶
func NewAvChargeSvr(dao *incomeD.Dao) (svr *AvChargeSvr)
NewAvChargeSvr new av charge service
func (*AvChargeSvr) AvChargeDBStore ¶
func (s *AvChargeSvr) AvChargeDBStore(c context.Context, weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge) (err error)
AvChargeDBStore av charge db store
func (*AvChargeSvr) AvChargeStatisDBStore ¶
func (s *AvChargeSvr) AvChargeStatisDBStore(c context.Context, chargeStatisMap map[int64]*model.AvChargeStatis) error
AvChargeStatisDBStore store charge statis
func (*AvChargeSvr) AvCharges ¶
func (s *AvChargeSvr) AvCharges(c context.Context, date time.Time, ch chan []*model.AvCharge, bubbleRatio map[int64]float64) (err error)
AvCharges get av charges
func (*AvChargeSvr) CalAvCharge ¶
func (s *AvChargeSvr) CalAvCharge(date time.Time, weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge, chargeStatisMap map[int64]*model.AvChargeStatis, dailyChannel chan []*model.AvCharge)
CalAvCharge cal av charge
func (*AvChargeSvr) CalAvChargeStatis ¶
func (s *AvChargeSvr) CalAvChargeStatis(dailyCharge *model.AvCharge, chargeStatisMap map[int64]*model.AvChargeStatis)
CalAvChargeStatis cal av charge statis
func (*AvChargeSvr) GetAvCharge ¶
func (s *AvChargeSvr) GetAvCharge(c context.Context, date time.Time, fn dao.IAvCharge) (avCharges []*model.AvCharge, err error)
GetAvCharge get av charge
func (*AvChargeSvr) GetAvChargeStatis ¶
func (s *AvChargeSvr) GetAvChargeStatis(c context.Context) (avChargeStatis []*model.AvChargeStatis, err error)
GetAvChargeStatis get av charge statis
func (*AvChargeSvr) GetAvChargeStatisMap ¶
func (s *AvChargeSvr) GetAvChargeStatisMap(c context.Context) (chargeStatisMap map[int64]*model.AvChargeStatis, err error)
GetAvChargeStatisMap get av charge statis map
func (*AvChargeSvr) HandleAvCharge ¶
func (s *AvChargeSvr) HandleAvCharge(c context.Context, date time.Time, dailyChannel chan []*model.AvCharge) (weeklyChargeMap, monthlyChargeMap map[int64]*model.AvCharge, chargeStatisMap map[int64]*model.AvChargeStatis, err error)
HandleAvCharge handle av daily charge
type AvIncomeStatSvr ¶
type AvIncomeStatSvr struct {
// contains filtered or unexported fields
}
AvIncomeStatSvr av income stat service
func NewAvIncomeStatSvr ¶
func NewAvIncomeStatSvr(dao *incomeD.Dao, batchSize int) (svr *AvIncomeStatSvr)
NewAvIncomeStatSvr new av income service
func (*AvIncomeStatSvr) AvIncomeStat ¶
func (p *AvIncomeStatSvr) AvIncomeStat(c context.Context, limit int64) (m map[int64]*model.AvIncomeStat, err error)
AvIncomeStat get av income stat
func (*AvIncomeStatSvr) BatchInsertAvIncomeStat ¶
func (p *AvIncomeStatSvr) BatchInsertAvIncomeStat(c context.Context, as map[int64]*model.AvIncomeStat) (err error)
BatchInsertAvIncomeStat batch insert av income statistics
type AvIncomeSvr ¶
type AvIncomeSvr struct {
// contains filtered or unexported fields
}
AvIncomeSvr Av income service
func NewAvIncomeSvr ¶
func NewAvIncomeSvr(dao *incomeD.Dao, batchSize int) (svr *AvIncomeSvr)
NewAvIncomeSvr new av income service
func (*AvIncomeSvr) BatchInsertAvIncome ¶
func (p *AvIncomeSvr) BatchInsertAvIncome(c context.Context, am map[int64][]*model.AvIncome) (err error)
BatchInsertAvIncome batch insert av income
type BgmIncomeStatSvr ¶
type BgmIncomeStatSvr struct {
// contains filtered or unexported fields
}
BgmIncomeStatSvr bgm income stat service
func NewBgmIncomeStatSvr ¶
func NewBgmIncomeStatSvr(dao *incomeD.Dao, batchSize int) (svr *BgmIncomeStatSvr)
NewBgmIncomeStatSvr new bgm income stat svr
func (*BgmIncomeStatSvr) BatchInsertBgmIncomeStat ¶
func (p *BgmIncomeStatSvr) BatchInsertBgmIncomeStat(c context.Context, bs map[int64]*model.BgmIncomeStat) (err error)
BatchInsertBgmIncomeStat batch insert bgm income stat
func (*BgmIncomeStatSvr) BgmIncomeStat ¶
func (p *BgmIncomeStatSvr) BgmIncomeStat(c context.Context, limit int64) (m map[int64]*model.BgmIncomeStat, err error)
BgmIncomeStat get bgm income stat
type BgmIncomeSvr ¶
type BgmIncomeSvr struct {
// contains filtered or unexported fields
}
BgmIncomeSvr bgm income service
func NewBgmIncomeSvr ¶
func NewBgmIncomeSvr(dao *incomeD.Dao, batchSize int) (svr *BgmIncomeSvr)
NewBgmIncomeSvr new bgm income service
type ChargeRatioSvr ¶
type ChargeRatioSvr struct {
// contains filtered or unexported fields
}
ChargeRatioSvr charge ratio service
func NewChargeRatioSvr ¶
func NewChargeRatioSvr(dao *incomeD.Dao) *ChargeRatioSvr
NewChargeRatioSvr new charge ratio service
func (*ChargeRatioSvr) ArchiveChargeRatio ¶
func (p *ChargeRatioSvr) ArchiveChargeRatio(c context.Context, limit int64) (rs map[int]map[int64]*model.ArchiveChargeRatio, err error)
ArchiveChargeRatio get av charge ratio
func (*ChargeRatioSvr) UpChargeRatio ¶
func (p *ChargeRatioSvr) UpChargeRatio(c context.Context, limit int64) (rs map[int]map[int64]*model.UpChargeRatio, err error)
UpChargeRatio get up charge ratio
type ChargeRegulator ¶
ChargeRegulator regulates av charge
type ColumnFilter ¶
type ColumnFilter func(*model.ColumnCharge) bool
ColumnFilter column charge filter
type ColumnIncomeStatSvr ¶
type ColumnIncomeStatSvr struct {
// contains filtered or unexported fields
}
ColumnIncomeStatSvr column income statistics service
func NewColumnIncomeStatSvr ¶
func NewColumnIncomeStatSvr(dao *incomeD.Dao, batchSize int) (svr *ColumnIncomeStatSvr)
NewColumnIncomeStatSvr new column income stat service
func (*ColumnIncomeStatSvr) BatchInsertColumnIncomeStat ¶
func (p *ColumnIncomeStatSvr) BatchInsertColumnIncomeStat(ctx context.Context, cs map[int64]*model.ColumnIncomeStat) (err error)
BatchInsertColumnIncomeStat batch insert column income stat
func (*ColumnIncomeStatSvr) ColumnIncomeStat ¶
func (p *ColumnIncomeStatSvr) ColumnIncomeStat(c context.Context, limit int64) (m map[int64]*model.ColumnIncomeStat, err error)
ColumnIncomeStat column income statistisc
type ColumnIncomeSvr ¶
type ColumnIncomeSvr struct {
// contains filtered or unexported fields
}
ColumnIncomeSvr column income service
func NewColumnIncomeSvr ¶
func NewColumnIncomeSvr(dao *incomeD.Dao, batchSize int) (svr *ColumnIncomeSvr)
NewColumnIncomeSvr new income service
func (*ColumnIncomeSvr) BatchInsertColumnIncome ¶
func (p *ColumnIncomeSvr) BatchInsertColumnIncome(ctx context.Context, cm map[int64][]*model.ColumnIncome) (err error)
BatchInsertColumnIncome batch insert column income
type DateStatis ¶
type DateStatis struct {
// contains filtered or unexported fields
}
DateStatis income date statistics
func NewDateStatis ¶
func NewDateStatis(dao *incomeD.Dao) *DateStatis
NewDateStatis new income date statistics service
type Income ¶
type Income struct {
// contains filtered or unexported fields
}
Income income service
func (*Income) CalAvIncome ¶
func (p *Income) CalAvIncome(ch chan []*model.AvCharge, urs map[int64]*model.UpChargeRatio, ars map[int64]*model.ArchiveChargeRatio, filters []AvFilter, signed map[int64]bool) (am map[int64][]*model.AvIncome, total map[int64]*model.UpBusinessIncome)
CalAvIncome cal av income
func (*Income) CalBgmIncome ¶
func (p *Income) CalBgmIncome(ch chan []*model.AvCharge, bgms map[int64][]*model.BGM, urs map[int64]*model.UpChargeRatio, ars map[int64]*model.ArchiveChargeRatio, avf []AvFilter, exclude BgmFilter, black map[int64]bool, signed map[int64]bool) (bm map[int64]map[int64]map[int64]*model.BgmIncome, total map[int64]*model.UpBusinessIncome)
CalBgmIncome cal bgm income
func (*Income) CalColumnIncome ¶
func (p *Income) CalColumnIncome(ch chan []*model.ColumnCharge, urs map[int64]*model.UpChargeRatio, ars map[int64]*model.ArchiveChargeRatio, filters []ColumnFilter, signed map[int64]bool) (cm map[int64][]*model.ColumnIncome, total map[int64]*model.UpBusinessIncome)
CalColumnIncome cal column income
func (*Income) CalUpIncome ¶
func (p *Income) CalUpIncome(ch chan map[int64]*model.UpBusinessIncome, date time.Time) (m map[int64]*model.UpIncome)
CalUpIncome calculate upIncome
func (*Income) IncomeStat ¶
func (p *Income) IncomeStat( um map[int64]*model.UpIncome, am map[int64][]*model.AvIncome, bm map[int64]map[int64]map[int64]*model.BgmIncome, cm map[int64][]*model.ColumnIncome, ustat map[int64]*model.UpIncomeStat, astat map[int64]*model.AvIncomeStat, bstat map[int64]*model.BgmIncomeStat, cstat map[int64]*model.ColumnIncomeStat)
IncomeStat income statistics
type SectionEntries ¶
type SectionEntries struct {
// contains filtered or unexported fields
}
SectionEntries section entries
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct
func (*Service) GetBubbleMeta ¶
GetBubbleMeta .
func (*Service) GetBusinessOrders ¶
func (s *Service) GetBusinessOrders(c context.Context, limit int64) (result map[int64]bool, err error)
GetBusinessOrders get business orders
func (*Service) RunAndSendMail ¶
RunAndSendMail run and send email
func (*Service) Signed ¶
func (s *Service) Signed(c context.Context, business string, limit int64) (m map[int64]*model.Signed, err error)
Signed signed up by business
func (*Service) SyncBgmInfo ¶
SyncBgmInfo sync bgm info from data platform
type UpAccountSvr ¶
type UpAccountSvr struct {
// contains filtered or unexported fields
}
UpAccountSvr up account service
func NewUpAccountSvr ¶
func NewUpAccountSvr(dao *incomeD.Dao, batchSize int) (svr *UpAccountSvr)
NewUpAccountSvr new up account service
func (*UpAccountSvr) BatchInsertUpAccount ¶
func (s *UpAccountSvr) BatchInsertUpAccount(c context.Context, us map[int64]*model.UpAccount) (err error)
BatchInsertUpAccount batch insert up account
func (*UpAccountSvr) UpAccount ¶
func (s *UpAccountSvr) UpAccount(c context.Context, limit int64) (m map[int64]*model.UpAccount, err error)
UpAccount get up account
func (*UpAccountSvr) UpdateUpAccount ¶
func (s *UpAccountSvr) UpdateUpAccount(c context.Context, us map[int64]*model.UpAccount) (err error)
UpdateUpAccount update up account
type UpIncomeStatSvr ¶
type UpIncomeStatSvr struct {
// contains filtered or unexported fields
}
UpIncomeStatSvr up_income_stat svr
func NewUpIncomeStatSvr ¶
func NewUpIncomeStatSvr(dao *incomeD.Dao, batchSize int) (svr *UpIncomeStatSvr)
NewUpIncomeStatSvr new server
func (*UpIncomeStatSvr) BatchInsertUpIncomeStat ¶
func (p *UpIncomeStatSvr) BatchInsertUpIncomeStat(c context.Context, us map[int64]*model.UpIncomeStat) (err error)
BatchInsertUpIncomeStat insert up_income_statis batch
func (*UpIncomeStatSvr) UpIncomeStat ¶
func (p *UpIncomeStatSvr) UpIncomeStat(c context.Context, limit int64) (m map[int64]*model.UpIncomeStat, err error)
UpIncomeStat return stats, key: mid, value: total_income
type UpIncomeSvr ¶
type UpIncomeSvr struct {
// contains filtered or unexported fields
}
UpIncomeSvr up income service
func NewUpIncomeSvr ¶
func NewUpIncomeSvr(dao *incomeD.Dao, batchSize int) (svr *UpIncomeSvr)
NewUpIncomeSvr new income service
func (*UpIncomeSvr) BatchInsertUpIncome ¶
func (p *UpIncomeSvr) BatchInsertUpIncome(c context.Context, us map[int64]*model.UpIncome) (err error)
BatchInsertUpIncome insert up_income batch
func (*UpIncomeSvr) GetUpIncomeTable ¶
func (s *UpIncomeSvr) GetUpIncomeTable(c context.Context, date time.Time, table string) (upIncomes []*model.UpIncome, err error)
GetUpIncomeTable get up income table
func (*UpIncomeSvr) GetUpIncomeWeeklyAndMonthly ¶
func (s *UpIncomeSvr) GetUpIncomeWeeklyAndMonthly(c context.Context, date time.Time) (weeklyMap map[int64]*model.UpIncome, monthlyMap map[int64]*model.UpIncome, err error)
GetUpIncomeWeeklyAndMonthly get up_income_weekly and up_income_monthly
func (*UpIncomeSvr) UpIncomeDBStore ¶
func (s *UpIncomeSvr) UpIncomeDBStore(c context.Context, weeklyMap, monthlyMap map[int64]*model.UpIncome) (err error)
UpIncomeDBStore insert up_income
func (*UpIncomeSvr) UpIncomeDBStoreBatch ¶
func (s *UpIncomeSvr) UpIncomeDBStoreBatch(c context.Context, table string, upIncomeMap map[int64]*model.UpIncome) error
UpIncomeDBStoreBatch up income db batch store
Source Files ¶
- archive.go
- av_charge.go
- av_charge_statis.go
- av_income.go
- av_income_stat.go
- bgm.go
- bgm_income.go
- bgm_income_stat.go
- blacklist.go
- business_order.go
- charge.go
- charge_ratio.go
- column_charge.go
- column_income.go
- column_income_stat.go
- common.go
- income.go
- income_date_statis.go
- lottery.go
- run.go
- run_statis.go
- service.go
- tax.go
- tools.go
- up_account.go
- up_archive_statis.go
- up_income.go
- up_income_date.go
- up_income_stat.go
- up_info_video.go