|
@@ -3,59 +3,46 @@ package services
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/astaxie/beego/toolbox"
|
|
|
+ "hongze/hongze_task/utils"
|
|
|
)
|
|
|
|
|
|
func Task() {
|
|
|
fmt.Println("task start")
|
|
|
-
|
|
|
- sendEmail := toolbox.NewTask("sendEmail", "0 0 12 * * 0 ", SendEmail)
|
|
|
- toolbox.AddTask("sendEmail", sendEmail)
|
|
|
+
|
|
|
+
|
|
|
+ if utils.RunMode == "release"{
|
|
|
+ releaseTask()
|
|
|
+ }
|
|
|
|
|
|
|
|
|
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)
|
|
|
+ toolbox.AddTask("潜在客户", freeViewerDetail)
|
|
|
|
|
|
|
|
|
companyTryOut := toolbox.NewTask("companyTryOut", "0 5 0 * * *", CompanyTryOut)
|
|
|
- toolbox.AddTask("companyTryOut", companyTryOut)
|
|
|
+ toolbox.AddTask("正式->试用", companyTryOut)
|
|
|
|
|
|
|
|
|
companyFreeze := toolbox.NewTask("companyFreeze", "0 10 0 * * *", CompanyFreeze)
|
|
|
- toolbox.AddTask("companyFreeze", companyFreeze)
|
|
|
+ toolbox.AddTask("试用->冻结", companyFreeze)
|
|
|
|
|
|
|
|
|
companyLoss := toolbox.NewTask("companyLoss", "0 20 0 * * *", CompanyLoss)
|
|
|
- toolbox.AddTask("companyLoss", companyLoss)
|
|
|
+ toolbox.AddTask("冻结->流失", companyLoss)
|
|
|
|
|
|
+
|
|
|
companyReportPermissionClose := toolbox.NewTask("companyReportPermissionClose", "0 30 0 * * *", CompanyReportPermissionClose)
|
|
|
toolbox.AddTask("用户产品权限试用-->关闭", companyReportPermissionClose)
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- companyRemind := toolbox.NewTask("companyRemind", "0 30 08 * * *", CompanyRemind)
|
|
|
- toolbox.AddTask("companyRemind", companyRemind)
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ stackCompanyStatistic := toolbox.NewTask("stackCompanyStatistic", "0 35 0 * * *", StackCompanyStatistic)
|
|
|
+ toolbox.AddTask("存量客户数据统计", stackCompanyStatistic)
|
|
|
+
|
|
|
toolbox.StartTask()
|
|
|
|
|
|
|
|
@@ -65,6 +52,35 @@ func Task() {
|
|
|
fmt.Println("task end")
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+func releaseTask(){
|
|
|
+
|
|
|
+
|
|
|
+ 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)
|
|
|
+
|
|
|
+
|
|
|
+ sendEmail := toolbox.NewTask("sendEmail", "0 0 12 * * 0 ", SendEmail)
|
|
|
+ toolbox.AddTask("sendEmail", sendEmail)
|
|
|
+
|
|
|
+ oneMinute := toolbox.NewTask("oneMinute", "0 */1 7-23 * * * ", OneMinute)
|
|
|
+ toolbox.AddTask("oneMinute", oneMinute)
|
|
|
+
|
|
|
+
|
|
|
+ companyRemind := toolbox.NewTask("companyRemind", "0 30 08 * * *", CompanyRemind)
|
|
|
+ toolbox.AddTask("companyRemind", companyRemind)
|
|
|
+}
|
|
|
+
|
|
|
func TaskTest(){
|
|
|
fmt.Println("The task is start")
|
|
|
|