Documentation ¶
Index ¶
- Constants
- func Div(x, y float64) float64
- func DivWithRound(x, y float64, places int) float64
- func FormatCSV(records [][]string) (data []byte, err error)
- func GetTaskService() *taskService
- func Mul(x, y float64) float64
- func MulWithRound(x, y float64, places int) float64
- func NextDay(hour, min, second int) time.Duration
- func Round(val float64, places int) float64
- func Tax(income float64) (tax float64)
- func WriteCSV(records [][]string, filename string) (err error)
- type Service
- func (s *Service) AutoBreach(c context.Context, date string) (msg string, err error)
- func (s *Service) AutoExamination(c context.Context) (msg string, err error)
- func (s *Service) AutoPunish(c context.Context) (msg string, err error)
- func (s *Service) AvIncomes(c context.Context, mid int64, date string) (result map[int64]*model.Patch, err error)
- func (s *Service) CheatStatistics(c context.Context, date time.Time) (err error)
- func (s *Service) Close()
- func (s *Service) CombineMails() (err error)
- func (s *Service) CombineMailsByHTTP(c context.Context, year int, month int, day int) (err error)
- func (s *Service) CreativeActivity(c context.Context, date time.Time) (err error)
- func (s *Service) CreativeBudget(c context.Context, date time.Time) (err error)
- func (s *Service) CreativeUpBill(c context.Context, startDate, endDate time.Time) (err error)
- func (s *Service) DelActivity(c context.Context, limit int64) (rows int64, err error)
- func (s *Service) DelDataLimit(c context.Context, table string, count int64) (err error)
- func (s *Service) DeleteAvRatio(c context.Context, limit int64) (rows int64, err error)
- func (s *Service) DeleteUpIncome(c context.Context, limit int64) (rows int64, err error)
- func (s *Service) ExecIncomeForHTTP(c context.Context, year int, month int, day int) (err error)
- func (s *Service) ExecRatioForHTTP(c context.Context, year int, month int, day int) (err error)
- func (s *Service) FixAvBreach(c context.Context, mid int64, date string, count int) (err error)
- func (s *Service) FixBaseIncome(c context.Context, base int64, mid int64, date string) (err error)
- func (s *Service) FixBgmBaseIncome(c context.Context, mid int64, date string) (err error)
- func (s *Service) FixBgmIncomeStatis(c context.Context) (err error)
- func (s *Service) FixIncome(c context.Context) (err error)
- func (s *Service) FixUpAvStatis(c context.Context, count int) (err error)
- func (s *Service) FixUpIncome(c context.Context, date string, tagID int64, addCount, needAddIncome int) (err error)
- func (s *Service) FixUpTotalIncome(c context.Context, table, date string, count int) (err error)
- func (s *Service) GetAvIncome(c context.Context) (avs []*model.AvIncome, err error)
- func (s *Service) GetAvIncomeStatis(c context.Context, date string) error
- func (s *Service) GetAvsMID(c context.Context, avs []int64) (avsMap map[int64]int64, err error)
- func (s *Service) GetTrueAvsIncome(c context.Context, mids []int64, date string) (avs map[int64]*model.Patch, err error)
- func (s *Service) GetUpAccount(c context.Context, date, ctime string) (ups []*model.UpAccount, err error)
- func (s *Service) GetUpIncome(c context.Context, table, date string) (ups []*model.UpIncome, err error)
- func (s *Service) GetUpIncomeStatis(c context.Context, date string, hasWithdraw int) (err error)
- func (s *Service) GetUpNickname(c context.Context, mids []int64) (upNick map[int64]string, err error)
- func (s *Service) GetUpWithdraw(c context.Context, date string) (ups map[int64]int64, err error)
- func (s *Service) HTTPClient(method, url string, params map[string]string, nowTime int64) (body []byte, err error)
- func (s *Service) InitBlacklistMID(c context.Context) (err error)
- func (s *Service) InsertTagIncome(c context.Context, date time.Time) (err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) SendTagIncomeByHTTP(c context.Context, year int, month int, day int) (err error)
- func (s *Service) SnapshotBubbleIncomeTask(c context.Context, date time.Time) (err error)
- func (s *Service) SyncAvBaseIncome(c context.Context, table string) (err error)
- func (s *Service) SyncCreditScore(c context.Context) (err error)
- func (s *Service) SyncIncomeBubbleMeta(c context.Context, start, end time.Time, tp int) (rows int64, err error)
- func (s *Service) SyncIncomeBubbleMetaTask(c context.Context, date time.Time) (err error)
- func (s *Service) SyncUpAccount(c context.Context) (err error)
- func (s *Service) SyncUpPGC(c context.Context) (err error)
- func (s *Service) TxUpdateIncome(tx *sql.Tx, avID, mid, categoryID int64, incIncome int64) (err error)
- func (s *Service) UpdateAccountType(c context.Context, mid int64, accType int) (err error)
- func (s *Service) UpdateAvRatio() (err error)
- func (s *Service) UpdateBlacklist(c context.Context) (err error)
- func (s *Service) UpdateCheatHTTP(c context.Context, date time.Time) (err error)
- func (s *Service) UpdateColumnTag(c context.Context, table string, oldTag string, newTag int, count int64) (err error)
- func (s *Service) UpdateTagAdjust(c context.Context, id int64) (err error)
- func (s *Service) UpdateTagIncome(c context.Context, date string) (err error)
- func (s *Service) UpdateTaskStatus(c context.Context, date string, typ int, status int) (err error)
- func (s *Service) UpdateUpAccountMoney(c context.Context, mid int64, total, unwithdraw int64) (err error)
- func (s *Service) UpdateUpInfo(c context.Context) (err error)
- func (s *Service) UpdateWithdraw(c context.Context, oldDate, newDate string, count int64) (err error)
- type TaxRate
Constants ¶
const ( // TaskAvCharge . TaskAvCharge = iota + 1 // TaskCmCharge . TaskCmCharge // TaskTagRatio . TaskTagRatio // TaskBubbleMeta . TaskBubbleMeta // TaskBlacklist . TaskBlacklist // TaskCreativeIncome . TaskCreativeIncome // TaskCreativeStatis . TaskCreativeStatis // TaskBgmSync . TaskBgmSync // TaskTagIncome . TaskTagIncome // TaskCreativeCharge . TaskCreativeCharge // TaskBudget . TaskBudget // TaskSnapshotBubbleIncome . TaskSnapshotBubbleIncome )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct
func (*Service) AutoBreach ¶
AutoBreach auto breach
func (*Service) AutoExamination ¶
AutoExamination auto examination
func (*Service) AutoPunish ¶
AutoPunish auto punish
func (*Service) AvIncomes ¶
func (s *Service) AvIncomes(c context.Context, mid int64, date string) (result map[int64]*model.Patch, err error)
AvIncomes av_income
func (*Service) CheatStatistics ¶
CheatStatistics task update cheat
func (*Service) CombineMails ¶
CombineMails combine mails.
func (*Service) CombineMailsByHTTP ¶
CombineMailsByHTTP send income mail by http.
func (*Service) CreativeActivity ¶
CreativeActivity creative activity job
func (*Service) CreativeBudget ¶
CreativeBudget creative budget
func (*Service) CreativeUpBill ¶
CreativeUpBill creative up bill
func (*Service) DelActivity ¶
DelActivity clean activity_info table.
func (*Service) DelDataLimit ¶
DelDataLimit del up_bill
func (*Service) DeleteAvRatio ¶
DeleteAvRatio clean the av_charge_ratio
func (*Service) DeleteUpIncome ¶
DeleteUpIncome clean the up_tag_income
func (*Service) ExecIncomeForHTTP ¶
ExecIncomeForHTTP income
func (*Service) ExecRatioForHTTP ¶
ExecRatioForHTTP exec http
func (*Service) FixAvBreach ¶
FixAvBreach fix av_breach_record data
func (*Service) FixBaseIncome ¶
FixBaseIncome fix income
func (*Service) FixBgmBaseIncome ¶
FixBgmBaseIncome fix bgm base income
func (*Service) FixBgmIncomeStatis ¶
FixBgmIncomeStatis fix bgm income statis
func (*Service) FixUpAvStatis ¶
FixUpAvStatis fix up_av_statis
func (*Service) FixUpIncome ¶
func (s *Service) FixUpIncome(c context.Context, date string, tagID int64, addCount, needAddIncome int) (err error)
FixUpIncome fix up_income
func (*Service) FixUpTotalIncome ¶
FixUpTotalIncome fix up_income total income
func (*Service) GetAvIncome ¶
GetAvIncome get av_income
func (*Service) GetAvIncomeStatis ¶
GetAvIncomeStatis get av monthly income
func (*Service) GetTrueAvsIncome ¶
func (s *Service) GetTrueAvsIncome(c context.Context, mids []int64, date string) (avs map[int64]*model.Patch, err error)
GetTrueAvsIncome get true av_income
func (*Service) GetUpAccount ¶
func (s *Service) GetUpAccount(c context.Context, date, ctime string) (ups []*model.UpAccount, err error)
GetUpAccount get up_account
func (*Service) GetUpIncome ¶
func (s *Service) GetUpIncome(c context.Context, table, date string) (ups []*model.UpIncome, err error)
GetUpIncome get up_income
func (*Service) GetUpIncomeStatis ¶
GetUpIncomeStatis get up statis
func (*Service) GetUpNickname ¶
func (s *Service) GetUpNickname(c context.Context, mids []int64) (upNick map[int64]string, err error)
GetUpNickname get up nickname
func (*Service) GetUpWithdraw ¶
GetUpWithdraw get up_income_withdraw
func (*Service) HTTPClient ¶
func (s *Service) HTTPClient(method, url string, params map[string]string, nowTime int64) (body []byte, err error)
HTTPClient http client handle
func (*Service) InitBlacklistMID ¶
InitBlacklistMID init av_black_list mid
func (*Service) InsertTagIncome ¶
InsertTagIncome insert up_tag_income.
func (*Service) SendTagIncomeByHTTP ¶
SendTagIncomeByHTTP exec http
func (*Service) SnapshotBubbleIncomeTask ¶
SnapshotBubbleIncomeTask get income lottery
func (*Service) SyncAvBaseIncome ¶
SyncAvBaseIncome sync base_income to av_base_income by mid_date
func (*Service) SyncCreditScore ¶
SyncCreditScore sync credit score
func (*Service) SyncIncomeBubbleMeta ¶
func (s *Service) SyncIncomeBubbleMeta(c context.Context, start, end time.Time, tp int) (rows int64, err error)
SyncIncomeBubbleMeta .
func (*Service) SyncIncomeBubbleMetaTask ¶
SyncIncomeBubbleMetaTask sync meta data for income bubble to growup
func (*Service) SyncUpAccount ¶
SyncUpAccount sync up_account to up_tag_year
func (*Service) TxUpdateIncome ¶
func (s *Service) TxUpdateIncome(tx *sql.Tx, avID, mid, categoryID int64, incIncome int64) (err error)
TxUpdateIncome update creative income
func (*Service) UpdateAccountType ¶
UpdateAccountType update account type
func (*Service) UpdateAvRatio ¶
UpdateAvRatio update av ratio everyday
func (*Service) UpdateBlacklist ¶
UpdateBlacklist update blacklist
func (*Service) UpdateCheatHTTP ¶
UpdateCheatHTTP update cheat by http
func (*Service) UpdateColumnTag ¶
func (s *Service) UpdateColumnTag(c context.Context, table string, oldTag string, newTag int, count int64) (err error)
UpdateColumnTag update column tag
func (*Service) UpdateTagAdjust ¶
UpdateTagAdjust update tag adjust_type
func (*Service) UpdateTagIncome ¶
UpdateTagIncome update tag_Info income
func (*Service) UpdateTaskStatus ¶
UpdateTaskStatus update task status
func (*Service) UpdateUpAccountMoney ¶
func (s *Service) UpdateUpAccountMoney(c context.Context, mid int64, total, unwithdraw int64) (err error)
UpdateUpAccountMoney update up_account
func (*Service) UpdateUpInfo ¶
UpdateUpInfo update up_info_video