12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package services
- import (
- "fmt"
- "github.com/astaxie/beego/toolbox"
- )
- func Task() {
- fmt.Println("task start")
- //发送邮件
- sendEmail := toolbox.NewTask("sendEmail", "0 0 12 * * 0 ", SendEmail)
- toolbox.AddTask("sendEmail", sendEmail)
- //潜在客户
- freeViewerDetail := toolbox.NewTask("freeViewerDetail", "0 0 9 * * 1 ", FreeViewerDetail)
- toolbox.AddTask("freeViewerDetail", freeViewerDetail)
- oneMinute := toolbox.NewTask("oneMinute", "0 */1 7-23 * * * ", OneMinute)
- toolbox.AddTask("oneMinute", oneMinute)
- //隆众指标获取
- getLzProductList := toolbox.NewTask("getLzProductList", "0 0 11-19/1 * * * ", GetLzProductList)
- toolbox.AddTask("getLzProductList", getLzProductList)
- //隆众指标数据获取
- getLzProductDetail := toolbox.NewTask("getLzProductDetail", "0 5 11-19/1 * * * ", GetLzProductDetail)
- toolbox.AddTask("getLzProductDetail", getLzProductDetail)
- //隆众价格指标获取
- getLzProductPriceProduct := toolbox.NewTask("getLzProductPriceProduct", "0 5 11-19/1 * * * ", GetLzProductPriceProduct)
- toolbox.AddTask("getLzProductPriceProduct", getLzProductPriceProduct)
- //隆众价格指标数据获取
- getLzProductPriceData := toolbox.NewTask("getLzProductPriceData", "0 10 11-19/1 * * * ", GetLzProductPriceData)
- toolbox.AddTask("getLzProductPriceData", getLzProductPriceData)
- //正式->试用
- companyTryOut := toolbox.NewTask("companyTryOut", "0 5 0 * * *", CompanyTryOut)
- toolbox.AddTask("companyTryOut", companyTryOut)
- //试用->冻结
- companyFreeze := toolbox.NewTask("companyFreeze", "0 10 0 * * *", CompanyFreeze)
- toolbox.AddTask("companyFreeze", companyFreeze)
- //冻结->流失
- companyLoss := toolbox.NewTask("companyLoss", "0 20 0 * * *", CompanyLoss)
- toolbox.AddTask("companyLoss", companyLoss)
- //到期提醒
- companyRemind := toolbox.NewTask("companyRemind", "0 30 08 * * *", CompanyRemind)
- toolbox.AddTask("companyRemind", companyRemind)
- //删除日志记录
- //deleteReportSaveLog := toolbox.NewTask("deleteReportSaveLog", "0 30 08 * * *", DeleteReportSaveLog)
- //toolbox.AddTask("deleteReportSaveLog", deleteReportSaveLog)
- toolbox.StartTask()
- //GetHistoryLzProductDetail()
- //GetLzPrice()
- //GetLzProductDetail()
- //LzExportExcel()
- //GetLzProductList()GetLzProductDetail
- fmt.Println("task end")
- }
- func Task123() {
- fmt.Println("start")
- //ReportViewDetail()
- fmt.Println("end")
- }
- func SendEmail() (err error) {
- //报告历史访问次数
- go ReportViewTimes()
- //报告访问详情
- go ReportViewDetail()
- //用户权限统计
- go HongzeUsers()
- return
- }
- func OneMinute() (err error) {
- //日度
- //FrequencyByDay()
- //周度
- FrequencyByWeek()
- //月度
- FrequencyByMonth()
- return
- }
|